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
* 2.8:
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
if (1 === count($tokens) && T_INLINE_HTML === $tokens[0][0]) {
91
+
if (1 === \count($tokens) && T_INLINE_HTML === $tokens[0][0]) {
92
92
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));
93
93
}
94
94
@@ -105,7 +105,7 @@ protected function findClass($file)
105
105
106
106
if (true === $namespace && T_STRING === $token[0]) {
107
107
$namespace = $token[1];
108
-
while (isset($tokens[++$i][1]) && in_array($tokens[$i][0], array(T_NS_SEPARATOR, T_STRING))) {
108
+
while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], array(T_NS_SEPARATOR, T_STRING))) {
109
109
$namespace .= $tokens[$i][1];
110
110
}
111
111
$token = $tokens[$i];
@@ -122,7 +122,7 @@ protected function findClass($file)
122
122
if (T_DOUBLE_COLON === $tokens[$j][0] || T_NEW === $tokens[$j][0]) {
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