Skip to content

Commit

Permalink
Fixed incorrect null phpdoc types
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Jul 31, 2020
1 parent c2c04dc commit c7053c0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/AstRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
* is similar to data returned from json_decode
* using associative arrays rather than objects.
*
* @return mixed|null Returns the matching data or null
* @return mixed Returns the matching data or null
*/
public function __invoke($expression, $data)
{
Expand Down
6 changes: 3 additions & 3 deletions src/CompilerRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class CompilerRuntime
private $interpreter;

/**
* @param string $dir Directory used to store compiled PHP files.
* @param Parser $parser JMESPath parser to utilize
* @param string|null $dir Directory used to store compiled PHP files.
* @param Parser|null $parser JMESPath parser to utilize
* @throws \RuntimeException if the cache directory cannot be created
*/
public function __construct($dir = null, Parser $parser = null)
Expand All @@ -46,7 +46,7 @@ public function __construct($dir = null, Parser $parser = null)
* is similar to data returned from json_decode
* using associative arrays rather than objects.
*
* @return mixed|null Returns the matching data or null
* @return mixed Returns the matching data or null
* @throws \RuntimeException
*/
public function __invoke($expression, $data)
Expand Down
2 changes: 1 addition & 1 deletion src/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class Env
* @param string $expression JMESPath expression to evaluate
* @param mixed $data JSON-like data to search
*
* @return mixed|null Returns the matching data or null
* @return mixed Returns the matching data or null
*/
public static function search($expression, $data)
{
Expand Down
2 changes: 1 addition & 1 deletion src/JmesPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @param string $expression Expression to search.
* @param mixed $data Data to search.
*
* @return mixed|null
* @return mixed
*/
if (!function_exists(__NAMESPACE__ . '\search')) {
function search($expression, $data)
Expand Down
2 changes: 1 addition & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Parser
];

/**
* @param Lexer $lexer Lexer used to tokenize expressions
* @param Lexer|null $lexer Lexer used to tokenize expressions
*/
public function __construct(Lexer $lexer = null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/TreeInterpreter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class TreeInterpreter
private $fnDispatcher;

/**
* @param callable $fnDispatcher Function dispatching function that accepts
* a function name argument and an array of
* function arguments and returns the result.
* @param callable|null $fnDispatcher Function dispatching function that accepts
* a function name argument and an array of
* function arguments and returns the result.
*/
public function __construct(callable $fnDispatcher = null)
{
Expand Down

0 comments on commit c7053c0

Please sign in to comment.