Skip to content

Commit 2b80944

Browse files
authored
Apply PHP CS Fixer changes (#507)
1 parent dc3d5d1 commit 2b80944

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

Command/CheckMissingCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private function countEmptyTranslations(MessageCatalogueInterface $catalogue): i
136136
foreach ($catalogue->getDomains() as $domain) {
137137
$emptyTranslations = array_filter(
138138
$catalogue->all($domain),
139-
function (string $message = null): bool {
139+
function (?string $message = null): bool {
140140
return null === $message || '' === $message;
141141
}
142142
);

Controller/SymfonyProfilerController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function syncAction(Request $request, string $token): Response
9595
}
9696

9797
/**
98-
* @return \Symfony\Component\HttpFoundation\RedirectResponse|Response
98+
* @return RedirectResponse|Response
9999
*/
100100
public function syncAllAction(Request $request, string $token): Response
101101
{

Controller/WebUIController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(
7676
/**
7777
* Show a dashboard for the configuration.
7878
*/
79-
public function indexAction(string $configName = null): Response
79+
public function indexAction(?string $configName = null): Response
8080
{
8181
if (!$this->isWebUIEnabled) {
8282
return new Response('You are not allowed here. Check your config.', Response::HTTP_BAD_REQUEST);

EditInPlace/Activator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function deactivate(): void
8181
}
8282
}
8383

84-
public function checkRequest(Request $request = null): bool
84+
public function checkRequest(?Request $request = null): bool
8585
{
8686
if (null === $this->getSession() || !$this->getSession()->has(self::KEY)) {
8787
return false;

EditInPlace/ActivatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ interface ActivatorInterface
2121
/**
2222
* Tells if the Edit In Place mode is enabled for this request.
2323
*/
24-
public function checkRequest(Request $request = null): bool;
24+
public function checkRequest(?Request $request = null): bool;
2525
}

EventListener/AutoAddMissingTranslations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class AutoAddMissingTranslations
3131
*/
3232
private $storage;
3333

34-
public function __construct(StorageService $storage, DataCollectorTranslator $translator = null)
34+
public function __construct(StorageService $storage, ?DataCollectorTranslator $translator = null)
3535
{
3636
$this->dataCollector = $translator;
3737
$this->storage = $storage;

Service/CacheClearer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(string $kernelCacheDir, $translator, Filesystem $fil
5858
*
5959
* @param string|null $locale optional filter to clear only one locale
6060
*/
61-
public function clearAndWarmUp(string $locale = null): void
61+
public function clearAndWarmUp(?string $locale = null): void
6262
{
6363
$translationDir = sprintf('%s/translations', $this->kernelCacheDir);
6464

Tests/Unit/Translator/EditInPlaceTranslatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function __construct(bool $enabled = true)
113113
$this->enabled = $enabled;
114114
}
115115

116-
public function checkRequest(Request $request = null): bool
116+
public function checkRequest(?Request $request = null): bool
117117
{
118118
return $this->enabled;
119119
}

Twig/TranslationExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getNodeVisitors(): array
7171
return $visitors;
7272
}
7373

74-
public function transchoiceWithDefault(string $message, string $defaultMessage, int $count, array $arguments = [], string $domain = null, string $locale = null): string
74+
public function transchoiceWithDefault(string $message, string $defaultMessage, int $count, array $arguments = [], ?string $domain = null, ?string $locale = null): string
7575
{
7676
if (null === $domain) {
7777
$domain = 'messages';

0 commit comments

Comments
 (0)