@@ -92,7 +92,7 @@ class PropertyAccessor implements PropertyAccessorInterface
92
92
* @param int $throw A bitwise combination of the THROW_* constants
93
93
* to specify when exceptions should be thrown
94
94
*/
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 )
96
96
{
97
97
$ this ->magicMethodsFlags = $ magicMethods ;
98
98
$ this ->ignoreInvalidIndices = 0 === ($ throw & self ::THROW_ON_INVALID_INDEX );
@@ -200,7 +200,7 @@ public function setValue(object|array &$objectOrArray, string|PropertyPathInterf
200
200
}
201
201
}
202
202
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
204
204
{
205
205
if (!isset ($ trace [$ i ]['file ' ]) || __FILE__ !== $ trace [$ i ]['file ' ]) {
206
206
return ;
@@ -662,7 +662,7 @@ private function getPropertyPath(string|PropertyPath $propertyPath): PropertyPat
662
662
*
663
663
* @throws \LogicException When the Cache Component isn't available
664
664
*/
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
666
666
{
667
667
if (!class_exists (ApcuAdapter::class)) {
668
668
throw new \LogicException (sprintf ('The Symfony Cache component must be installed to use "%s()". ' , __METHOD__ ));
0 commit comments