Skip to content

Commit d757159

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 4f9237a + 8ab9bb6 commit d757159

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

@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
127127
return $this->display($io, $filesInfo);
128128
}
129129

130-
private function validate(string $content, int $flags, string $file = null): array
130+
private function validate(string $content, int $flags, ?string $file = null): array
131131
{
132132
$prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
133133
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
@@ -561,7 +561,7 @@ private function getCurrentLineIndentation(): int
561561
*
562562
* @throws ParseException When indentation problem are detected
563563
*/
564-
private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string
564+
private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = false): string
565565
{
566566
$oldLineIndentation = $this->getCurrentLineIndentation();
567567

@@ -1043,7 +1043,7 @@ private function isStringUnIndentedCollectionItem(): bool
10431043
*
10441044
* @internal
10451045
*/
1046-
public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int
1046+
public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
10471047
{
10481048
if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
10491049
throw new ParseException(preg_last_error_msg());

0 commit comments

Comments
 (0)