@@ -92,7 +92,7 @@ class PropertyAccessor implements PropertyAccessorInterface
9292 * @param int $throw A bitwise combination of the THROW_* constants
9393 * to specify when exceptions should be thrown
9494 */
95- public function __construct (int $ magicMethods = self ::MAGIC_GET | self ::MAGIC_SET , int $ throw = self ::THROW_ON_INVALID_PROPERTY_PATH , CacheItemPoolInterface $ cacheItemPool = null , PropertyReadInfoExtractorInterface $ readInfoExtractor = null , PropertyWriteInfoExtractorInterface $ writeInfoExtractor = null )
95+ public function __construct (int $ magicMethods = self ::MAGIC_GET | self ::MAGIC_SET , int $ throw = self ::THROW_ON_INVALID_PROPERTY_PATH , ? CacheItemPoolInterface $ cacheItemPool = null , ? PropertyReadInfoExtractorInterface $ readInfoExtractor = null , ? PropertyWriteInfoExtractorInterface $ writeInfoExtractor = null )
9696 {
9797 $ this ->magicMethodsFlags = $ magicMethods ;
9898 $ this ->ignoreInvalidIndices = 0 === ($ throw & self ::THROW_ON_INVALID_INDEX );
@@ -200,7 +200,7 @@ public function setValue(object|array &$objectOrArray, string|PropertyPathInterf
200200 }
201201 }
202202
203- private static function throwInvalidArgumentException (string $ message , array $ trace , int $ i , string $ propertyPath , \Throwable $ previous = null ): void
203+ private static function throwInvalidArgumentException (string $ message , array $ trace , int $ i , string $ propertyPath , ? \Throwable $ previous = null ): void
204204 {
205205 if (!isset ($ trace [$ i ]['file ' ]) || __FILE__ !== $ trace [$ i ]['file ' ]) {
206206 return ;
@@ -662,7 +662,7 @@ private function getPropertyPath(string|PropertyPath $propertyPath): PropertyPat
662662 *
663663 * @throws \LogicException When the Cache Component isn't available
664664 */
665- public static function createCache (string $ namespace , int $ defaultLifetime , string $ version , LoggerInterface $ logger = null ): AdapterInterface
665+ public static function createCache (string $ namespace , int $ defaultLifetime , string $ version , ? LoggerInterface $ logger = null ): AdapterInterface
666666 {
667667 if (!class_exists (ApcuAdapter::class)) {
668668 throw new \LogicException (sprintf ('The Symfony Cache component must be installed to use "%s()". ' , __METHOD__ ));
0 commit comments