src/Deck.php
/**
    * Take and return a number of cards from the deck
    * 
    * @param int $n
    * @return array
    */
Take and return a number of cards from the deck

@param int $n
@return array
Take and return a number of cards from the deck @param int $n @return array
public function takeCards($n = 1): Array
    {
        if ($n < 1) $n = 1;
        if ($n > count($this->cards)) {
            throw new InvalidDeckOperationException("Not enough cards in deck to remove $n cards");
        }
        $cards = array_splice($this->cards, 0, $n);
        return $cards;
    }
public function takeCards ( $ n = 1 ) : Array { if ( $ n < 1 ) $ n = 1 ; if ( $ n > count ( $ this -> cards ) ) { throw new InvalidDeckOperationException ( " Not enough cards in deck to remove  $ n  cards " ) ; } $ cards = array_splice ( $ this -> cards , 0 , $ n ) ; return $ cards ; }
Take and return a number of cards from the deck
Take and return a number of cards from the deck