diff --git a/Classes/S3Storage.php b/Classes/S3Storage.php index ec24935..9e369eb 100644 --- a/Classes/S3Storage.php +++ b/Classes/S3Storage.php @@ -345,7 +345,7 @@ public function getStreamByResourcePath($relativePath) * @param callable|null $callback Function called after each iteration * @return \Generator */ - public function getObjects(callable $callback = null) + public function getObjects(?callable $callback = null) { foreach ($this->resourceManager->getCollectionsByStorage($this) as $collection) { yield from $this->getObjectsByCollection($collection, $callback); @@ -360,7 +360,7 @@ public function getObjects(callable $callback = null) * @return \Generator * @api */ - public function getObjectsByCollection(CollectionInterface $collection, callable $callback = null) + public function getObjectsByCollection(CollectionInterface $collection, ?callable $callback = null) { $iteration = 0; $iterator = $this->resourceRepository->findByCollectionNameIterator($collection->getName()); diff --git a/Classes/S3Target.php b/Classes/S3Target.php index d41f390..5e6479a 100644 --- a/Classes/S3Target.php +++ b/Classes/S3Target.php @@ -242,7 +242,7 @@ public function getAcl() * @throws \Neos\Flow\Exception * @throws \Exception */ - public function publishCollection(CollectionInterface $collection, callable $callback = null) + public function publishCollection(CollectionInterface $collection, ?callable $callback = null) { $storage = $collection->getStorage(); @@ -307,7 +307,7 @@ public function publishCollection(CollectionInterface $collection, callable $cal * @param array $potentiallyObsoleteObjects * @param callable|null $callback */ - private function publishCollectionFromS3Storage(CollectionInterface $collection, S3Storage $storage, array &$potentiallyObsoleteObjects, callable $callback = null): void + private function publishCollectionFromS3Storage(CollectionInterface $collection, S3Storage $storage, array &$potentiallyObsoleteObjects, ?callable $callback = null): void { foreach ($collection->getObjects($callback) as $object) { /** @var StorageObject $object */