Skip to content

Commit 0877c59

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 d88bfcc + b4a4ae3 commit 0877c59

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

ExpressionFunction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getEvaluator(): \Closure
7070
* @throws \InvalidArgumentException if given PHP function name is in namespace
7171
* and expression function name is not defined
7272
*/
73-
public static function fromPhp(string $phpFunctionName, string $expressionFunctionName = null): self
73+
public static function fromPhp(string $phpFunctionName, ?string $expressionFunctionName = null): self
7474
{
7575
$phpFunctionName = ltrim($phpFunctionName, '\\');
7676
if (!\function_exists($phpFunctionName)) {

ExpressionLanguage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ExpressionLanguage
3434
/**
3535
* @param ExpressionFunctionProviderInterface[] $providers
3636
*/
37-
public function __construct(CacheItemPoolInterface $cache = null, array $providers = [])
37+
public function __construct(?CacheItemPoolInterface $cache = null, array $providers = [])
3838
{
3939
$this->cache = $cache ?? new ArrayAdapter();
4040
$this->registerFunctions();

Node/ArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct()
2727
$this->index = -1;
2828
}
2929

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

SyntaxError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class SyntaxError extends \LogicException
1515
{
16-
public function __construct(string $message, int $cursor = 0, string $expression = '', string $subject = null, array $proposals = null)
16+
public function __construct(string $message, int $cursor = 0, string $expression = '', ?string $subject = null, ?array $proposals = null)
1717
{
1818
$message = sprintf('%s around position %d', rtrim($message, '.'), $cursor);
1919
if ($expression) {

Tests/ExpressionLanguageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public function testNullSafeCompileFails($expression, $foo)
366366

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

369-
set_error_handler(static function (int $errno, string $errstr, string $errfile = null, int $errline = null): bool {
369+
set_error_handler(static function (int $errno, string $errstr, ?string $errfile = null, ?int $errline = null): bool {
370370
if ($errno & (\E_WARNING | \E_USER_WARNING) && (str_contains($errstr, 'Attempt to read property') || str_contains($errstr, 'Trying to access'))) {
371371
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
372372
}

Tests/ParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public function testNameProposal()
284284
/**
285285
* @dataProvider getLintData
286286
*/
287-
public function testLint($expression, $names, string $exception = null)
287+
public function testLint($expression, $names, ?string $exception = null)
288288
{
289289
if ($exception) {
290290
$this->expectException(SyntaxError::class);

Token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __toString(): string
5151
/**
5252
* Tests the current token for a type and/or a value.
5353
*/
54-
public function test(string $type, string $value = null): bool
54+
public function test(string $type, ?string $value = null): bool
5555
{
5656
return $this->type === $type && (null === $value || $this->value == $value);
5757
}

TokenStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function next(): void
5656
/**
5757
* @param string|null $message The syntax error message
5858
*/
59-
public function expect(string $type, string $value = null, string $message = null): void
59+
public function expect(string $type, ?string $value = null, ?string $message = null): void
6060
{
6161
$token = $this->current;
6262
if (!$token->test($type, $value)) {

0 commit comments

Comments
 (0)