MainController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 8 1
1
<?php
2
3
namespace Ps2alerts\Api\Controller;
4
5
use Psr\Http\Message\ServerRequestInterface;
6
use Psr\Http\Message\ResponseInterface;
7
use Ps2alerts\Api\Contract\TemplateAwareInterface;
8
use Ps2alerts\Api\Contract\TemplateAwareTrait;
9
10
class MainController implements TemplateAwareInterface
11
{
12
    use TemplateAwareTrait;
13
14
    /**
15
     * Index
16
     * @param  ServerRequestInterface $request
17
     * @param  ResponseInterface      $response
18
     * @return ResponseInterface
19
     */
20
    public function index(ServerRequestInterface $request, ResponseInterface $response)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
    {
22
        $response->getBody()->write(
23
            $this->getTemplateDriver()->render('landing.html')
24
        );
25
26
        return $response;
27
    }
28
}
29