Skip to content

Commit 2d4fca6

Browse files
Merge branch '6.4' into 7.0
* 6.4: Fix implicitly-required parameters 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 [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents 0055b23 + d757159 commit 2d4fca6

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Command/LintCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class LintCommand extends Command
4242
private ?\Closure $directoryIteratorProvider;
4343
private ?\Closure $isReadableProvider;
4444

45-
public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null)
45+
public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null)
4646
{
4747
parent::__construct($name);
4848

@@ -124,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
124124
return $this->display($io, $filesInfo);
125125
}
126126

127-
private function validate(string $content, int $flags, string $file = null): array
127+
private function validate(string $content, int $flags, ?string $file = null): array
128128
{
129129
$prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
130130
if (\E_USER_DEPRECATED === $level) {

Exception/ParseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ParseException extends RuntimeException
2929
* @param string|null $snippet The snippet of code near the problem
3030
* @param string|null $parsedFile The file name where the error occurred
3131
*/
32-
public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
32+
public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null)
3333
{
3434
$this->parsedFile = $parsedFile;
3535
$this->parsedLine = $parsedLine;

Inline.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Inline
3434
private static bool $objectForMap = false;
3535
private static bool $constantSupport = false;
3636

37-
public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null): void
37+
public static function initialize(int $flags, ?int $parsedLineNumber = null, ?string $parsedFilename = null): void
3838
{
3939
self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags);
4040
self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags);
@@ -267,7 +267,7 @@ private static function dumpNull(int $flags): string
267267
*
268268
* @throws ParseException When malformed inline YAML string is parsed
269269
*/
270-
public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null): mixed
270+
public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], ?bool &$isQuoted = null): mixed
271271
{
272272
if (\in_array($scalar[$i], ['"', "'"], true)) {
273273
// quoted scalar
@@ -556,7 +556,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
556556
*
557557
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
558558
*/
559-
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null): mixed
559+
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], ?bool &$isQuotedString = null): mixed
560560
{
561561
$isQuotedString = false;
562562
$scalar = trim($scalar);

Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ private function getCurrentLineIndentation(): int
556556
*
557557
* @throws ParseException When indentation problem are detected
558558
*/
559-
private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string
559+
private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = false): string
560560
{
561561
$oldLineIndentation = $this->getCurrentLineIndentation();
562562

@@ -1038,7 +1038,7 @@ private function isStringUnIndentedCollectionItem(): bool
10381038
*
10391039
* @internal
10401040
*/
1041-
public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int
1041+
public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
10421042
{
10431043
if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
10441044
throw new ParseException(preg_last_error_msg());

0 commit comments

Comments
 (0)