Skip to content

Apply PHP CS Fixer changes #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Command/CheckMissingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private function countEmptyTranslations(MessageCatalogueInterface $catalogue): i
foreach ($catalogue->getDomains() as $domain) {
$emptyTranslations = array_filter(
$catalogue->all($domain),
function (string $message = null): bool {
function (?string $message = null): bool {
return null === $message || '' === $message;
}
);
Expand Down
2 changes: 1 addition & 1 deletion Controller/SymfonyProfilerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function syncAction(Request $request, string $token): Response
}

/**
* @return \Symfony\Component\HttpFoundation\RedirectResponse|Response
* @return RedirectResponse|Response
*/
public function syncAllAction(Request $request, string $token): Response
{
Expand Down
2 changes: 1 addition & 1 deletion Controller/WebUIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct(
/**
* Show a dashboard for the configuration.
*/
public function indexAction(string $configName = null): Response
public function indexAction(?string $configName = null): Response
{
if (!$this->isWebUIEnabled) {
return new Response('You are not allowed here. Check your config.', Response::HTTP_BAD_REQUEST);
Expand Down
2 changes: 1 addition & 1 deletion EditInPlace/Activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function deactivate(): void
}
}

public function checkRequest(Request $request = null): bool
public function checkRequest(?Request $request = null): bool
{
if (null === $this->getSession() || !$this->getSession()->has(self::KEY)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion EditInPlace/ActivatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ interface ActivatorInterface
/**
* Tells if the Edit In Place mode is enabled for this request.
*/
public function checkRequest(Request $request = null): bool;
public function checkRequest(?Request $request = null): bool;
}
2 changes: 1 addition & 1 deletion EventListener/AutoAddMissingTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class AutoAddMissingTranslations
*/
private $storage;

public function __construct(StorageService $storage, DataCollectorTranslator $translator = null)
public function __construct(StorageService $storage, ?DataCollectorTranslator $translator = null)
{
$this->dataCollector = $translator;
$this->storage = $storage;
Expand Down
2 changes: 1 addition & 1 deletion Service/CacheClearer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct(string $kernelCacheDir, $translator, Filesystem $fil
*
* @param string|null $locale optional filter to clear only one locale
*/
public function clearAndWarmUp(string $locale = null): void
public function clearAndWarmUp(?string $locale = null): void
{
$translationDir = sprintf('%s/translations', $this->kernelCacheDir);

Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Translator/EditInPlaceTranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function __construct(bool $enabled = true)
$this->enabled = $enabled;
}

public function checkRequest(Request $request = null): bool
public function checkRequest(?Request $request = null): bool
{
return $this->enabled;
}
Expand Down
2 changes: 1 addition & 1 deletion Twig/TranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getNodeVisitors(): array
return $visitors;
}

public function transchoiceWithDefault(string $message, string $defaultMessage, int $count, array $arguments = [], string $domain = null, string $locale = null): string
public function transchoiceWithDefault(string $message, string $defaultMessage, int $count, array $arguments = [], ?string $domain = null, ?string $locale = null): string
{
if (null === $domain) {
$domain = 'messages';
Expand Down
Loading