X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Frouting%2FLoader%2FObjectRouteLoader.php;fp=vendor%2Fsymfony%2Frouting%2FLoader%2FObjectRouteLoader.php;h=12fc2bbe16e9a8a7d9fa780a8d36a781aaf91d39;hp=0899a818129be5008111eff3b8c7d2d4b69395df;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/symfony/routing/Loader/ObjectRouteLoader.php b/vendor/symfony/routing/Loader/ObjectRouteLoader.php index 0899a8181..12fc2bbe1 100644 --- a/vendor/symfony/routing/Loader/ObjectRouteLoader.php +++ b/vendor/symfony/routing/Loader/ObjectRouteLoader.php @@ -45,7 +45,7 @@ abstract class ObjectRouteLoader extends Loader public function load($resource, $type = null) { $parts = explode(':', $resource); - if (2 != count($parts)) { + if (2 != \count($parts)) { throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service_name:methodName"', $resource)); } @@ -54,20 +54,20 @@ abstract class ObjectRouteLoader extends Loader $loaderObject = $this->getServiceObject($serviceString); - if (!is_object($loaderObject)) { - throw new \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', get_class($this), gettype($loaderObject))); + if (!\is_object($loaderObject)) { + throw new \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject))); } if (!method_exists($loaderObject, $method)) { - throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, get_class($loaderObject), $resource)); + throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, \get_class($loaderObject), $resource)); } - $routeCollection = call_user_func(array($loaderObject, $method), $this); + $routeCollection = \call_user_func(array($loaderObject, $method), $this); if (!$routeCollection instanceof RouteCollection) { - $type = is_object($routeCollection) ? get_class($routeCollection) : gettype($routeCollection); + $type = \is_object($routeCollection) ? \get_class($routeCollection) : \gettype($routeCollection); - throw new \LogicException(sprintf('The %s::%s method must return a RouteCollection: %s returned', get_class($loaderObject), $method, $type)); + throw new \LogicException(sprintf('The %s::%s method must return a RouteCollection: %s returned', \get_class($loaderObject), $method, $type)); } // make the service file tracked so that if it changes, the cache rebuilds