1 | <?php |
||
8 | class AliasResolver |
||
9 | { |
||
10 | use AppNamespaceDetectorTrait; |
||
11 | |||
12 | /** |
||
13 | * @var static |
||
14 | */ |
||
15 | protected static $instance; |
||
16 | |||
17 | /** |
||
18 | * @param string $apppath |
||
19 | * @param array $addons |
||
20 | * @param array $aliases |
||
21 | */ |
||
22 | 2 | public static function register($apppath, array $addons, array $aliases) |
|
28 | |||
29 | /** |
||
30 | */ |
||
31 | 2 | public static function unregister() |
|
32 | { |
||
33 | 2 | if (static::$instance) { |
|
34 | 2 | spl_autoload_unregister([static::$instance, 'load']); |
|
35 | 2 | } |
|
36 | 2 | } |
|
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $addons; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $globalClassAliases; |
||
47 | |||
48 | /** |
||
49 | * The constructor. |
||
50 | * |
||
51 | * @param string $apppath |
||
52 | * @param array $addons |
||
53 | * @param array $aliases |
||
54 | */ |
||
55 | 3 | public function __construct($apppath, array $addons, array $aliases) |
|
60 | |||
61 | /** |
||
62 | * Make addon instance for application namespace. |
||
63 | * |
||
64 | * @param string $path |
||
65 | * |
||
66 | * @return static |
||
67 | */ |
||
68 | 3 | protected function makeAppAddon($path) |
|
76 | |||
77 | /** |
||
78 | * @param string $className |
||
79 | * |
||
80 | * @return bool |
||
81 | */ |
||
82 | 1 | public function load($className) |
|
128 | } |
||
129 |
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: