src/Evaluators/HighHandEvaluator.php
/**
    * Set Hand properties to be the Four of a Kind
    * 
    * @return void
    */
Set Hand properties to be the Four of a Kind

@return void
Set Hand properties to be the Four of a Kind @return void
protected function fourOfAKind(): void
    {
        $fourOfAKind = array_slice(reset($this->valueHistogram), 0, 4);
        $withoutTopN = 1;
        $highestCard = $this->getHighCard($withoutTopN);
        $fourOfAKind[] = $highestCard; 
        $this->hand = $fourOfAKind;
        $this->handRank = static::FOUR_OF_A_KIND_RANK;
    }
protected function fourOfAKind ( ) : void { $ fourOfAKind = array_slice ( reset ( $ this -> valueHistogram ) , 0 , 4 ) ; $ withoutTopN = 1 ; $ highestCard = $ this -> getHighCard ( $ withoutTopN ) ; $ fourOfAKind [ ] = $ highestCard ; $ this -> hand = $ fourOfAKind ; $ this -> handRank = static :: FOUR_OF_A_KIND_RANK ; }
Set Hand properties to be the Four of a Kind
Set Hand properties to be the Four of a Kind
// Get the best card after removing top 1 of histogram (four of a kind is the top of value histogram) // Append highestCard to fourOfAKind5