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 patch-6 # Please enter a commit message to explain why this

merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored,
and an empty message aborts # the commit.
  • Loading branch information
bocharsky-bw committed Jun 13, 2024
2 parents 8c1e575 + 2b80944 commit 9c885de
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2']
php: ['8.1', '8.2', '8.3', '8.4']
strategy: [ 'highest' ]
sf_version: ['']
include:
- php: 8.0
- php: 8.1
strategy: 'lowest'

steps:
Expand Down
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 9c885de

Please sign in to comment.