Failed Conditions
Pull Request — psr2 (#2426)
by Andreas
09:22 queued 06:07
created

remote_plugin_testing_manual::publicCall()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
use dokuwiki\Extension\RemotePlugin;
4
5
/**
6
 * For testing manual method descriptions
7
 *
8
 * @author Dominik Eckelmann <[email protected]>
9
 */
10
class remote_plugin_testing_manual extends RemotePlugin
11
{
12
    /** @inheritdoc */
13
    function _getMethods()
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...
14
    {
15
        return array(
16
            'method1' => array(
17
                'args' => array(),
18
                'return' => 'void',
19
            ),
20
            'methodString' => array(
21
                'args' => array(),
22
                'return' => 'string',
23
            ),
24
            'method2' => array(
25
                'args' => array('string', 'int'),
26
                'return' => 'array',
27
                'name' => 'method2',
28
            ),
29
            'method2ext' => array(
30
                'args' => array('string', 'int', 'bool'),
31
                'return' => 'array',
32
                'name' => 'method2',
33
            ),
34
            'publicCall' => array(
35
                'args' => array(),
36
                'return' => 'boolean',
37
                'doc' => 'testing for public access',
38
                'name' => 'publicCall',
39
                'public' => 1,
40
            ),
41
        );
42
    }
43
44
    /** @inheritdoc */
45
    function method1()
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...
46
    {
47
        return null;
48
    }
49
50
    /** @inheritdoc */
51
    function methodString()
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...
52
    {
53
        return 'success';
54
    }
55
56
    /** @inheritdoc */
57
    function method2($str, $int, $bool = false)
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...
58
    {
59
        return array($str, $int, $bool);
60
    }
61
62
    /** @inheritdoc */
63
    function publicCall()
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...
64
    {
65
        return true;
66
    }
67
}
68