Skip to content

Commit

Permalink
[TASK] Run PHP-CS-Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Oct 23, 2023
1 parent 784bd76 commit a5cf584
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ private function initSubMenus(): void
if ($itemName === self::ITEM_MODE_SITE) {
$languages = array_filter(
$languages,
fn (Core\Site\Entity\SiteLanguage $siteLanguage): bool => $this->canWarmupCachesOfSite($siteLanguage)
fn(Core\Site\Entity\SiteLanguage $siteLanguage): bool => $this->canWarmupCachesOfSite($siteLanguage)
);
} else {
$languages = array_filter(
$languages,
fn (Core\Site\Entity\SiteLanguage $siteLanguage): bool => Utility\AccessUtility::canWarmupCacheOfPage(
fn(Core\Site\Entity\SiteLanguage $siteLanguage): bool => Utility\AccessUtility::canWarmupCacheOfPage(
(int)$this->identifier,
$siteLanguage->getLanguageId(),
)
Expand Down
2 changes: 1 addition & 1 deletion Classes/Cache/SitemapsCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function get(

return array_values(
array_map(
static fn (string $sitemapUrl) => new Sitemap\SiteAwareSitemap(
static fn(string $sitemapUrl) => new Sitemap\SiteAwareSitemap(
new Core\Http\Uri($sitemapUrl),
$site,
$siteLanguage ?? $site->getDefaultLanguage(),
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/WarmupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function configure(): void
' │ It can be defined via the extension configuration <info>strategy</info> or by using the <info>--strategy</info> option.',
' │ The following strategies are currently available:',
...array_map(
static fn (string $strategy) => ' │ * <info>' . $strategy . '</info>',
static fn(string $strategy) => ' │ * <info>' . $strategy . '</info>',
array_keys($this->crawlingStrategyFactory->getAll()),
),
' ├─ Default: <info>' . ($this->configuration->getStrategy() ?? 'none') . '</info>',
Expand Down
4 changes: 2 additions & 2 deletions Classes/Result/CacheWarmupResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getCrawlingResultsBySite(
'successful' => array_values(
array_filter(
$this->result->getSuccessful(),
fn (CacheWarmup\Result\CrawlingResult $crawlingResult) => $this->filterBySite(
fn(CacheWarmup\Result\CrawlingResult $crawlingResult) => $this->filterBySite(
$crawlingResult,
$site,
$siteLanguage,
Expand All @@ -74,7 +74,7 @@ public function getCrawlingResultsBySite(
'failed' => array_values(
array_filter(
$this->result->getFailed(),
fn (CacheWarmup\Result\CrawlingResult $crawlingResult) => $this->filterBySite(
fn(CacheWarmup\Result\CrawlingResult $crawlingResult) => $this->filterBySite(
$crawlingResult,
$site,
$siteLanguage,
Expand Down
2 changes: 1 addition & 1 deletion Classes/Sitemap/Provider/RobotsTxtProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function get(

return array_values(
array_map(
static fn (string $url) => new Sitemap\SiteAwareSitemap(
static fn(string $url) => new Sitemap\SiteAwareSitemap(
new Core\Http\Uri($url),
$site,
$siteLanguage ?? $site->getDefaultLanguage(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function setUp(): void

$this->subject = new Src\Crawler\Strategy\CrawlingStrategyFactory(
new DependencyInjection\ServiceLocator([
'dummy' => static fn (): Tests\Unit\Fixtures\DummyCrawlingStrategy => new Tests\Unit\Fixtures\DummyCrawlingStrategy(),
'dummy' => static fn(): Tests\Unit\Fixtures\DummyCrawlingStrategy => new Tests\Unit\Fixtures\DummyCrawlingStrategy(),
]),
);
}
Expand Down

0 comments on commit a5cf584

Please sign in to comment.