Skip to content

Commit 8ab9bb6

Browse files
Merge branch '5.4' into 6.3
* 5.4: 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 3493af8 + e78db7f commit 8ab9bb6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
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: 4 additions & 4 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);
@@ -55,7 +55,7 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
5555
*
5656
* @throws ParseException
5757
*/
58-
public static function parse(string $value = null, int $flags = 0, array &$references = []): mixed
58+
public static function parse(?string $value = null, int $flags = 0, array &$references = []): mixed
5959
{
6060
if (null === $value) {
6161
return '';
@@ -271,7 +271,7 @@ private static function dumpNull(int $flags): string
271271
*
272272
* @throws ParseException When malformed inline YAML string is parsed
273273
*/
274-
public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null): mixed
274+
public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], ?bool &$isQuoted = null): mixed
275275
{
276276
if (\in_array($scalar[$i], ['"', "'"], true)) {
277277
// quoted scalar
@@ -560,7 +560,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
560560
*
561561
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
562562
*/
563-
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null): mixed
563+
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], ?bool &$isQuotedString = null): mixed
564564
{
565565
$isQuotedString = false;
566566
$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)