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

IndexController::learnAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 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
}