src/Reflection/ReflectionArgument.php
private static function createArgument(array $definition): ReflectionArgument
    {
        $result = new static(self::EXPRESSION, $definition['value']);

        if (count($definition['tokens']) == 1) {
            //If argument represent by one token we can try to resolve it's type more precisely
            switch ($definition['tokens'][0][0]) {
                case T_VARIABLE:
                    $result->type = self::VARIABLE;
                    break;
                case T_LNUMBER:
                case T_DNUMBER:
                    $result->type = self::CONSTANT;
                    break;
                case T_CONSTANT_ENCAPSED_STRING:
                    $result->type = self::STRING;
                    break;
            }
        }

        return $result;
    }
private static function createArgument(array $definition): ReflectionArgument
    {
        $result = new static(self::EXPRESSION, $definition['value']);

        if (count($definition['tokens']) == 1) {
            //If argument represent by one token we can try to resolve it's type more precisely
            switch ($definition['tokens'][0][0]) {
                case T_VARIABLE:
                    $result->type = self::VARIABLE;
                    break;
                case T_LNUMBER:
                case T_DNUMBER:
                    $result->type = self::CONSTANT;
                    break;
                case T_CONSTANT_ENCAPSED_STRING:
                    $result->type = self::STRING;
                    break;
            }
        }

        return $result;
    }
private static function createArgument ( array $ definition ) : ReflectionArgument { $ result = new static ( self :: EXPRESSION , $ definition [ 'value' ] ) ; if ( count ( $ definition [ 'tokens' ] ) == 1 ) { //If argument represent by one token we can try to resolve it's type more precisely switch ( $ definition [ 'tokens' ] [ 0 ] [ 0 ] ) { case T_VARIABLE : $ result -> type = self :: VARIABLE ; break ; case T_LNUMBER : case T_DNUMBER : $ result -> type = self :: CONSTANT ; break ; case T_CONSTANT_ENCAPSED_STRING : $ result -> type = self :: STRING ; break ; } } return $ result ; }
Create Argument reflection using token definition. Internal method.

@see locateArguments
@param array $definition
@return self
Create Argument reflection using token definition . Internal method .