ApiController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 17
c 1
b 0
f 0
ccs 8
cts 8
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 10 1
1
<?php
2
3
namespace Bjos\Api;
4
5
use Anax\Commons\ContainerInjectableInterface;
6
use Anax\Commons\ContainerInjectableTrait;
7
8
/**
9
 * A test controller to show off using a model.
10
 */
11
class ApiController implements ContainerInjectableInterface
12
{
13
    use ContainerInjectableTrait;
14
15
    /**
16
     * Page to show all Apis.
17
     */
18 1
    public function indexAction()
19
    {
20 1
        $page = $this->di->get("page");
21 1
        $geo = $this->di->get("geolocation");
22 1
        $userIp = $geo->getUserIp();
23 1
        $page->add("bjos/api/allapi", [
24 1
            "userIp" => $userIp
25
        ]);
26 1
        return $page->render([
27 1
            "title" => "All Api",
28
        ]);
29
    }
30
}
31