Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function createService(ServiceLocatorInterface $serviceLocator) |
||
23 | { |
||
24 | $objectManager = $serviceLocator->get('JhFlexiTime\ObjectManager'); |
||
25 | $hydrator = new DoctrineHydrator($objectManager, 'JhFlexiTime\Entity\Booking'); |
||
26 | $hydrator->addStrategy('user', new UserStrategy($serviceLocator->get('JhUser\Repository\UserRepository'))); |
||
27 | |||
28 | return new BookingService( |
||
29 | $serviceLocator->get('FlexiOptions'), |
||
30 | $serviceLocator->get('JhFlexiTime\Repository\BookingRepository'), |
||
31 | $objectManager, |
||
32 | $serviceLocator->get('JhFlexiTime\Service\PeriodService'), |
||
33 | $hydrator, |
||
34 | $serviceLocator->get('InputFilterManager')->get('JhFlexiTime\InputFilter\BookingInputFilter') |
||
35 | ); |
||
36 | } |
||
37 | } |
||
38 |
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: