Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 65fe7b4

Browse files
committed
Use short array deconstruction syntax.
1 parent c87adf3 commit 65fe7b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

DebugClassLoader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
300300
$hasCall = $refl->hasMethod('__call');
301301
$hasStaticCall = $refl->hasMethod('__callStatic');
302302
foreach (self::$method[$use] as $method) {
303-
list($interface, $name, $static, $description) = $method;
303+
[$interface, $name, $static, $description] = $method;
304304
if ($static ? $hasStaticCall : $hasCall) {
305305
continue;
306306
}
@@ -335,12 +335,12 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
335335
}
336336

337337
if ($parent && isset(self::$finalMethods[$parent][$method->name])) {
338-
list($declaringClass, $message) = self::$finalMethods[$parent][$method->name];
338+
[$declaringClass, $message] = self::$finalMethods[$parent][$method->name];
339339
$deprecations[] = sprintf('The "%s::%s()" method is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
340340
}
341341

342342
if (isset(self::$internalMethods[$class][$method->name])) {
343-
list($declaringClass, $message) = self::$internalMethods[$class][$method->name];
343+
[$declaringClass, $message] = self::$internalMethods[$class][$method->name];
344344
if (strncmp($ns, $declaringClass, $len)) {
345345
$deprecations[] = sprintf('The "%s::%s()" method is considered internal%s. It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
346346
}
@@ -388,7 +388,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
388388
$definedParameters[$parameter->name] = true;
389389
}
390390
}
391-
foreach ($matches as list(, $parameterType, $parameterName)) {
391+
foreach ($matches as [, $parameterType, $parameterName]) {
392392
if (!isset($definedParameters[$parameterName])) {
393393
$parameterType = trim($parameterType);
394394
self::$annotatedParameters[$class][$method->name][$parameterName] = sprintf('The "%%s::%s()" method will require a new "%s$%s" argument in the next major version of its %s "%s", not defining it is deprecated.', $method->name, $parameterType ? $parameterType.' ' : '', $parameterName, interface_exists($class) ? 'interface' : 'parent class', $method->class);

0 commit comments

Comments
 (0)