MainController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 3
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 4 1
A actionGreet() 0 4 1
1
<?php
2
3
namespace app\controllers;
4
5
use Orx0r\Slim\Controller\Controller;
6
7
class MainController extends Controller
8
{
9
    public function actionIndex()
10
    {
11
        return $this->response->getBody()->write('Hello, Anonymous');
12
    }
13
14
    public function actionGreet($greet, $name = 'Anonymous')
15
    {
16
        return $this->render('main/greet.html', compact('greet', 'name'));
17
    }
18
}
19