Completed
Push — dev-master ( 863dea...e6af80 )
by Derek Stephen
04:03
created

IndexController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
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
10
/**
11
 * Class IndexController
12
 *
13
 * If you need to create a constructor, edit the package to set up automatically via dependency injection
14
 *
15
 * @package App\Controller
16
 */
17
class IndexController extends Controller
18
{
19
    /**
20
     * @param ServerRequestInterface $request
21
     * @param array $args
22
     * @return ResponseInterface
23
     */
24 1
    public function indexAction(ServerRequestInterface $request, array $args) : ResponseInterface
25
    {
26 1
        $body = $this->view->render('index/index');
27
28 1
        return new HtmlResponse($body);
29
    }
30
31
    /**
32
     * @param ServerRequestInterface $request
33
     * @param array $args
34
     * @return ResponseInterface
35
     */
36 1
    public function learnAction(ServerRequestInterface $request, array $args) : ResponseInterface
37
    {
38 1
        $body = $this->view->render('index/learn');
39
40 1
        return new HtmlResponse($body);
41
    }
42
}
43