1 | <?php |
||
19 | class Module extends ControllerAbstract |
||
20 | { |
||
21 | /** |
||
22 | * process the class |
||
23 | * |
||
24 | * @since 4.0.0 |
||
25 | * |
||
26 | * @param string $action action to process |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | |||
31 | 6 | public function process(string $action = null) : string |
|
75 | |||
76 | /** |
||
77 | * sanitize the post |
||
78 | * |
||
79 | * @since 4.0.0 |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | |||
84 | 6 | protected function _sanitizePost() : array |
|
101 | |||
102 | /** |
||
103 | * validate the post |
||
104 | * |
||
105 | * @since 4.0.0 |
||
106 | * |
||
107 | * @param array $postArray array of the post |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | |||
112 | 6 | protected function _validatePost(array $postArray = []) : array |
|
129 | |||
130 | /** |
||
131 | * update the module |
||
132 | * |
||
133 | * @since 4.0.0 |
||
134 | * |
||
135 | * @param int $moduleId identifier of the module |
||
136 | * @param array $updateArray array of the update |
||
137 | * |
||
138 | * @return bool |
||
139 | */ |
||
140 | |||
141 | 2 | protected function _update(int $moduleId = null, array $updateArray = []) : bool |
|
146 | |||
147 | /** |
||
148 | * get success route |
||
149 | * |
||
150 | * @since 4.0.0 |
||
151 | * |
||
152 | * @param array $postArray array of the post |
||
153 | * |
||
154 | * @return string |
||
155 | */ |
||
156 | |||
157 | 2 | protected function _getSuccessRoute(array $postArray = []) : string |
|
169 | |||
170 | /** |
||
171 | * get error route |
||
172 | * |
||
173 | * @since 4.0.0 |
||
174 | * |
||
175 | * @param array $postArray array of the post |
||
176 | * |
||
177 | * @return string |
||
178 | */ |
||
179 | |||
180 | 4 | protected function _getErrorRoute(array $postArray = []) : string |
|
192 | } |
||
193 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.