Skip to content

Commit

Permalink
refactor: PHPStan cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Feb 17, 2024
1 parent 2383aa9 commit da64bbe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/models/SitemapTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public function render(array $params = []): string
$existingJobId = $cache->get($queueJobCacheKey);
// Make sure the queue uses the Craft web interface
if ($existingJobId && $queue instanceof QueueInterface) {
$queue = Craft::$app->getQueue();
$queue->release($existingJobId);
$cache->delete($queueJobCacheKey);
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/Sitemaps.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public function anyEntryTypeHasSitemapUrls(MetaBundle $metaBundle): bool
$seoElement = Seomatic::$plugin->seoElements->getSeoElementByMetaBundleType($metaBundle->sourceBundleType);
if ($seoElement) {
if (!empty($seoElement::typeMenuFromHandle($metaBundle->sourceHandle))) {
/** @var Section|null $section */
$section = $seoElement::sourceModelFromHandle($metaBundle->sourceHandle);
/** @var Section $section */
if ($section !== null) {
$entryTypes = $section->getEntryTypes();
// Fetch each meta bundle for each entry type to see if _any_ of them have sitemap URLs
Expand Down

0 comments on commit da64bbe

Please sign in to comment.