1 | <?php |
||
11 | abstract class AbstractLoader |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $path; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $resolvedPath = null; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | protected $useIncludePath = false; |
||
27 | |||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $returnConfigObject = false; |
||
32 | |||
33 | /** |
||
34 | * Constructor. |
||
35 | * |
||
36 | * @param string $path A path where to look for resources |
||
37 | */ |
||
38 | 1 | public function __construct($path) |
|
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 1 | public function getPath() |
|
50 | |||
51 | /** |
||
52 | * @param string $path |
||
53 | */ |
||
54 | 1 | public function setPath($path) |
|
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | 1 | public function getResolvedPath() |
|
70 | |||
71 | /** |
||
72 | * @param string $resolvedPath |
||
73 | */ |
||
74 | 1 | public function setResolvedPath($resolvedPath) |
|
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | abstract protected function resolvePath(); |
||
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | 1 | public function getResult() |
|
93 | |||
94 | /** |
||
95 | * @return string |
||
96 | */ |
||
97 | abstract protected function getData(); |
||
98 | |||
99 | /** |
||
100 | * @return boolean |
||
101 | */ |
||
102 | 1 | public function returnConfigObject() |
|
106 | |||
107 | /** |
||
108 | * @param boolean $useIncludePath |
||
109 | */ |
||
110 | 1 | public function setUseIncludePath($useIncludePath) |
|
114 | |||
115 | /** |
||
116 | * @return boolean |
||
117 | */ |
||
118 | public function useIncludePath() |
||
122 | |||
123 | /** |
||
124 | * @param boolean $returnConfigObject |
||
125 | */ |
||
126 | 1 | public function setReturnConfigObject($returnConfigObject) |
|
130 | } |
||
131 |
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: