phpro / grumphp

A PHP code-quality tool
MIT License
4.11k stars 429 forks source link

Include filename in AbstractVisitor error messages #1048

Closed dodomedia closed 1 year ago

dodomedia commented 1 year ago
Q A
Branch master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? no
Fixed tickets #1046

Changed the method getPath to getPathname to include the name of the file along with the path.

With the given example and steps to reproduce from issue #1046 the output is now the expected result.

Previous result:

[ERROR] src/resources: No "declare(strict_types = 1)" found in file!

New result:

[ERROR] src/resources/nl.php: No "declare(strict_types = 1)" found in file!

veewee commented 1 year ago

Thanks!