Skip to content

Commit 3b305a2

Browse files
committed
Use short array deconstruction syntax.
1 parent 3d97341 commit 3b305a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PropertyAccessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ private static function throwInvalidArgumentException(string $message, array $tr
202202
}
203203

204204
if (preg_match('/^\S+::\S+\(\): Argument #\d+ \(\$\S+\) must be of type (\S+), (\S+) given/', $message, $matches)) {
205-
list(, $expectedType, $actualType) = $matches;
205+
[, $expectedType, $actualType] = $matches;
206206

207207
throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous);
208208
}
@@ -392,7 +392,7 @@ private function readProperty(array $zval, string $property, bool $ignoreInvalid
392392
try {
393393
$result[self::VALUE] = $object->{$access[self::ACCESS_NAME]}();
394394
} catch (\TypeError $e) {
395-
list($trace) = $e->getTrace();
395+
[$trace] = $e->getTrace();
396396

397397
// handle uninitialized properties in PHP >= 7
398398
if (__FILE__ === $trace['file']

0 commit comments

Comments
 (0)