1 | <?php |
||
13 | class Blade |
||
14 | { |
||
15 | /** |
||
16 | * Array of view base directories. |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $viewPaths; |
||
21 | |||
22 | /** |
||
23 | * Local path to blade cache storage. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $cachePath; |
||
28 | |||
29 | /** |
||
30 | * Service container instance. |
||
31 | * |
||
32 | * @var Container |
||
33 | */ |
||
34 | protected $container; |
||
35 | |||
36 | /** |
||
37 | * View factory instance. |
||
38 | * |
||
39 | * @var Factory |
||
40 | */ |
||
41 | protected $viewFactory; |
||
42 | |||
43 | /** |
||
44 | * Constructor. |
||
45 | * |
||
46 | * @param array $viewPaths |
||
47 | * @param string $cachePath |
||
48 | * @param Container $container |
||
49 | */ |
||
50 | public function __construct($viewPaths = [], $cachePath, $container) |
||
62 | |||
63 | /** |
||
64 | * Getter for view factory. |
||
65 | * |
||
66 | * @return Factory |
||
67 | */ |
||
68 | public function view() |
||
72 | |||
73 | /** |
||
74 | * Register filesystem in container. |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | public function registerFilesystem() |
||
84 | |||
85 | /** |
||
86 | * Register events in container. |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | public function registerEvents() |
||
96 | |||
97 | /** |
||
98 | * Register the engine resolver instance. |
||
99 | * |
||
100 | * @return void |
||
101 | */ |
||
102 | public function registerEngineResolver() |
||
115 | |||
116 | /** |
||
117 | * Register the PHP engine implementation. |
||
118 | * |
||
119 | * @param EngineResolver $resolver |
||
120 | * |
||
121 | * @return void |
||
122 | */ |
||
123 | public function registerPhpEngine($resolver) |
||
129 | |||
130 | /** |
||
131 | * Register the Blade engine implementation. |
||
132 | * |
||
133 | * @param EngineResolver $resolver |
||
134 | * |
||
135 | * @return void |
||
136 | */ |
||
137 | public function registerBladeEngine($resolver) |
||
152 | |||
153 | /** |
||
154 | * Register the view factory. |
||
155 | */ |
||
156 | public function registerFactory() |
||
168 | |||
169 | /** |
||
170 | * Register the view finder implementation. |
||
171 | * |
||
172 | * @return void |
||
173 | */ |
||
174 | public function registerViewFinder() |
||
183 | } |
||
184 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.