Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
php:
- 8.2
- 8.3
- 8.4
- 8.5

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"description": "A structured document parser.",
"type": "library",
"require": {
"php": "8.1.* || 8.2.* || 8.3.*",
"php": "8.2.* || 8.3.* || 8.4.* || 8.5.*",
"ext-libxml": "*"
},
"require-dev": {
"ext-mbstring": "*",
"phpspec/phpspec": "7.5.*",
"phpspec/phpspec": "8.2.0",
"phpunit/phpunit": "9.6.* || 10.5.*",
"friends-of-phpspec/phpspec-code-coverage": "6.3.* || 6.4.*",
"friends-of-phpspec/phpspec-code-coverage": "7.0.0",
"phpstan/phpstan": "1.10.* || 1.11.* || 1.12.*",
"phpstan/extension-installer": "1.3.* || 1.4.*",
"jangregor/phpstan-prophecy": "1.0.*"
Expand Down
2 changes: 1 addition & 1 deletion src/State/AbstractState.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class AbstractState implements StateInterface
**/
private $matchers = [];

public function registerMatcher(MatcherInterface $matcher, callable $callback = null): void
public function registerMatcher(MatcherInterface $matcher, ?callable $callback = null): void
{
$this->matchers[] = ['matcher' => $matcher, 'callback' => $callback];
}
Expand Down
2 changes: 1 addition & 1 deletion src/State/AmbiguousTokenFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(
array $calledMatchers,
array $matchedTokens,
int $code = 0,
Throwable $previous = null
?Throwable $previous = null
) {
$this->stateName = $stateName;
$this->text = $text;
Expand Down
2 changes: 1 addition & 1 deletion src/State/NoTokenFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NoTokenFoundException extends RuntimeException
*/
private $remainingText;

public function __construct(string $stateName, int $currentPosition, string $remainingText, int $code = 0, Throwable $previous = null)
public function __construct(string $stateName, int $currentPosition, string $remainingText, int $code = 0, ?Throwable $previous = null)
{
$this->stateName = $stateName;
$this->currentPosition = $currentPosition;
Expand Down