for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SimpleDIC\Parser;
use Symfony\Component\Yaml\Yaml;
class YamlParser implements ParserInterface
{
/**
* @param string $filename
*
* @return array
* @throws \Exception
*/
public function parse($filename)
if (false === class_exists(Yaml::class)) {
throw new \Exception('YAML class was not found, you must install it. Run "composer require symfony/yaml"');
}
return Yaml::parseFile($filename);
return Symfony\Component...l::parseFile($filename)
Symfony\Component\Yaml\Tag\TaggedValue|string
array