| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function __construct( |
||
| 22 | PaymentMethodViewFactoryInterface $paymentMethodViewFactory, |
||
| 23 | PriceViewFactoryInterface $priceViewFactory, |
||
| 24 | string $paymentViewClass |
||
| 25 | ) { |
||
| 26 | $this->paymentMethodViewFactory = $paymentMethodViewFactory; |
||
| 27 | $this->priceViewFactory = $priceViewFactory; |
||
| 28 | $this->paymentViewClass = $paymentViewClass; |
||
| 29 | } |
||
| 30 | |||
| 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.