1 | <?php |
||
8 | final class PaymentViewFactory implements PaymentViewFactoryInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var PaymentMethodViewFactoryInterface |
||
12 | */ |
||
13 | private $paymentMethodViewFactory; |
||
14 | |||
15 | /** |
||
16 | * @var PriceViewFactoryInterface |
||
17 | */ |
||
18 | private $priceViewFactory; |
||
19 | |||
20 | /** |
||
21 | * @param PaymentMethodViewFactoryInterface $paymentMethodViewFactory |
||
22 | * @param PriceViewFactoryInterface $priceViewFactory |
||
23 | */ |
||
24 | public function __construct(PaymentMethodViewFactoryInterface $paymentMethodViewFactory, PriceViewFactoryInterface $priceViewFactory) |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function create(PaymentInterface $payment, $locale) |
||
43 | } |
||
44 |
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.