File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 99use PHPStan \Command \Output ;
1010use PHPStan \DependencyInjection \Container ;
1111use PHPStan \DependencyInjection \MissingServiceException ;
12- use function str_contains ;
13- use function str_ends_with ;
12+ use function strpos ;
13+ use function substr ;
1414
1515/**
1616 * This formatter solves the following issue https://github.com/phpstan/phpstan/issues/12328
@@ -94,7 +94,7 @@ private function filterErrors(array $errors): array
9494 private function isDeadCodeIdentifier (string $ message ): bool
9595 {
9696 foreach ($ this ->identifiers as $ identifier ) {
97- if (str_contains ($ message , $ identifier )) {
97+ if (strpos ($ message , $ identifier ) !== false ) {
9898 return true ;
9999 }
100100 }
@@ -106,7 +106,7 @@ private function isPartialAnalysis(): bool
106106 /** @var array<string> $argv */
107107 $ argv = $ _SERVER ['argv ' ] ?? [];
108108 foreach ($ argv as $ arg ) {
109- if (str_ends_with ($ arg , '.php ' ) ) {
109+ if (substr ($ arg , - 4 ) === '.php ' ) {
110110 return true ;
111111 }
112112 }
You can’t perform that action at this time.
0 commit comments