ALPHA 3.0.2a

This commit is contained in:
TheGamecraft
2018-09-10 08:51:18 -04:00
parent 7fe13ae0a7
commit 0e0ef86b71
1404 changed files with 10604 additions and 33714 deletions

View File

@@ -11,13 +11,13 @@
namespace Symfony\Component\Routing\Loader;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
use Symfony\Component\Config\Loader\FileLoader;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser as YamlParser;
use Symfony\Component\Yaml\Yaml;
use Symfony\Component\Config\Loader\FileLoader;
/**
* YamlFileLoader loads Yaml routing files.
@@ -73,7 +73,7 @@ class YamlFileLoader extends FileLoader
}
// not an array
if (!is_array($parsedConfig)) {
if (!\is_array($parsedConfig)) {
throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path));
}
@@ -95,7 +95,7 @@ class YamlFileLoader extends FileLoader
*/
public function supports($resource, $type = null)
{
return is_string($resource) && in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true) && (!$type || 'yaml' === $type);
return \is_string($resource) && \in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true) && (!$type || 'yaml' === $type);
}
/**
@@ -120,7 +120,7 @@ class YamlFileLoader extends FileLoader
$defaults['_controller'] = $config['controller'];
}
if (is_array($config['path'])) {
if (\is_array($config['path'])) {
$route = new Route('', $defaults, $requirements, $options, $host, $schemes, $methods, $condition);
foreach ($config['path'] as $locale => $path) {
@@ -161,11 +161,11 @@ class YamlFileLoader extends FileLoader
$defaults['_controller'] = $config['controller'];
}
$this->setCurrentDir(dirname($path));
$this->setCurrentDir(\dirname($path));
$imported = $this->import($config['resource'], $type, false, $file);
if (!is_array($imported)) {
if (!\is_array($imported)) {
$imported = array($imported);
}
@@ -240,7 +240,7 @@ class YamlFileLoader extends FileLoader
*/
protected function validate($config, $name, $path)
{
if (!is_array($config)) {
if (!\is_array($config)) {
throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path));
}
if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) {