1 | <?php |
||
13 | final class RelativeScanner |
||
14 | { |
||
15 | /** |
||
16 | * Return all sections (app & plugins) with an Template directory. |
||
17 | * |
||
18 | * @return array |
||
19 | */ |
||
20 | 3 | public static function all(): array |
|
24 | |||
25 | /** |
||
26 | * Return all templates for a given plugin. |
||
27 | * |
||
28 | * @param string $plugin The plugin to find all templates for. |
||
29 | * |
||
30 | * @return mixed |
||
31 | */ |
||
32 | 2 | public static function plugin($plugin) |
|
38 | |||
39 | /** |
||
40 | * Strip the absolute path of template's paths for all given sections. |
||
41 | * |
||
42 | * @param string $sections Sections to iterate over. |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | 5 | protected static function strip($sections): array |
|
54 | |||
55 | /** |
||
56 | * Strip the absolute path of template's paths. |
||
57 | * |
||
58 | * @param array $paths Paths to strip. |
||
59 | * @param string|null $plugin Hold plugin name or null for App. |
||
60 | * |
||
61 | * @return array |
||
62 | */ |
||
63 | 5 | protected static function stripAbsolutePath(array $paths, $plugin = null): array |
|
81 | } |
||
82 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: