Completed
Push — svgpagetools ( 17ef2a...7c844e )
by Andreas
04:40
created

Admin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
3
namespace dokuwiki\Menu\Item;
4
5
class Admin extends AbstractItem {
6
7
    /** @inheritdoc */
8
    public function __construct() {
9
        global $INFO;
10
        parent::__construct();
11
12
        $this->category = 'user';
13
14
        if(!$INFO['ismanager']) {
15
            throw new \RuntimeException("admin is for managers only");
16
        }
17
    }
18
19
}
20