1 | <?php |
||||||
2 | declare(strict_types=1); |
||||||
3 | |||||||
4 | namespace Bdelespierre\LaravelBladeLinter\Backend; |
||||||
5 | |||||||
6 | use Bdelespierre\LaravelBladeLinter\Backend; |
||||||
7 | use Bdelespierre\LaravelBladeLinter\ErrorRecord; |
||||||
8 | use function ast\parse_code; |
||||||
0 ignored issues
–
show
introduced
by
![]() |
|||||||
9 | |||||||
10 | final class ExtAst implements Backend |
||||||
11 | { |
||||||
12 | public function __construct( |
||||||
13 | private int $astVersion = 85 |
||||||
14 | ) { |
||||||
15 | } |
||||||
16 | |||||||
17 | /** |
||||||
18 | * @param \SplFileInfo $file |
||||||
19 | * @param string $code |
||||||
20 | * @return list<ErrorRecord> |
||||||
0 ignored issues
–
show
The type
Bdelespierre\LaravelBladeLinter\Backend\list was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||
21 | */ |
||||||
22 | public function analyze(\SplFileInfo $file, string $code): array |
||||||
23 | { |
||||||
24 | try { |
||||||
25 | parse_code($code, $this->astVersion); |
||||||
0 ignored issues
–
show
The function
parse_code was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
26 | } catch (\ParseError $e) { |
||||||
27 | return [ |
||||||
0 ignored issues
–
show
|
|||||||
28 | new ErrorRecord( |
||||||
29 | 'Parse error: ' . $e->getMessage(), |
||||||
30 | $file->getPathname(), |
||||||
31 | $e->getLine() |
||||||
32 | ) |
||||||
33 | ]; |
||||||
34 | } |
||||||
35 | |||||||
36 | return []; |
||||||
0 ignored issues
–
show
|
|||||||
37 | } |
||||||
38 | |||||||
39 | public static function name(): string |
||||||
40 | { |
||||||
41 | return 'ext-ast'; |
||||||
42 | } |
||||||
43 | } |
||||||
44 |