| 1 | <?php |
||
| 11 | class RelativeScanner |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Return all sections (app & plugins) with an Template directory. |
||
| 15 | * |
||
| 16 | * @return array |
||
| 17 | */ |
||
| 18 | public static function all() |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Return all templates for a given plugin. |
||
| 25 | * |
||
| 26 | * @param string $plugin The plugin to find all templates for. |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public static function plugin($plugin) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Strip the absolute path of template's paths for all given sections. |
||
| 39 | * |
||
| 40 | * @param string $sections Sections to iterate over. |
||
| 41 | * |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | 4 | protected static function strip($sections) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Strip the absolute path of template's paths. |
||
| 54 | * |
||
| 55 | * @param array $paths Paths to strip. |
||
| 56 | * @param string|null $plugin Hold plugin name or null for App. |
||
| 57 | * |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | 2 | protected static function stripAbsolutePath(array $paths, $plugin = null) |
|
| 72 | } |
||
| 73 |
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: