Skip to content

Commit

Permalink
Merge branch 'master' of github.com:php-translation/symfony-bundle in…
Browse files Browse the repository at this point in the history
…to bump-to-php81
  • Loading branch information
bocharsky-bw committed Apr 11, 2024
2 parents 22a98b6 + 2b80944 commit bad00c2
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
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

0 comments on commit bad00c2

Please sign in to comment.