Skip to content

Commit

Permalink
Use str_starts_with()
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 24, 2023
1 parent 4f99a71 commit e90c2c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ExcludeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace SebastianBergmann\GlobalState;

use function in_array;
use function strpos;
use function str_starts_with;
use ReflectionClass;

final class ExcludeList
Expand Down Expand Up @@ -71,7 +71,7 @@ public function isStaticPropertyExcluded(string $className, string $propertyName
}

foreach ($this->classNamePrefixes as $prefix) {
if (strpos($className, $prefix) === 0) {
if (str_starts_with($className, $prefix)) {
return true;
}
}
Expand Down

0 comments on commit e90c2c6

Please sign in to comment.