| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class ShowEntityLogController extends ShowNotificationController |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var EntityLogNotification |
||
| 26 | */ |
||
| 27 | protected $notification; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | public function showAction() |
||
| 33 | { |
||
| 34 | parent::showAction(); |
||
| 35 | |||
| 36 | $this->view->assign('preview', $this->getPreview()); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Returns a preview of the shown log notification. |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | protected function getPreview() |
||
| 45 | { |
||
| 46 | /** @var EntityLogMessageBuilder $entityLogMessageBuilder */ |
||
| 47 | $entityLogMessageBuilder = $this->objectManager->get(EntityLogMessageBuilder::class, $this->getPreviewPayload()); |
||
|
|
|||
| 48 | |||
| 49 | return $entityLogMessageBuilder->getMessage(); |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getNotificationDefinitionIdentifier() |
||
| 58 | } |
||
| 59 | } |
||
| 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.