Skip to content

Commit d59441c

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent 5015895 commit d59441c

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

ExpressionFunction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getEvaluator()
8181
* @throws \InvalidArgumentException if given PHP function name is in namespace
8282
* and expression function name is not defined
8383
*/
84-
public static function fromPhp(string $phpFunctionName, string $expressionFunctionName = null)
84+
public static function fromPhp(string $phpFunctionName, ?string $expressionFunctionName = null)
8585
{
8686
$phpFunctionName = ltrim($phpFunctionName, '\\');
8787
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)
30+
public function addElement(Node $value, ?Node $key = null)
3131
{
3232
if (null === $key) {
3333
$key = new ConstantNode(++$this->index);

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/ParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function testNameProposal()
243243
/**
244244
* @dataProvider getLintData
245245
*/
246-
public function testLint($expression, $names, string $exception = null)
246+
public function testLint($expression, $names, ?string $exception = null)
247247
{
248248
if ($exception) {
249249
$this->expectException(SyntaxError::class);

Token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __toString()
5656
*
5757
* @return bool
5858
*/
59-
public function test(string $type, string $value = null)
59+
public function test(string $type, ?string $value = null)
6060
{
6161
return $this->type === $type && (null === $value || $this->value == $value);
6262
}

TokenStream.php

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

0 commit comments

Comments
 (0)