Skip to content

Commit c149d49

Browse files
Merge branch '6.3' into 6.4
* 6.3: minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
2 parents 0b1eb47 + 5c67cd1 commit c149d49

26 files changed

+37
-37
lines changed

Command/XliffLintCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class XliffLintCommand extends Command
4141
private ?\Closure $isReadableProvider;
4242
private bool $requireStrictFileNames;
4343

44-
public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null, bool $requireStrictFileNames = true)
44+
public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null, bool $requireStrictFileNames = true)
4545
{
4646
parent::__construct($name);
4747

@@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
109109
return $this->display($io, $filesInfo);
110110
}
111111

112-
private function validate(string $content, string $file = null): array
112+
private function validate(string $content, ?string $file = null): array
113113
{
114114
$errors = [];
115115

DataCollector/TranslationDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function lateCollect(): void
4242
$this->data = $this->cloneVar($this->data);
4343
}
4444

45-
public function collect(Request $request, Response $response, \Throwable $exception = null): void
45+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
4646
{
4747
$this->data['locale'] = $this->translator->getLocale();
4848
$this->data['fallback_locales'] = $this->translator->getFallbackLocales();

DataCollectorTranslator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(TranslatorInterface $translator)
4040
$this->translator = $translator;
4141
}
4242

43-
public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string
43+
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
4444
{
4545
$trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale);
4646
$this->collectMessage($locale, $domain, $id, $trans, $parameters);
@@ -61,7 +61,7 @@ public function getLocale(): string
6161
return $this->translator->getLocale();
6262
}
6363

64-
public function getCatalogue(string $locale = null): MessageCatalogueInterface
64+
public function getCatalogue(?string $locale = null): MessageCatalogueInterface
6565
{
6666
return $this->translator->getCatalogue($locale);
6767
}
@@ -71,7 +71,7 @@ public function getCatalogues(): array
7171
return $this->translator->getCatalogues();
7272
}
7373

74-
public function warmUp(string $cacheDir, string $buildDir = null): array
74+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
7575
{
7676
if ($this->translator instanceof WarmableInterface) {
7777
return (array) $this->translator->warmUp($cacheDir, $buildDir);

Dumper/XliffFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ?
214214
return $dom->saveXML();
215215
}
216216

217-
private function hasMetadataArrayInfo(string $key, array $metadata = null): bool
217+
private function hasMetadataArrayInfo(string $key, ?array $metadata = null): bool
218218
{
219219
return is_iterable($metadata[$key] ?? null);
220220
}

Exception/IncompleteDsnException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class IncompleteDsnException extends InvalidArgumentException
1515
{
16-
public function __construct(string $message, string $dsn = null, \Throwable $previous = null)
16+
public function __construct(string $message, ?string $dsn = null, ?\Throwable $previous = null)
1717
{
1818
if ($dsn) {
1919
$message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message;

Exception/MissingRequiredOptionException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
class MissingRequiredOptionException extends IncompleteDsnException
1818
{
19-
public function __construct(string $option, string $dsn = null, \Throwable $previous = null)
19+
public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null)
2020
{
2121
$message = sprintf('The option "%s" is required but missing.', $option);
2222

Exception/ProviderException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ProviderException extends RuntimeException implements ProviderExceptionInt
2121
private ResponseInterface $response;
2222
private string $debug;
2323

24-
public function __construct(string $message, ResponseInterface $response, int $code = 0, \Exception $previous = null)
24+
public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null)
2525
{
2626
$this->response = $response;
2727
$this->debug = $response->getInfo('debug') ?? '';

Exception/UnsupportedSchemeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class UnsupportedSchemeException extends LogicException
3535
],
3636
];
3737

38-
public function __construct(Dsn $dsn, string $name = null, array $supported = [])
38+
public function __construct(Dsn $dsn, ?string $name = null, array $supported = [])
3939
{
4040
$provider = $dsn->getScheme();
4141
if (false !== $pos = strpos($provider, '+')) {

Extractor/PhpStringTokenParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static function parse(string $str): string
9494
* @param string $str String without quotes
9595
* @param string|null $quote Quote type
9696
*/
97-
public static function parseEscapeSequences(string $str, string $quote = null): string
97+
public static function parseEscapeSequences(string $str, ?string $quote = null): string
9898
{
9999
if (null !== $quote) {
100100
$str = str_replace('\\'.$quote, $quote, $str);

Extractor/Visitor/AbstractVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function nodeFirstNamedArgumentIndex(Node\Expr\CallLike|Node\Attribute
8181
return \PHP_INT_MAX;
8282
}
8383

84-
private function getStringNamedArguments(Node\Expr\CallLike|Node\Attribute $node, string $argumentName = null, bool $isArgumentNamePattern = false): array
84+
private function getStringNamedArguments(Node\Expr\CallLike|Node\Attribute $node, ?string $argumentName = null, bool $isArgumentNamePattern = false): array
8585
{
8686
$args = $node instanceof Node\Expr\CallLike ? $node->getArgs() : $node->args;
8787
$argumentValues = [];

0 commit comments

Comments
 (0)