Skip to content

Commit 79d273e

Browse files
Merge branch '5.1' into 5.2
* 5.1: Changed private static array-properties to const
2 parents 2756a74 + ed56673 commit 79d273e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PropertyAccessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class PropertyAccessor implements PropertyAccessorInterface
7676
private $writeInfoExtractor;
7777
private $readPropertyCache = [];
7878
private $writePropertyCache = [];
79-
private static $resultProto = [self::VALUE => null];
79+
private const RESULT_PROTO = [self::VALUE => null];
8080

8181
/**
8282
* Should not be used by application code. Use
@@ -379,7 +379,7 @@ private function readIndex(array $zval, $index): array
379379
throw new NoSuchIndexException(sprintf('Cannot read index "%s" from object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_debug_type($zval[self::VALUE])));
380380
}
381381

382-
$result = self::$resultProto;
382+
$result = self::RESULT_PROTO;
383383

384384
if (isset($zval[self::VALUE][$index])) {
385385
$result[self::VALUE] = $zval[self::VALUE][$index];
@@ -407,7 +407,7 @@ private function readProperty(array $zval, string $property, bool $ignoreInvalid
407407
throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%1$s]" instead.', $property));
408408
}
409409

410-
$result = self::$resultProto;
410+
$result = self::RESULT_PROTO;
411411
$object = $zval[self::VALUE];
412412
$class = \get_class($object);
413413
$access = $this->getReadInfo($class, $property);

0 commit comments

Comments
 (0)