Completed
Push — actionrefactor ( 6e4bf0 )
by Andreas
04:36
created

Conflict::minimumPermission()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Action;
4
5
/**
6
 * Class Conflict
7
 *
8
 * Show the conflict resolution screen
9
 *
10
 * @package dokuwiki\Action
11
 */
12
class Conflict extends AbstractAction {
13
14
    /** @inheritdoc */
15
    function minimumPermission() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
        global $INFO;
17
        if($INFO['exists']) {
18
            return AUTH_EDIT;
19
        } else {
20
            return AUTH_CREATE;
21
        }
22
    }
23
24
    public function tplContent() {
25
        global $PRE;
26
        global $TEXT;
27
        global $SUF;
28
        global $SUM;
29
30
        html_conflict(con($PRE, $TEXT, $SUF), $SUM);
31
        html_diff(con($PRE, $TEXT, $SUF), false);
32
    }
33
34
}
35