1 | <?php |
||
16 | class SingleBookingInMonth extends AbstractFixture |
||
17 | { |
||
18 | /** |
||
19 | * @var \DateTime |
||
20 | */ |
||
21 | protected $date; |
||
22 | |||
23 | /** |
||
24 | * @var User |
||
25 | */ |
||
26 | protected $user; |
||
27 | |||
28 | /** |
||
29 | * @var Booking |
||
30 | */ |
||
31 | protected $booking; |
||
32 | |||
33 | /** |
||
34 | * @param User $user |
||
35 | * @param DateTime $date |
||
36 | */ |
||
37 | public function __construct(User $user, DateTime $date) |
||
42 | |||
43 | /** |
||
44 | * {inheritDoc} |
||
45 | */ |
||
46 | public function load(ObjectManager $manager) |
||
60 | |||
61 | /** |
||
62 | * @return Booking |
||
63 | */ |
||
64 | public function getBooking() |
||
68 | } |
||
69 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.