| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 16 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 18 | public function createService(ServiceLocatorInterface $serviceLocator) | ||
| 19 |     { | ||
| 20 |         $userMapper = $serviceLocator->get('zfcuser_user_mapper'); | ||
| 21 |         $authService = $serviceLocator->get('zfcuser_auth_service'); | ||
| 22 |         $registerForm = $serviceLocator->get('zfcuser_register_form'); | ||
| 23 |         $options = $serviceLocator->get('zfcuser_module_options'); | ||
| 24 |         $formHydrator = $serviceLocator->get('zfcuser_user_hydrator'); | ||
| 25 | |||
| 26 | return new UserService( | ||
| 27 | $userMapper, | ||
|  | |||
| 28 | $authService, | ||
| 29 | $registerForm, | ||
| 30 | $options, | ||
| 31 | $formHydrator | ||
| 32 | ); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | 
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: