You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED);
if (is_bool($referenceType) || is_string($referenceType)) {
129
+
if (\is_bool($referenceType) || \is_string($referenceType)) {
130
130
@trigger_error('The hardcoded value you are using for the $referenceType argument of the '.__CLASS__.'::generate method is deprecated since Symfony 2.8 and will not be supported anymore in 3.0. Use the constants defined in the UrlGeneratorInterface instead.', E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: Loader/ObjectRouteLoader.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ abstract protected function getServiceObject($id);
45
45
publicfunctionload($resource, $type = null)
46
46
{
47
47
$parts = explode(':', $resource);
48
-
if (2 != count($parts)) {
48
+
if (2 != \count($parts)) {
49
49
thrownew \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service_name:methodName"', $resource));
50
50
}
51
51
@@ -54,20 +54,20 @@ public function load($resource, $type = null)
thrownew \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', get_class($this), gettype($loaderObject)));
57
+
if (!\is_object($loaderObject)) {
58
+
thrownew \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject)));
59
59
}
60
60
61
61
if (!method_exists($loaderObject, $method)) {
62
-
thrownew \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, get_class($loaderObject), $resource));
62
+
thrownew \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, \get_class($loaderObject), $resource));
0 commit comments