Skip to content

Commit

Permalink
Simplify test bootstrap file.
Browse files Browse the repository at this point in the history
Removed version check for PHP 8 to always set AttributeReader. This enhances code readability and ensures consistent behavior across all PHP versions.
  • Loading branch information
koriym committed Nov 26, 2024
1 parent 35b4dd9 commit c2daf9f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@

array_map('unlink', glob(__DIR__ . '/tests/tmp/*.php'));

Check failure on line 8 in tests/bootstrap.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Parameter #2 $array of function array_map expects array, list<string>|false given.

Check failure on line 8 in tests/bootstrap.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Parameter #2 $array of function array_map expects array, list<string>|false given.

// no annotation in PHP 8
if (PHP_MAJOR_VERSION >= 8) { // @phpstan-ignore-line
ServiceLocator::setReader(new AttributeReader());
}
ServiceLocator::setReader(new AttributeReader());

0 comments on commit c2daf9f

Please sign in to comment.