The code doesn't work - $engine is undefined (but that works as null), $path is also undefined and that fails.
$linter is overwritten a few lines below.
$ bin/test app/
PHP Fatal error: Uncaught TypeError: Latte\Tools\Linter::scanDirectory(): Argument #1 ($path) must be of type string, null given, called in /{path_to_project}/bin/test on line 8 and defined in /{path_to_project}/vendor/latte/latte/src/Tools/Linter.php:28
Stack trace:
#0 /{path_to_project}/bin/test(8): Latte\Tools\Linter->scanDirectory()
#1 {main}
thrown in /{path_to_project}/vendor/latte/latte/src/Tools/Linter.php on line 28
Steps To Reproduce
Create the custom latte-lint file and run it (minding the example addExtension code - either add some or disable it).
Docs affected:
Bug Description
The code doesn't work -
$engine
is undefined (but that works asnull
),$path
is also undefined and that fails.$linter
is overwritten a few lines below.Steps To Reproduce
Create the custom latte-lint file and run it (minding the example addExtension code - either add some or disable it).
Expected Behavior
Linter runs and reports found errors.
Possible Solution
Remove those two lines.