Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 1 | public function indexAction(YumlClientInterface $yumlClient = null) |
|
26 | { |
||
27 | 1 | $yumlClient = $yumlClient ? $yumlClient : new YumlClient($this->getDoctrine()->getManager()); |
|
|
|||
28 | |||
29 | 1 | $showDetailParam = $this->container->getParameter('onurb_yuml.show_fields_description'); |
|
30 | 1 | $colorsParam = $this->container->getParameter('onurb_yuml.colors'); |
|
31 | 1 | $notesParam = $this->container->getParameter('onurb_yuml.notes'); |
|
32 | |||
33 | 1 | return $this->redirect( |
|
34 | 1 | $yumlClient->getGraphUrl( |
|
35 | 1 | $yumlClient->makeDslText($showDetailParam, $colorsParam, $notesParam) |
|
36 | ) |
||
37 | ); |
||
38 | } |
||
39 | } |
||
40 |
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.