| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function resolve() |
||
| 33 | { |
||
| 34 | $this->template->setZones($this->zones); |
||
| 35 | |||
| 36 | $this->template->denormalize($this->normalize('update')); |
||
| 37 | |||
| 38 | $this->assertEntityIsValid($this->template, array('Template', 'edition')); |
||
| 39 | |||
| 40 | $this->fireEvent( |
||
| 41 | TemplateEvents::TEMPLATE_EDITED, |
||
| 42 | new TemplateEvent($this->template, $this) |
||
|
|
|||
| 43 | ); |
||
| 44 | } |
||
| 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.