src/Metadata/Extractor/YamlExtractor.php
private function phpize(array $array, string $key, string $type)
    {
        if (!isset($array[$key])) {
            return null;
        }

        switch ($type) {
            case 'bool':
                if (\is_bool($array[$key])) {
                    return $array[$key];
                }
                break;
            case 'string':
                if (\is_string($array[$key])) {
                    return $array[$key];
                }
                break;
        }

        throw new InvalidArgumentException(sprintf('The property "%s" must be a "%s", "%s" given.', $key, $type, \gettype($array[$key])));
    }
private function phpize(array $array, string $key, string $type)
    {
        if (!isset($array[$key])) {
            return null;
        }

        switch ($type) {
            case 'bool':
                if (\is_bool($array[$key])) {
                    return $array[$key];
                }
                break;
            case 'string':
                if (\is_string($array[$key])) {
                    return $array[$key];
                }
                break;
        }

        throw new InvalidArgumentException(sprintf('The property "%s" must be a "%s", "%s" given.', $key, $type, \gettype($array[$key])));
    }
private function phpize ( array $ array , string $ key , string $ type ) { if ( ! isset ( $ array [ $ key ] ) ) { return null ; } switch ( $ type ) { case 'bool' : if ( \ is_bool ( $ array [ $ key ] ) ) { return $ array [ $ key ] ; } break ; case 'string' : if ( \ is_string ( $ array [ $ key ] ) ) { return $ array [ $ key ] ; } break ; } throw new InvalidArgumentException ( sprintf ( 'The property "%s" must be a "%s", "%s" given.' , $ key , $ type , \ gettype ( $ array [ $ key ] ) ) ) ; }
Transforms a YAML attribute's value in PHP value.

@throws InvalidArgumentException

@return bool|string|null
Transforms a YAML attribute s value in PHP value .