Skip to content

Commit

Permalink
Update src/ClassesInDirectories.php
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
koriym and coderabbitai[bot] authored Nov 2, 2024
1 parent aac63b5 commit a0a4437
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ClassesInDirectories.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ private static function extractNamespace(array $tokens): string|null
/** @param array<int, mixed> $tokens */
private static function extractClassName(array $tokens): string|null
{
$typeTokens = [T_CLASS, T_INTERFACE, T_TRAIT];

Check failure on line 112 in src/ClassesInDirectories.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Constant T_TRAIT should not be referenced via a fallback global name, but via a use statement.

Check failure on line 112 in src/ClassesInDirectories.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Constant T_TRAIT should not be referenced via a fallback global name, but via a use statement.
foreach ($tokens as $index => $token) {
assert(is_array($token));
if ($token[0] !== T_CLASS && $token[0] !== T_INTERFACE) {
if (! in_array($token[0], $typeTokens, true)) {

Check failure on line 115 in src/ClassesInDirectories.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Function in_array() should not be referenced via a fallback global name, but via a use statement.

Check failure on line 115 in src/ClassesInDirectories.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Function in_array() should not be referenced via a fallback global name, but via a use statement.
continue;
}

Expand Down

0 comments on commit a0a4437

Please sign in to comment.