src/Evaluators/HighHandEvaluator.php
/**
    * Set Hand properties to be the Two Pair
    * 
    * @return void
    */
Set Hand properties to be the Two Pair

@return void
Set Hand properties to be the Two Pair @return void
protected function twoPair(): void
    {
        $twoPair = array_merge(array_slice(reset($this->valueHistogram), 0, 2), array_slice(next($this->valueHistogram), 0, 2));
        $withoutTopN = 2;
        $highestCard = $this->getHighCard($withoutTopN);
        $twoPair[] = $highestCard; 
        $this->hand = $twoPair;
        $this->handRank = static::TWO_PAIR_RANK;
    }
protected function twoPair ( ) : void { $ twoPair = array_merge ( array_slice ( reset ( $ this -> valueHistogram ) , 0 , 2 ) , array_slice ( next ( $ this -> valueHistogram ) , 0 , 2 ) ) ; $ withoutTopN = 2 ; $ highestCard = $ this -> getHighCard ( $ withoutTopN ) ; $ twoPair [ ] = $ highestCard ; $ this -> hand = $ twoPair ; $ this -> handRank = static :: TWO_PAIR_RANK ; }
Set Hand properties to be the Two Pair
Set Hand properties to be the Two Pair
// Get the best card after removing top 2 of histogram (Two pair is the top two of value histogram) // Append highestCard to twoPair