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

Subscribe::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Menu\Item;
4
5
class Subscribe extends AbstractItem {
6
7
    protected $svg = DOKU_INC . 'lib/images/menu/09-subscribe_email-outline.svg';
8
9
    /** @inheritdoc */
10
    public function __construct() {
11
        global $INPUT;
12
        parent::__construct();
13
14
        if(!$INPUT->server->str('REMOTE_USER')) {
15
            throw new \RuntimeException("subscribe is only for logged in users");
16
        }
17
    }
18
19
}
20