* @package PHPRouter */ final class Config { /** * Avoid instantiation. * * @codeCoverageIgnore */ private function __construct() { } /** * @param string $yamlFile file location. * @throws InvalidArgumentException * * @return mixed[] */ public static function loadFromFile($yamlFile) { if (!is_file($yamlFile)) { throw new InvalidArgumentException(sprintf('The file %s not exists!', $yamlFile)); } return Yaml::parse(file_get_contents($yamlFile)); } }