1 | <?php |
||
9 | class Directory extends Dictionary |
||
10 | { |
||
11 | const GET = 'GET'; |
||
|
|||
12 | const POST = 'POST'; |
||
13 | const PUT = 'PUT'; |
||
14 | const PATCH = 'PATCH'; |
||
15 | const HEAD = 'HEAD'; |
||
16 | const DELETE = 'DELETE'; |
||
17 | const OPTIONS = 'OPTIONS'; |
||
18 | |||
19 | /** |
||
20 | * @inheritDoc |
||
21 | * |
||
22 | * @throws DirectoryException If a value is not an Action instance |
||
23 | */ |
||
24 | 12 | public function validate(array $data) |
|
34 | |||
35 | /** |
||
36 | * @param string $path |
||
37 | * @param string|Action $domainOrAction |
||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | 3 | public function get($path, $domainOrAction) |
|
45 | |||
46 | /** |
||
47 | * @param string $path |
||
48 | * @param string|Action $domainOrAction |
||
49 | * |
||
50 | * @return static |
||
51 | */ |
||
52 | 1 | public function post($path, $domainOrAction) |
|
56 | |||
57 | /** |
||
58 | * @param string $path |
||
59 | * @param string|Action $domainOrAction |
||
60 | * |
||
61 | * @return static |
||
62 | */ |
||
63 | 1 | public function put($path, $domainOrAction) |
|
67 | |||
68 | /** |
||
69 | * @param string $path |
||
70 | * @param string|Action $domainOrAction |
||
71 | * |
||
72 | * @return static |
||
73 | */ |
||
74 | 1 | public function patch($path, $domainOrAction) |
|
78 | |||
79 | /** |
||
80 | * @param string $path |
||
81 | * @param string|Action $domainOrAction |
||
82 | * |
||
83 | * @return static |
||
84 | */ |
||
85 | 1 | public function head($path, $domainOrAction) |
|
89 | |||
90 | /** |
||
91 | * @param string $path |
||
92 | * @param string|Action $domainOrAction |
||
93 | * |
||
94 | * @return static |
||
95 | */ |
||
96 | 1 | public function delete($path, $domainOrAction) |
|
100 | |||
101 | /** |
||
102 | * @param string $path |
||
103 | * @param string|Action $domainOrAction |
||
104 | * |
||
105 | * @return static |
||
106 | */ |
||
107 | 1 | public function options($path, $domainOrAction) |
|
111 | |||
112 | /** |
||
113 | * @param string $method |
||
114 | * @param string $path |
||
115 | * @param string|Action $domainOrAction |
||
116 | * |
||
117 | * @return static |
||
118 | */ |
||
119 | 11 | public function action($method, $path, $domainOrAction) |
|
129 | } |
||
130 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.