1 | <?php |
||
11 | final class ShippingMethodViewFactory implements ShippingMethodViewFactoryInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var ServiceRegistry |
||
15 | */ |
||
16 | private $calculators; |
||
17 | |||
18 | /** |
||
19 | * @var PriceViewFactoryInterface |
||
20 | */ |
||
21 | private $priceViewFactory; |
||
22 | |||
23 | /** |
||
24 | * @param ServiceRegistry $calculators |
||
25 | * @param PriceViewFactoryInterface $priceViewFactory |
||
26 | */ |
||
27 | public function __construct(ServiceRegistry $calculators, PriceViewFactoryInterface $priceViewFactory) |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function create(ShipmentInterface $shipment, $locale) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function createWithShippingMethod(ShipmentInterface $shipment, ShippingMethodInterface $shippingMethod, $locale) |
||
60 | } |
||
61 |
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.