Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
2 parents 4f9237a + 8ab9bb6 commit d757159
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LintCommand extends Command
private ?\Closure $directoryIteratorProvider;
private ?\Closure $isReadableProvider;

public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null)
public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null)
{
parent::__construct($name);

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

private function validate(string $content, int $flags, string $file = null): array
private function validate(string $content, int $flags, ?string $file = null): array
{
$prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
if (\E_USER_DEPRECATED === $level) {
Expand Down
2 changes: 1 addition & 1 deletion Exception/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ParseException extends RuntimeException
* @param string|null $snippet The snippet of code near the problem
* @param string|null $parsedFile The file name where the error occurred
*/
public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null)
{
$this->parsedFile = $parsedFile;
$this->parsedLine = $parsedLine;
Expand Down
6 changes: 3 additions & 3 deletions Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Inline
private static bool $objectForMap = false;
private static bool $constantSupport = false;

public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null): void
public static function initialize(int $flags, ?int $parsedLineNumber = null, ?string $parsedFilename = null): void
{
self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags);
self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags);
Expand Down Expand Up @@ -267,7 +267,7 @@ private static function dumpNull(int $flags): string
*
* @throws ParseException When malformed inline YAML string is parsed
*/
public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null): mixed
public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], ?bool &$isQuoted = null): mixed
{
if (\in_array($scalar[$i], ['"', "'"], true)) {
// quoted scalar
Expand Down Expand Up @@ -556,7 +556,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
*
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
*/
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null): mixed
private static function evaluateScalar(string $scalar, int $flags, array &$references = [], ?bool &$isQuotedString = null): mixed
{
$isQuotedString = false;
$scalar = trim($scalar);
Expand Down
4 changes: 2 additions & 2 deletions Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ private function getCurrentLineIndentation(): int
*
* @throws ParseException When indentation problem are detected
*/
private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string
private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = false): string
{
$oldLineIndentation = $this->getCurrentLineIndentation();

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

0 comments on commit d757159

Please sign in to comment.