AboutController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 42
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A indexActionGet() 0 8 1
1
<?php
2
3
namespace Forum\About;
4
5
use Anax\Commons\ContainerInjectableInterface;
6
use Anax\Commons\ContainerInjectableTrait;
7
8
// use Anax\Route\Exception\ForbiddenException;
9
// use Anax\Route\Exception\NotFoundException;
10
// use Anax\Route\Exception\InternalErrorException;
11
12
/**
13
 * A sample controller to show how a controller class can be implemented.
14
 */
15
class AboutController implements ContainerInjectableInterface
16
{
17
    use ContainerInjectableTrait;
18
19
20
    /**
21
     * @var $data description
22
     */
23
    //private $data;
24
25
26
    // /**
27
    //  * The initialize method is optional and will always be called before the
28
    //  * target method/action. This is a convienient method where you could
29
    //  * setup internal properties that are commonly used by several methods.
30
    //  *
31
    //  * @return void
32
    //  */
33
    // public function initialize() : void
34
    // {
35
    //     ;
36
    // }
37
38
39
    /**
40
     * Description.
41
     *
42
     * @param datatype $variable Description
0 ignored issues
show
Bug introduced by
There is no parameter named $variable. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
43
     *
44
     * @return object as a response object
45
     * @throws Exception
46
     *
47
     */
48
    public function indexActionGet(): object
49
    {
50
        $page = $this->di->get("page");
51
        $page->add("forum/about", []);
52
        return $page->render([
53
            "title" => "About page",
54
        ]);
55
    }
56
}
57