| 1 | <?php |
||
| 10 | final class PaymentViewFactory implements PaymentViewFactoryInterface |
||
| 11 | { |
||
| 12 | /** @var PaymentMethodViewFactoryInterface */ |
||
| 13 | private $paymentMethodViewFactory; |
||
| 14 | |||
| 15 | /** @var PriceViewFactoryInterface */ |
||
| 16 | private $priceViewFactory; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | private $paymentViewClass; |
||
| 20 | |||
| 21 | public function __construct( |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | public function create(PaymentInterface $payment, string $locale): PaymentView |
||
| 45 | } |
||
| 46 |
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.