src/Card.php
/**
    * If short value is given, split it in to value and suit
    * 
    * @param string $value
    * @return array 
    */
If short value is given, split it in to value and suit

@param string $value
@return array
If short value is given split it in to value and suit @param string $value @return array
public function splitValue($shortValue): Array
    {
        $pattern = '/[A2-9TJQK][cdhs]/';
        if (!is_string($shortValue) || strlen($shortValue) !== 2 || !preg_match($pattern, $shortValue)) {
            throw new InvalidCardException("Invalid short value ($shortValue)");
        }
        return [$shortValue[0], $shortValue[1]];
    }
public function splitValue ( $ shortValue ) : Array { $ pattern = '/[A2-9TJQK][cdhs]/' ; if ( ! is_string ( $ shortValue ) || strlen ( $ shortValue ) !== 2 || ! preg_match ( $ pattern , $ shortValue ) ) { throw new InvalidCardException ( " Invalid short value ( $ shortValue ) " ) ; } return [ $ shortValue [ 0 ] , $ shortValue [ 1 ] ] ; }
If short value is given, split it in to value and suit
If short value is given split it in to value and suit