Completed
Push — master ( 66585b...da40b2 )
by Derek Stephen
06:42
created

IndexController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 26
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 6 1
A learnAction() 0 6 1
1
<?php
2
3
namespace App\Controller;
4
5
use Bone\Mvc\Controller;
6
use Psr\Http\Message\ResponseInterface;
7
use Psr\Http\Message\ServerRequestInterface;
8
use Zend\Diactoros\Response\HtmlResponse;
9
use Zend\Diactoros\Response\JsonResponse;
10
11
/**
12
 * Class IndexController
13
 *
14
 * If you need to create a constructor, edit the package to set up automatically via dependency injection
15
 *
16
 * @package App\Controller
17
 */
18
class IndexController extends Controller
19
{
20
    /**
21
     * @param ServerRequestInterface $request
22
     * @param array $args
23
     * @return ResponseInterface
24
     */
25 1
    public function indexAction(ServerRequestInterface $request, array $args) : ResponseInterface
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...
Unused Code introduced by
The parameter $args 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...
26
    {
27 1
        $body = $this->view->render('index/index');
28
29 1
        return new HtmlResponse($body);
30
    }
31
32
    /**
33
     * @param ServerRequestInterface $request
34
     * @param array $args
35
     * @return ResponseInterface
36
     */
37 1
    public function learnAction(ServerRequestInterface $request, array $args) : ResponseInterface
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...
Unused Code introduced by
The parameter $args 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...
38
    {
39 1
        $body = $this->view->render('index/learn');
40
41 1
        return new HtmlResponse($body);
42
    }
43
}
44