Skip to content

Commit f88ed76

Browse files
committed
Ran php-cs-fixer
1 parent f17d5e0 commit f88ed76

25 files changed

Lines changed: 39 additions & 39 deletions

scripts/create-redirector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

@@ -14,16 +14,16 @@
1414

1515
$shellOutput = \shell_exec('git tag');
1616
$tags = \explode("\n", $shellOutput);
17-
$tags = \array_filter($tags, function ($tag) {
17+
$tags = \array_filter($tags, static function ($tag) {
1818
return '' !== \trim($tag);
1919
});
2020

2121
// We remove all non-stable versions from the list as we don't want to direct the docs to them by default
22-
$tags = \array_filter($tags, function ($tag) {
22+
$tags = \array_filter($tags, static function ($tag) {
2323
return false === \mb_strpos($tag, '-');
2424
});
2525

26-
\usort($tags, function ($a, $b) {
26+
\usort($tags, static function ($a, $b) {
2727
return \version_compare($b, $a);
2828
});
2929

scripts/php-cs-fixer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

@@ -12,7 +12,7 @@
1212
use PhpCsFixer\Config;
1313
use PhpCsFixer\Finder;
1414

15-
return function (string $packageName, bool $usePhp7, array $directories, array $exclude = []): Config {
15+
return static function (string $packageName, bool $usePhp7, array $directories, array $exclude = []): Config {
1616
$year = \date('Y');
1717

1818
$fileHeaderComment = <<<COMMENT
@@ -34,7 +34,7 @@
3434
$rules = [
3535
'@Symfony' => true,
3636
'@Symfony:risky' => true,
37-
'@PHP80Migration' => true,
37+
'@PHP8x0Migration' => true,
3838
'array_syntax' => [
3939
'syntax' => 'short',
4040
],

src/Cache/Delivery/CacheClearer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

src/Cache/Delivery/CacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

src/Command/Delivery/DebugCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

@@ -102,7 +102,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
102102
'Locales (%d)',
103103
\count($environment->getLocales())
104104
));
105-
$data = \array_map(function (Locale $locale) {
105+
$data = \array_map(static function (Locale $locale) {
106106
return [
107107
$locale->getId(),
108108
$locale->getName(),
@@ -120,7 +120,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
120120
'Content types (%d)',
121121
\count($contentTypes)
122122
));
123-
$data = \array_map(function (ContentType $contentType) use ($entries) {
123+
$data = \array_map(static function (ContentType $contentType) use ($entries) {
124124
return [
125125
$contentType->getId(),
126126
$contentType->getName(),

src/Command/Delivery/InfoCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

@@ -45,7 +45,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4545
return 0;
4646
}
4747

48-
$data = \array_map(function (array $item, string $name) {
48+
$data = \array_map(static function (array $item, string $name) {
4949
return [
5050
$name,
5151
$item['service'],

src/ContentfulBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

src/Controller/Delivery/ProfilerController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

src/DataCollector/Delivery/ClientDataCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

@@ -76,14 +76,14 @@ public function getRequestCount(): int
7676

7777
public function getTotalDuration(): float
7878
{
79-
return \array_reduce($this->data['messages'], function (float $carry, Message $message) {
79+
return \array_reduce($this->data['messages'], static function (float $carry, Message $message) {
8080
return $carry + $message->getDuration();
8181
}, 0.0);
8282
}
8383

8484
public function getErrorCount(): int
8585
{
86-
return \array_reduce($this->data['messages'], function (int $carry, Message $message) {
86+
return \array_reduce($this->data['messages'], static function (int $carry, Message $message) {
8787
return $carry + ($message->isError() ? 1 : 0);
8888
}, 0);
8989
}

src/DependencyInjection/ClientFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the contentful/contentful-bundle package.
55
*
6-
* @copyright 2015-2025 Contentful GmbH
6+
* @copyright 2015-2026 Contentful GmbH
77
* @license MIT
88
*/
99

0 commit comments

Comments
 (0)