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

Revert   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 4
1
<?php
2
3
namespace dokuwiki\Menu\Item;
4
5
class Revert extends AbstractItem {
6
7
    /** @inheritdoc */
8
    public function __construct() {
9
        global $REV;
10
        global $INFO;
11
        parent::__construct();
12
13
        if(!$INFO['ismanager'] || !$REV || !$INFO['writable']) {
14
            throw new \RuntimeException('revert not available');
15
        }
16
        $this->params['rev'] = $REV;
17
        $this->params['sectok'] = getSecurityToken();
18
        $this->svg = DOKU_INC . 'lib/images/menu/06-revert_replay.svg';
19
    }
20
21
}
22