src/Evaluators/HighHandEvaluator.php
/**
    * Gets the best five cards of given cards
    * Assigns a hand rank value to compare with other hands
    * Updates hand descriptions
    * 
    * @return void
    */
Gets the best five cards of given cards
Assigns a hand rank value to compare with other hands
Updates hand descriptions

@return void
Gets the best five cards of given cards Assigns a hand rank value to compare with other hands Updates hand descriptions @return void
protected function generateHand()
    {
        if ($this->isRoyalFlush())
        {
            $this->royalFlush();
        }
        elseif ($this->isStraightFlush())
        {
            $this->straightFlush();
        }
        elseif ($this->isFourOfAKind())
        {
            $this->fourOfAKind();
        }
        elseif ($this->isFullHouse())
        {
            $this->fullHouse();
        }
        elseif ($this->isFlush())
        {
            $this->flush();
        }
        elseif ($this->isStraight())
        {
            $this->straight();
        }
        elseif ($this->isThreeOfAKind())
        {
            $this->threeOfAKind();
        }
        elseif ($this->isTwoPair())
        {
            $this->twoPair();
        }
        elseif ($this->isOnePair())
        {
            $this->onePair();
        }
        elseif ($this->isHighCard())
        {
            $this->highCard();
        }
        if (count($this->hand) !== 5) {
            throw new InvalidHandException('Unable to determine best hand rank');
        }
    }
protected function generateHand ( ) { if ( $ this -> isRoyalFlush ( ) ) { $ this -> royalFlush ( ) ; } elseif ( $ this -> isStraightFlush ( ) ) { $ this -> straightFlush ( ) ; } elseif ( $ this -> isFourOfAKind ( ) ) { $ this -> fourOfAKind ( ) ; } elseif ( $ this -> isFullHouse ( ) ) { $ this -> fullHouse ( ) ; } elseif ( $ this -> isFlush ( ) ) { $ this -> flush ( ) ; } elseif ( $ this -> isStraight ( ) ) { $ this -> straight ( ) ; } elseif ( $ this -> isThreeOfAKind ( ) ) { $ this -> threeOfAKind ( ) ; } elseif ( $ this -> isTwoPair ( ) ) { $ this -> twoPair ( ) ; } elseif ( $ this -> isOnePair ( ) ) { $ this -> onePair ( ) ; } elseif ( $ this -> isHighCard ( ) ) { $ this -> highCard ( ) ; } if ( count ( $ this -> hand ) !== 5 ) { throw new InvalidHandException ( 'Unable to determine best hand rank' ) ; } }
Gets the best five cards of given cards
 Assigns a hand rank value to compare with other hands
 Updates hand descriptions
Gets the best five cards of given cards Assigns a hand rank value to compare with other hands Updates hand descriptions