X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fconfig%2FLoader%2FFileLoader.php;h=016ac4120fc9d76c8282119b3df82a3ecb117965;hp=0dfd30ba988a8cbbb2fb036c7c643a374b599cd9;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/symfony/config/Loader/FileLoader.php b/vendor/symfony/config/Loader/FileLoader.php index 0dfd30ba9..016ac4120 100644 --- a/vendor/symfony/config/Loader/FileLoader.php +++ b/vendor/symfony/config/Loader/FileLoader.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Config\Loader; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Exception\FileLoaderLoadException; use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException; +use Symfony\Component\Config\Exception\FileLoaderLoadException; use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; +use Symfony\Component\Config\FileLocatorInterface; use Symfony\Component\Config\Resource\FileExistenceResource; use Symfony\Component\Config\Resource\GlobResource; @@ -72,7 +72,7 @@ abstract class FileLoader extends Loader */ public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) { - if (is_string($resource) && strlen($resource) !== $i = strcspn($resource, '*?{[')) { + if (\is_string($resource) && \strlen($resource) !== $i = strcspn($resource, '*?{[')) { $ret = array(); $isSubpath = 0 !== $i && false !== strpos(substr($resource, 0, $i), '/'); foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath) as $path => $info) { @@ -95,15 +95,15 @@ abstract class FileLoader extends Loader */ protected function glob($pattern, $recursive, &$resource = null, $ignoreErrors = false) { - if (strlen($pattern) === $i = strcspn($pattern, '*?{[')) { + if (\strlen($pattern) === $i = strcspn($pattern, '*?{[')) { $prefix = $pattern; $pattern = ''; } elseif (0 === $i || false === strpos(substr($pattern, 0, $i), '/')) { $prefix = '.'; $pattern = '/'.$pattern; } else { - $prefix = dirname(substr($pattern, 0, 1 + $i)); - $pattern = substr($pattern, strlen($prefix)); + $prefix = \dirname(substr($pattern, 0, 1 + $i)); + $pattern = substr($pattern, \strlen($prefix)); } try { @@ -136,8 +136,8 @@ abstract class FileLoader extends Loader $resource = $loader->getLocator()->locate($resource, $this->currentDir, false); } - $resources = is_array($resource) ? $resource : array($resource); - for ($i = 0; $i < $resourcesCount = count($resources); ++$i) { + $resources = \is_array($resource) ? $resource : array($resource); + for ($i = 0; $i < $resourcesCount = \count($resources); ++$i) { if (isset(self::$loading[$resources[$i]])) { if ($i == $resourcesCount - 1) { throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading));