diff --git a/src/Contract/StaticPublishingTrigger.php b/src/Contract/StaticPublishingTrigger.php index 2bd76eb1..6472c882 100644 --- a/src/Contract/StaticPublishingTrigger.php +++ b/src/Contract/StaticPublishingTrigger.php @@ -15,7 +15,7 @@ interface StaticPublishingTrigger * @param array $context An associative array with extra engine-specific information. * @return array|SS_List */ - public function objectsToUpdate(array $context); + public function objectsToUpdate($context); /** * Provides a SS_list of objects that need to be deleted. @@ -23,5 +23,5 @@ public function objectsToUpdate(array $context); * @param array $context An associative array with extra engine-specific information. * @return array|SS_List */ - public function objectsToDelete(array $context); + public function objectsToDelete($context); } diff --git a/src/Contract/StaticallyPublishable.php b/src/Contract/StaticallyPublishable.php index 022938f7..2d730e51 100644 --- a/src/Contract/StaticallyPublishable.php +++ b/src/Contract/StaticallyPublishable.php @@ -22,5 +22,5 @@ interface StaticallyPublishable * * @return array associative array of URL (string) => Priority (int) */ - public function urlsToCache(): array; + public function urlsToCache(); } diff --git a/src/Extension/Engine/SiteTreePublishingEngine.php b/src/Extension/Engine/SiteTreePublishingEngine.php index d0154645..660d9d24 100644 --- a/src/Extension/Engine/SiteTreePublishingEngine.php +++ b/src/Extension/Engine/SiteTreePublishingEngine.php @@ -8,7 +8,6 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\Core\Resettable; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\SS_List; use SilverStripe\StaticPublishQueue\Contract\StaticPublishingTrigger; use SilverStripe\StaticPublishQueue\Extension\Publishable\PublishableSiteTree; use SilverStripe\StaticPublishQueue\Job\DeleteStaticCacheJob; @@ -35,8 +34,10 @@ class SiteTreePublishingEngine extends SiteTreeExtension implements Resettable /** * Queued job service injection property * Used for unit tests only to cover edge cases where Injector doesn't cover + * + * @var QueuedJobService|null */ - protected static ?QueuedJobService $queueService = null; + protected static $queueService = null; /** * Queues the urls to be flushed into the queue. @@ -165,8 +166,11 @@ public function onAfterUnpublish() /** * Collect all changes for the given context. + * + * @param array $context + * @return void */ - public function collectChanges(array $context): void + public function collectChanges($context) { Environment::increaseMemoryLimitTo(); Environment::increaseTimeLimitTo(); diff --git a/src/Extension/Publishable/PublishableSiteTree.php b/src/Extension/Publishable/PublishableSiteTree.php index 071f55cd..6013666e 100644 --- a/src/Extension/Publishable/PublishableSiteTree.php +++ b/src/Extension/Publishable/PublishableSiteTree.php @@ -40,7 +40,7 @@ public function getMyVirtualPages() /** * @return array|SS_List */ - public function objectsToUpdate(array $context) + public function objectsToUpdate($context) { $list = []; $siteTree = $this->getOwner(); @@ -91,7 +91,7 @@ public function objectsToUpdate(array $context) * * @return array|SS_List */ - public function objectsToDelete(array $context) + public function objectsToDelete($context) { // This context isn't one of our valid actions, so there's nothing to do here if ($context['action'] !== SiteTreePublishingEngine::ACTION_UNPUBLISH) { @@ -130,8 +130,10 @@ public function objectsToDelete(array $context) /** * The only URL belonging to this object is its own URL. + * + * @return array */ - public function urlsToCache(): array + public function urlsToCache() { $page = $this->getOwner();