Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
45 | public function postDelete(NodeEvent $event) |
||
46 | { |
||
47 | $page = $event->getPage(); |
||
48 | |||
49 | // Redirect to admin list when deleting a page that implements the OverviewNavigationInterface. |
||
50 | if ($page instanceof OverviewNavigationInterface) { |
||
51 | $route = $this->router->generate($page->getOverViewRoute()); |
||
52 | $response = new RedirectResponse($route); |
||
53 | |||
54 | $event->setResponse($response); |
||
55 | } |
||
56 | } |
||
57 | } |
||
58 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.