public function parse(string $file): array
    {
        foreach ($this->parsers as $parser) {
            if ($parser->canParse($file)) {
                return $parser->parse($file);
            }
        }

        throw ParseExceptionFactory::createForParserNoFoundForFile($file);
    }
public function parse(string $file): array
    {
        foreach ($this->parsers as $parser) {
            if ($parser->canParse($file)) {
                return $parser->parse($file);
            }
        }

        throw ParseExceptionFactory::createForParserNoFoundForFile($file);
    }
public function parse ( string $ file ) : array { foreach ( $ this -> parsers as $ parser ) { if ( $ parser -> canParse ( $ file ) ) { return $ parser -> parse ( $ file ) ; } } throw ParseExceptionFactory :: createForParserNoFoundForFile ( $ file ) ; }
Looks for the first suitable parser to parse the file.

{@inheritdoc}
Looks for the first suitable parser to parse the file .