src/Horse/Parsers/MetadataParser.php
public function parse($line)
    {
        $elements = [];

        // 1. remove braces
        $line = \str_replace(['{', '}'], '', $line);

        // 2. extract elements
        $elements = $this->extractElements($line);

        // 3. remove quotes
        $iterator = function($element)
        {
            return \str_replace(['\'', '"'], '', $element);
        };

        return \array_map($iterator, $elements);
    }
public function parse($line)
    {
        $elements = [];

        // 1. remove braces
        $line = \str_replace(['{', '}'], '', $line);

        // 2. extract elements
        $elements = $this->extractElements($line);

        // 3. remove quotes
        $iterator = function($element)
        {
            return \str_replace(['\'', '"'], '', $element);
        };

        return \array_map($iterator, $elements);
    }
public function parse ( $ line ) { $ elements = [ ] ; // 1. remove braces $ line = \ str_replace ( [ '{' , '}' ] , '' , $ line ) ; // 2. extract elements $ elements = $ this -> extractElements ( $ line ) ; // 3. remove quotes $ iterator = function ( $ element ) { return \ str_replace ( [ '\'' , '"' ] , '' , $ element ) ; } ; return \ array_map ( $ iterator , $ elements ) ; }
Parse a single element.

@param string $line
@return array
Parse a single element .