@@ -173,7 +173,7 @@ public function setPool(PoolInterface $pool): void
173
173
* @param array $key the key to set for this cache item
174
174
* @param string $namespace the namespace for this cache item
175
175
*/
176
- public function setKey (array $ key , string $ namespace = null ): void
176
+ public function setKey (array $ key , ? string $ namespace = null ): void
177
177
{
178
178
$ this ->namespace = $ namespace ;
179
179
@@ -360,7 +360,7 @@ public function isMiss(): bool
360
360
* @param int $ttl time to live
361
361
* @return bool
362
362
*/
363
- public function lock (int $ ttl = null ): bool
363
+ public function lock (? int $ ttl = null ): bool
364
364
{
365
365
if ($ this ->isDisabled ()) {
366
366
return true ;
@@ -407,7 +407,7 @@ public function set(mixed $value): static
407
407
* @param int|\DateInterval|\DateTimeInterface|null $ttl time to live
408
408
* @return \Stash\Item
409
409
*/
410
- public function setTTL (int |\DateInterval |\DateTimeInterface $ ttl = null ): static
410
+ public function setTTL (int |\DateInterval |\DateTimeInterface | null $ ttl = null ): static
411
411
{
412
412
if (is_numeric ($ ttl ) || ($ ttl instanceof \DateInterval)) {
413
413
return $ this ->expiresAfter ($ ttl );
@@ -427,7 +427,7 @@ public function setTTL(int|\DateInterval|\DateTimeInterface $ttl = null): static
427
427
* @throws \Stash\Exception\InvalidArgumentException
428
428
* @return \Stash\Item
429
429
*/
430
- public function expiresAt (int |\DateInterval |\DateTimeInterface $ expiration = null ): static
430
+ public function expiresAt (int |\DateInterval |\DateTimeInterface | null $ expiration = null ): static
431
431
{
432
432
if (!is_null ($ expiration ) && !($ expiration instanceof \DateTimeInterface)) {
433
433
# For compatbility with PHP 5.4 we also allow inheriting from the DateTime object.
@@ -526,10 +526,10 @@ protected function executeSet(mixed $data, int|\DateTimeInterface|null $time): b
526
526
/**
527
527
* {@inheritdoc}
528
528
*
529
- * @param int|\DateInterval $ttl time to live
529
+ * @param int|\DateInterval|null $ttl time to live
530
530
* @return \Stash\Item|false
531
531
*/
532
- public function extend (int |\DateInterval $ ttl = null ): \Stash \Item |bool
532
+ public function extend (int |\DateInterval | null $ ttl = null ): \Stash \Item |bool
533
533
{
534
534
if ($ this ->isDisabled ()) {
535
535
return false ;
0 commit comments