| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function getAction() |
||
| 20 | { |
||
| 21 | //get entity from storage |
||
| 22 | $pageId = (int) $this->request->getQuery('pageId'); |
||
| 23 | $page = \Page\Model\Page::findFirst($pageId); |
||
|
|
|||
| 24 | if (!$pageId || !$page) { |
||
| 25 | return $this->render(new \Api\Model\Payload(null, sprintf('Page with id: %s was not found.', $pageId))); |
||
| 26 | } |
||
| 27 | |||
| 28 | //filter required data for display |
||
| 29 | $filter = new \Api\Filter\Page(); |
||
| 30 | $payload = new \Api\Model\Payload($filter->filter($page)); |
||
| 31 | |||
| 32 | return $this->render($payload); |
||
| 33 | } |
||
| 34 | |||
| 50 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.