Skip to content

Commit

Permalink
Add missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
jakublabno committed Oct 14, 2022
1 parent 6d00952 commit c01d7d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Dissect/Lexer/Recognizer/Recognizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ interface Recognizer
*
* @return boolean Whether the match was successful or not.
*/
public function match(string $string, string &$result): bool;
public function match(string $string, ?string &$result): bool;
}
2 changes: 1 addition & 1 deletion src/Dissect/Lexer/Recognizer/RegexRecognizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(string $regex)
/**
* {@inheritDoc}
*/
public function match(string $string, string &$result): bool
public function match(string $string, ?string &$result): bool
{
$r = preg_match($this->regex, $string, $match, PREG_OFFSET_CAPTURE);

Expand Down

0 comments on commit c01d7d3

Please sign in to comment.