| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function showAction() |
||
| 35 | { |
||
| 36 | parent::showAction(); |
||
| 37 | |||
| 38 | $message = $this->notification->getMessage(); |
||
| 39 | |||
| 40 | if ($this->notification->hasEventDefinition()) { |
||
| 41 | $payload = $this->getPreviewPayload(); |
||
| 42 | |||
| 43 | if ($payload->getEvent() instanceof ProvidesExampleProperties) { |
||
| 44 | $builder = $this->objectManager->get(EntitySlackMessageBuilder::class, $payload); |
||
|
|
|||
| 45 | $message = $builder->getMessage(); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | $this->view->assign('message', $message); |
||
| 50 | } |
||
| 60 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.