1 | <?php |
||
37 | class Commander |
||
38 | { |
||
39 | /** |
||
40 | * The entity namespace. |
||
41 | */ |
||
42 | const ENTITY_NAMESPACE = 'GravityMedia\Commander\ORM'; |
||
43 | |||
44 | /** |
||
45 | * @var Config |
||
46 | */ |
||
47 | protected $config; |
||
48 | |||
49 | /** |
||
50 | * The cache. |
||
51 | * |
||
52 | * @var Cache |
||
53 | */ |
||
54 | protected $cache; |
||
55 | |||
56 | /** |
||
57 | * The mapping driver. |
||
58 | * |
||
59 | * @var MappingDriver |
||
60 | */ |
||
61 | protected $mappingDriver; |
||
62 | |||
63 | /** |
||
64 | * The entity manager config. |
||
65 | * |
||
66 | * @var Configuration |
||
67 | */ |
||
68 | protected $entityManagerConfig; |
||
69 | |||
70 | /** |
||
71 | * The entity manager. |
||
72 | * |
||
73 | * @var EntityManagerInterface |
||
74 | */ |
||
75 | protected $entityManager; |
||
76 | |||
77 | /** |
||
78 | * The schema validator. |
||
79 | * |
||
80 | * @var SchemaValidator |
||
81 | */ |
||
82 | protected $schemaValidator; |
||
83 | |||
84 | /** |
||
85 | * The schema tool. |
||
86 | * |
||
87 | * @var SchemaTool |
||
88 | */ |
||
89 | protected $schemaTool; |
||
90 | |||
91 | /** |
||
92 | * The logger. |
||
93 | * |
||
94 | * @var LoggerInterface |
||
95 | */ |
||
96 | protected $logger; |
||
97 | |||
98 | /** |
||
99 | * The task manager. |
||
100 | * |
||
101 | * @var TaskManager |
||
102 | */ |
||
103 | protected $taskManager; |
||
104 | |||
105 | /** |
||
106 | * Create commander object. |
||
107 | * |
||
108 | * @param Config $config |
||
109 | */ |
||
110 | public function __construct(Config $config) |
||
114 | |||
115 | /** |
||
116 | * Get cache. |
||
117 | * |
||
118 | * @return Cache |
||
119 | */ |
||
120 | public function getCache() |
||
135 | |||
136 | /** |
||
137 | * Get mapping driver. |
||
138 | * |
||
139 | * @return MappingDriver |
||
140 | */ |
||
141 | public function getMappingDriver() |
||
161 | |||
162 | /** |
||
163 | * Get entity manager config. |
||
164 | * |
||
165 | * @return Configuration |
||
166 | */ |
||
167 | public function getEntityManagerConfig() |
||
190 | |||
191 | /** |
||
192 | * Get entity manager. |
||
193 | * |
||
194 | * @return EntityManagerInterface |
||
195 | */ |
||
196 | public function getEntityManager() |
||
220 | |||
221 | /** |
||
222 | * Get schema validator. |
||
223 | * |
||
224 | * @return SchemaValidator |
||
225 | */ |
||
226 | public function getSchemaValidator() |
||
236 | |||
237 | /** |
||
238 | * Get schema tool. |
||
239 | * |
||
240 | * @return SchemaTool |
||
241 | */ |
||
242 | public function getSchemaTool() |
||
252 | |||
253 | /** |
||
254 | * Get logger. |
||
255 | * |
||
256 | * @return LoggerInterface |
||
257 | */ |
||
258 | public function getLogger() |
||
273 | |||
274 | /** |
||
275 | * Get task manager. |
||
276 | * |
||
277 | * @return TaskManager |
||
278 | */ |
||
279 | public function getTaskManager() |
||
289 | } |
||
290 |
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: