IndexController   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 3 1
A contactAction() 0 3 1
A postAction() 0 2 1
A httpMethods() 0 7 1
A featuresAction() 0 3 1
1
<?php
2
3
namespace example\controllers;
4
5
use Tebe\Pvc\Controller\BaseController;
6
7
class IndexController extends BaseController
8
{
9
    public function httpMethods()
10
    {
11
        return [
12
            'index' => ['GET'],
13
            'features' => ['GET'],
14
            'contact' => ['GET'],
15
            'post' => ['POST']
16
        ];
17
    }
18
19
    public function indexAction()
20
    {
21
        return $this->render('index');
22
    }
23
24
    public function featuresAction()
25
    {
26
        return $this->render('features');
27
    }
28
29
    public function contactAction(int $a, int $b)
0 ignored issues
show
Unused Code introduced by
The parameter $b is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    public function contactAction(int $a, /** @scrutinizer ignore-unused */ int $b)

This check looks for 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 $a is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    public function contactAction(/** @scrutinizer ignore-unused */ int $a, int $b)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        return $this->render('contact');
32
    }
33
34
    public function postAction()
35
    {
36
    }
37
}
38