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 7d63ccd + 89f6dc6 commit b4a4ae3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ExpressionFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getEvaluator(): \Closure
* @throws \InvalidArgumentException if given PHP function name is in namespace
* and expression function name is not defined
*/
public static function fromPhp(string $phpFunctionName, string $expressionFunctionName = null): self
public static function fromPhp(string $phpFunctionName, ?string $expressionFunctionName = null): self
{
$phpFunctionName = ltrim($phpFunctionName, '\\');
if (!\function_exists($phpFunctionName)) {
Expand Down
2 changes: 1 addition & 1 deletion ExpressionLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ExpressionLanguage
/**
* @param ExpressionFunctionProviderInterface[] $providers
*/
public function __construct(CacheItemPoolInterface $cache = null, array $providers = [])
public function __construct(?CacheItemPoolInterface $cache = null, array $providers = [])
{
$this->cache = $cache ?? new ArrayAdapter();
$this->registerFunctions();
Expand Down
2 changes: 1 addition & 1 deletion Node/ArrayNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct()
$this->index = -1;
}

public function addElement(Node $value, Node $key = null): void
public function addElement(Node $value, ?Node $key = null): void
{
$key ??= new ConstantNode(++$this->index);

Expand Down
2 changes: 1 addition & 1 deletion SyntaxError.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class SyntaxError extends \LogicException
{
public function __construct(string $message, int $cursor = 0, string $expression = '', string $subject = null, array $proposals = null)
public function __construct(string $message, int $cursor = 0, string $expression = '', ?string $subject = null, ?array $proposals = null)
{
$message = sprintf('%s around position %d', rtrim($message, '.'), $cursor);
if ($expression) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/ExpressionLanguageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public function testNullSafeCompileFails($expression, $foo)

$this->expectException(\ErrorException::class);

set_error_handler(static function (int $errno, string $errstr, string $errfile = null, int $errline = null): bool {
set_error_handler(static function (int $errno, string $errstr, ?string $errfile = null, ?int $errline = null): bool {
if ($errno & (\E_WARNING | \E_USER_WARNING) && (str_contains($errstr, 'Attempt to read property') || str_contains($errstr, 'Trying to access'))) {
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function testNameProposal()
/**
* @dataProvider getLintData
*/
public function testLint($expression, $names, string $exception = null)
public function testLint($expression, $names, ?string $exception = null)
{
if ($exception) {
$this->expectException(SyntaxError::class);
Expand Down
2 changes: 1 addition & 1 deletion Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __toString(): string
/**
* Tests the current token for a type and/or a value.
*/
public function test(string $type, string $value = null): bool
public function test(string $type, ?string $value = null): bool
{
return $this->type === $type && (null === $value || $this->value == $value);
}
Expand Down
2 changes: 1 addition & 1 deletion TokenStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function next()
*
* @return void
*/
public function expect(string $type, string $value = null, string $message = null)
public function expect(string $type, ?string $value = null, ?string $message = null)
{
$token = $this->current;
if (!$token->test($type, $value)) {
Expand Down

0 comments on commit b4a4ae3

Please sign in to comment.