Completed
Push — master ( ac011d...56c397 )
by Mikołaj
03:19
created

AdminController::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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