1 | <?php |
||
5 | class Messages extends Main |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * Request succeeded and contains json result |
||
10 | * @param array $data |
||
11 | * @author Shima Payro <[email protected]> |
||
12 | * @since May 2, 2016 9:50:51 AM |
||
13 | * @uses |
||
14 | * @see |
||
15 | */ |
||
16 | public function succeed( $data ) { |
||
23 | |||
24 | /** |
||
25 | * Delete action is succeed |
||
26 | * @author Shima Payro <[email protected]> |
||
27 | * @param String $message |
||
28 | * @since May 2, 2016 9:52:05 AM |
||
29 | * @uses |
||
30 | * @see |
||
31 | */ |
||
32 | public function deleteSucceeded( $message = 'The requested parameter is deleted successfully!' ) { |
||
39 | |||
40 | /** |
||
41 | * Update action is succeed |
||
42 | * @author Shima Payro <[email protected]> |
||
43 | * @param String $message |
||
44 | * @since May 2, 2016 9:52:52 AM |
||
45 | * @uses |
||
46 | * @see |
||
47 | */ |
||
48 | public function updateSucceeded( $message = 'The requested parameter is updated successfully!' ) { |
||
55 | |||
56 | /** |
||
57 | * Insert action is succeed |
||
58 | * @author Shima Payro <[email protected]> |
||
59 | * @param String $message |
||
60 | * @since May 2, 2016 9:53:26 AM |
||
61 | * @uses |
||
62 | * @see |
||
63 | */ |
||
64 | public function insertSucceeded( $message = 'The requested parameter is Added successfully!' ) { |
||
71 | |||
72 | /** |
||
73 | * Delete action is faild |
||
74 | * @author Shima Payro <[email protected]> |
||
75 | * @param String $message |
||
76 | * @since May 2, 2016 9:53:53 AM |
||
77 | * @uses |
||
78 | * @see |
||
79 | */ |
||
80 | public function deleteFaild() { |
||
88 | |||
89 | /** |
||
90 | * Update action is succeed |
||
91 | * @author Shima Payro <[email protected]> |
||
92 | * @param String $message |
||
93 | * @since May 2, 2016 9:54:09 AM |
||
94 | * @uses |
||
95 | * @see |
||
96 | */ |
||
97 | public function updateFaild() { |
||
105 | |||
106 | /** |
||
107 | * Insert action is faild |
||
108 | * @author Shima Payro <[email protected]> |
||
109 | * @param String $message |
||
110 | * @since May 2, 2016 9:54:27 AM |
||
111 | * @uses |
||
112 | * @see |
||
113 | */ |
||
114 | public function insertFaild() { |
||
122 | |||
123 | /** |
||
124 | * Database connection is refused |
||
125 | * @author Shima Payro <[email protected]> |
||
126 | * @param String $message |
||
127 | * @since May 2, 2016 9:54:45 AM |
||
128 | * @uses |
||
129 | * @see |
||
130 | */ |
||
131 | public function connectionRefused() { |
||
139 | |||
140 | /** |
||
141 | * page requested is not found |
||
142 | * @author Shima Payro <[email protected]> |
||
143 | * @param String $message |
||
144 | * @since May 2, 2016 9:55:20 AM |
||
145 | * @uses |
||
146 | * @see |
||
147 | */ |
||
148 | public function notFound() { |
||
156 | |||
157 | /** |
||
158 | * Wrong parameters are entered |
||
159 | * @author Shima Payro <[email protected]> |
||
160 | * @param String $message |
||
161 | * @since May 2, 2016 9:55:20 AM |
||
162 | * @uses |
||
163 | * @see |
||
164 | */ |
||
165 | public function wrongParameters() { |
||
173 | |||
174 | /** |
||
175 | * Method is not allowed |
||
176 | * @author Shima Payro <[email protected]> |
||
177 | * @param String $message |
||
178 | * @since May 2, 2016 9:55:20 AM |
||
179 | * @uses |
||
180 | * @see |
||
181 | */ |
||
182 | public function methodNotAllowed() { |
||
190 | |||
191 | /** |
||
192 | * There ara validation errors |
||
193 | * @author Shima Payro <[email protected]> |
||
194 | * @param Array $data |
||
195 | * @since May 2, 2016 9:55:20 AM |
||
196 | * @uses |
||
197 | * @see |
||
198 | */ |
||
199 | public function validationErrors( $data ) { |
||
207 | |||
208 | /** |
||
209 | * The request field is not found |
||
210 | * @author Shima Payro <[email protected]> |
||
211 | * @param String $message |
||
212 | * @since May 2, 2016 9:55:20 AM |
||
213 | * @uses |
||
214 | * @see |
||
215 | */ |
||
216 | public function requestFieldNotFound() { |
||
224 | |||
225 | /** |
||
226 | * The request field is doublicated |
||
227 | * @author Mehdi Hosseini <[email protected]> |
||
228 | * @since August 24, 2016 |
||
229 | * @return json |
||
230 | */ |
||
231 | public function requestFieldDuplicated() { |
||
239 | |||
240 | /** |
||
241 | * Custom error message according to error config file |
||
242 | * @author Mehdi Hosseini <[email protected]> |
||
243 | * @since August 24, 2016 |
||
244 | * @param $code integer |
||
245 | * @return json |
||
246 | */ |
||
247 | public function error( $code ) { |
||
255 | |||
256 | |||
257 | } |
||
258 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: