Skip to content

Commit

Permalink
Add debug statements for namespace parsing
Browse files Browse the repository at this point in the history
Inserted var_dump() calls to display the namespace and namespaceResult variables. This will assist in debugging issues related to namespace parsing in the ClassName.php file.
  • Loading branch information
koriym committed Nov 4, 2024
1 parent 7a4a679 commit 2d64b80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ClassName.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public static function from(string $filePath): ?string
/** @var string */

Check failure on line 59 in src/ClassName.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Invalid inline documentation comment format "@var string", expected "@var type $variableName Optional description".
$namespace = $namespaceResult[0];
$position = $namespaceResult[1];
var_dump("ns:$namespace");

Check failure on line 62 in src/ClassName.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

ForbiddenCode: Unsafe var_dump
var_dump("namespaceResult:$namespaceResult");

Check failure on line 63 in src/ClassName.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Part $namespaceResult (array{string, int}) of encapsed string cannot be cast to string.

Check failure on line 63 in src/ClassName.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

ForbiddenCode: Unsafe var_dump

Check failure on line 63 in src/ClassName.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

InvalidCast: list{string, int} cannot be cast to string

continue 2;
case T_CLASS:
$className = self::parseClassName($tokens, $position + 1, $count);
Expand Down

0 comments on commit 2d64b80

Please sign in to comment.