Skip to content

Commit c7053c0

Browse files
Fixed incorrect null phpdoc types
1 parent c2c04dc commit c7053c0

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/AstRuntime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
* is similar to data returned from json_decode
3030
* using associative arrays rather than objects.
3131
*
32-
* @return mixed|null Returns the matching data or null
32+
* @return mixed Returns the matching data or null
3333
*/
3434
public function __invoke($expression, $data)
3535
{

src/CompilerRuntime.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class CompilerRuntime
1919
private $interpreter;
2020

2121
/**
22-
* @param string $dir Directory used to store compiled PHP files.
23-
* @param Parser $parser JMESPath parser to utilize
22+
* @param string|null $dir Directory used to store compiled PHP files.
23+
* @param Parser|null $parser JMESPath parser to utilize
2424
* @throws \RuntimeException if the cache directory cannot be created
2525
*/
2626
public function __construct($dir = null, Parser $parser = null)
@@ -46,7 +46,7 @@ public function __construct($dir = null, Parser $parser = null)
4646
* is similar to data returned from json_decode
4747
* using associative arrays rather than objects.
4848
*
49-
* @return mixed|null Returns the matching data or null
49+
* @return mixed Returns the matching data or null
5050
* @throws \RuntimeException
5151
*/
5252
public function __invoke($expression, $data)

src/Env.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class Env
2020
* @param string $expression JMESPath expression to evaluate
2121
* @param mixed $data JSON-like data to search
2222
*
23-
* @return mixed|null Returns the matching data or null
23+
* @return mixed Returns the matching data or null
2424
*/
2525
public static function search($expression, $data)
2626
{

src/JmesPath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @param string $expression Expression to search.
88
* @param mixed $data Data to search.
99
*
10-
* @return mixed|null
10+
* @return mixed
1111
*/
1212
if (!function_exists(__NAMESPACE__ . '\search')) {
1313
function search($expression, $data)

src/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Parser
5555
];
5656

5757
/**
58-
* @param Lexer $lexer Lexer used to tokenize expressions
58+
* @param Lexer|null $lexer Lexer used to tokenize expressions
5959
*/
6060
public function __construct(Lexer $lexer = null)
6161
{

src/TreeInterpreter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ class TreeInterpreter
1010
private $fnDispatcher;
1111

1212
/**
13-
* @param callable $fnDispatcher Function dispatching function that accepts
14-
* a function name argument and an array of
15-
* function arguments and returns the result.
13+
* @param callable|null $fnDispatcher Function dispatching function that accepts
14+
* a function name argument and an array of
15+
* function arguments and returns the result.
1616
*/
1717
public function __construct(callable $fnDispatcher = null)
1818
{

0 commit comments

Comments
 (0)