Completed
Branch dev-master (d2707d)
by Derek Stephen
01:43
created

IndexController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 25
ccs 11
cts 11
cp 1
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 4 1
A learnAction() 0 4 1
A jsonAction() 0 12 1
1
<?php
2
3
namespace App\Controller;
4
use Bone\Mvc\Controller;
5
use Bone\Mvc\Exception;
6
7
8
class IndexController extends Controller
9
{
10 1
    public function indexAction()
11
    {
12
13 1
    }
14
15 1
    public function learnAction()
16
    {
17
18 1
    }
19
20 1
    public function jsonAction()
21
    {
22
        // example of a Json page
23 1
        $this->disableLayout();
24 1
        $this->disableView();
25
        $array = array(
26 1
          'Rum',
27
          'Grog'
28 1
        );
29
//        $this->setJsonResponse();
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
30 1
        $this->setBody(json_encode($array));
31
    }
32
}