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
* 4.1:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s::%s()"?', $placeholder, $requirement, $name, $class->getName(), $method->getName()), E_USER_DEPRECATED);
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" in "%s"?', $placeholder, $requirement, $class->getName()), E_USER_DEPRECATED);
if (1 === count($tokens) && T_INLINE_HTML === $tokens[0][0]) {
90
+
if (1 === \count($tokens) && T_INLINE_HTML === $tokens[0][0]) {
91
91
thrownew \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the "<?php" start tag at the beginning of the file?', $file));
92
92
}
93
93
@@ -104,7 +104,7 @@ protected function findClass($file)
104
104
105
105
if (true === $namespace && T_STRING === $token[0]) {
106
106
$namespace = $token[1];
107
-
while (isset($tokens[++$i][1]) && in_array($tokens[$i][0], array(T_NS_SEPARATOR, T_STRING))) {
107
+
while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], array(T_NS_SEPARATOR, T_STRING))) {
108
108
$namespace .= $tokens[$i][1];
109
109
}
110
110
$token = $tokens[$i];
@@ -121,7 +121,7 @@ protected function findClass($file)
121
121
if (T_DOUBLE_COLON === $tokens[$j][0] || T_NEW === $tokens[$j][0]) {
Copy file name to clipboardExpand all lines: Loader/ObjectRouteLoader.php
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ public function load($resource, $type = null)
50
50
}
51
51
52
52
$parts = explode('::', $resource);
53
-
if (2 != count($parts)) {
53
+
if (2 != \count($parts)) {
54
54
thrownew \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service::method"', $resource));
55
55
}
56
56
@@ -59,20 +59,20 @@ public function load($resource, $type = null)
thrownew \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', get_class($this), gettype($loaderObject)));
62
+
if (!\is_object($loaderObject)) {
63
+
thrownew \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject)));
64
64
}
65
65
66
-
if (!is_callable(array($loaderObject, $method))) {
67
-
thrownew \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, get_class($loaderObject), $resource));
66
+
if (!\is_callable(array($loaderObject, $method))) {
67
+
thrownew \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, \get_class($loaderObject), $resource));
thrownew \InvalidArgumentException(sprintf('The <route> element in file "%s" must not have both a "prefix" attribute and <prefix> child nodes.', $path));
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s"?', $placeholder, $requirement, $name, $path), E_USER_DEPRECATED);
0 commit comments