TestController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A greet() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Example;
4
5
use Zapheus\Renderer\RendererInterface;
6
7
/**
8
 * Test Controller
9
 *
10
 * @package App
11
 * @author  Rougin Gutib <[email protected]>
12
 */
13
class TestController
14
{
15
    /**
16
     * @var \Zapheus\Renderer\RendererInterface
17
     */
18
    protected $renderer;
19
20
    /**
21
     * Initializes the HTTP controller instance.
22
     *
23
     * @param \Zapheus\Renderer\RendererInterface $renderer
24
     */
25 3
    public function __construct(RendererInterface $renderer)
26
    {
27 3
        $this->renderer = $renderer;
28 3
    }
29
30
    /**
31
     * Greets you with a "lorem ipsum" text.
32
     *
33
     * @return string
34
     */
35 3
    public function greet()
36
    {
37 3
        return $this->renderer->render('sample.test');
38
    }
39
}
40