1 | <?php |
||
18 | class Module extends ControllerAbstract |
||
19 | { |
||
20 | /** |
||
21 | * process the class |
||
22 | * |
||
23 | * @since 4.0.0 |
||
24 | * |
||
25 | * @param string $action action to process |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | |||
30 | public function process(string $action = null) : string |
||
74 | |||
75 | /** |
||
76 | * sanitize the post |
||
77 | * |
||
78 | * @since 4.0.0 |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | |||
83 | protected function _sanitizePost() : array |
||
98 | |||
99 | /** |
||
100 | * validate the post |
||
101 | * |
||
102 | * @since 4.0.0 |
||
103 | * |
||
104 | * @param array $postArray array of the post |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | |||
109 | protected function _validatePost(array $postArray = []) : array |
||
121 | |||
122 | /** |
||
123 | * update the module |
||
124 | * |
||
125 | * @since 4.0.0 |
||
126 | * |
||
127 | * @param int $moduleId identifier of the module |
||
128 | * @param array $updateArray array of the update |
||
129 | * |
||
130 | * @return bool |
||
131 | */ |
||
132 | |||
133 | protected function _update(int $moduleId = null, array $updateArray = []) : bool |
||
138 | |||
139 | /** |
||
140 | * get success route |
||
141 | * |
||
142 | * @since 4.0.0 |
||
143 | * |
||
144 | * @param array $postArray array of the post |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | |||
149 | protected function _getSuccessRoute(array $postArray = []) : string |
||
157 | |||
158 | /** |
||
159 | * get error route |
||
160 | * |
||
161 | * @since 4.0.0 |
||
162 | * |
||
163 | * @param array $postArray array of the post |
||
164 | * |
||
165 | * @return string |
||
166 | */ |
||
167 | |||
168 | protected function _getErrorRoute(array $postArray = []) : string |
||
180 | } |
||
181 |
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.