AdminController::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace Egzaminer\Controller;
4
5
abstract class AdminController extends AbstractController
6
{
7
    public function __construct(array $container)
8
    {
9
        parent::__construct($container);
10
11
        if (!$this->isLogged()) {
12
            $this->redirect('/admin/login');
13
            $this->terminate();
14
        }
15
    }
16
}
17