Passed
Push — master ( 298035...f88e8a )
by Vince
06:31
created

mock   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 52
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A scope() 0 3 1
A settings() 0 3 1
A headerMethods() 0 5 1
A register() 0 5 1
A run() 0 3 1
1
<?php
2
3
/**
4
 * ASSETS ENDPOINT CLASS
5
 *
6
 */
7
namespace responsible\service\endpoints;
8
9
use responsible\core\headers;
10
use responsible\service\interfaces;
11
use responsible\core\exception;
12
13
class mock implements interfaces\endpointsInterface
14
{
15
16
    /**
17
     * [settings Inherited settings]
18
     * @return [void]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [void] at position 0 could not be parsed: Unknown type name '[' at position 0 in [void].
Loading history...
19
     */
20
    public function settings(array $settings)
21
    {
22
        $this->settings = $settings;
0 ignored issues
show
Bug Best Practice introduced by
The property settings does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
23
    }
24
25
    /**
26
     * [headerMethods]
27
     * @return [void]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [void] at position 0 could not be parsed: Unknown type name '[' at position 0 in [void].
Loading history...
28
     */
29
    public function headerMethods()
30
    {
31
        $headers = new headers\header;
32
        $headers->setAllowedMethods(
33
            ['GET', 'POST']
34
        );
35
    }
36
37
    /**
38
     * [register]
39
     * @return [array]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [array] at position 0 could not be parsed: Unknown type name '[' at position 0 in [array].
Loading history...
40
     */
41
    public function register()
42
    {
43
        return array(
44
            '/mock',
45
            '/mock/{mockId}',
46
        );
47
    }
48
49
    /**
50
     * [scope Routing scope access]
51
     * @return [string]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [string] at position 0 could not be parsed: Unknown type name '[' at position 0 in [string].
Loading history...
52
     */
53
    public function scope()
54
    {
55
        return 'private';
56
    }
57
58
    /**
59
     * [run Run the method request]
60
     * @return [void]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [void] at position 0 could not be parsed: Unknown type name '[' at position 0 in [void].
Loading history...
61
     */
62
    public function run()
63
    {
64
        return [];
65
    }
66
}
67