| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false) |
||
| 27 | { |
||
| 28 | $element = $this->baseRenderer->render($block, $htmlRenderer, $inTightList); |
||
| 29 | |||
| 30 | $element->setContents( |
||
| 31 | $this->highlighter->highlight( |
||
| 32 | $element->getContents(), |
||
| 33 | $this->getSpecifiedLanguage($block) |
||
|
|
|||
| 34 | ) |
||
| 35 | ); |
||
| 36 | |||
| 37 | return $element; |
||
| 38 | } |
||
| 39 | |||
| 51 |
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.