Skip to content

Commit e0f6764

Browse files
committed
Changed private static array-properties to const
1 parent 8076be7 commit e0f6764

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
@@ -66,7 +66,7 @@ class PropertyAccessor implements PropertyAccessorInterface
6666
private $propertyPathCache = [];
6767
private $readPropertyCache = [];
6868
private $writePropertyCache = [];
69-
private static $resultProto = [self::VALUE => null];
69+
private const RESULT_PROTO = [self::VALUE => null];
7070

7171
/**
7272
* Should not be used by application code. Use
@@ -355,7 +355,7 @@ private function readIndex(array $zval, $index): array
355355
throw new NoSuchIndexException(sprintf('Cannot read index "%s" from object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, \get_class($zval[self::VALUE])));
356356
}
357357

358-
$result = self::$resultProto;
358+
$result = self::RESULT_PROTO;
359359

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

386-
$result = self::$resultProto;
386+
$result = self::RESULT_PROTO;
387387
$object = $zval[self::VALUE];
388388
$access = $this->getReadAccessInfo(\get_class($object), $property);
389389

0 commit comments

Comments
 (0)