for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Phoole (PHP7.2+)
*
* @category Library
* @package Phoole\Base
* @copyright Copyright (c) 2019 Hong Zhang
*/
declare(strict_types=1);
namespace Phoole\Base\Reader;
* YamlReader
class YamlReader extends AbstractReader
{
* {@inheritDoc}
protected function readFromFile($path)
try {
$data = \yaml_parse_file($path);
if ($data === FALSE) {
throw new \RuntimeException("Parse $path error");
}
} catch (\Exception $e) {
throw new \RuntimeException($e->getMessage());
return $data;