@@ -120,6 +120,7 @@ discard block |
||
120 | 120 | * Check if file exists. |
121 | 121 | * |
122 | 122 | * @param mixed (array | string) $mFile |
123 | + * @param string $mFile |
|
123 | 124 | * @return boolean TRUE if file exists, FALSE otherwise. |
124 | 125 | */ |
125 | 126 | public function existFile($mFile) |
@@ -273,6 +274,7 @@ discard block |
||
273 | 274 | * |
274 | 275 | * @param mixed (string | array) $mDir |
275 | 276 | * @param integer (octal) $iMode Default: 0777 |
277 | + * @param string $mDir |
|
276 | 278 | * @return void |
277 | 279 | * @throws \PH7\Framework\File\Exception If the file cannot be created. |
278 | 280 | */ |
@@ -321,7 +323,7 @@ discard block |
||
321 | 323 | * |
322 | 324 | * @param string $sFrom File or directory. |
323 | 325 | * @param string $sTo File or directory. |
324 | - * @return mixed (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
326 | + * @return string|false (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
325 | 327 | */ |
326 | 328 | public function copyMost($sFrom, $sTo) |
327 | 329 | { |
@@ -363,7 +365,7 @@ discard block |
||
363 | 365 | * |
364 | 366 | * @param string $sFrom File or directory. |
365 | 367 | * @param string $sTo File or directory. |
366 | - * @return mixed (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
368 | + * @return string|false (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
367 | 369 | */ |
368 | 370 | public function renameMost($sFrom, $sTo) |
369 | 371 | { |
@@ -417,6 +419,7 @@ discard block |
||
417 | 419 | * Get the modification time of a file in the Unix timestamp. |
418 | 420 | * |
419 | 421 | * @param string Full path of the file. |
422 | + * @param string $sFile |
|
420 | 423 | * @return mixed (integer | boolean) Returns the time the file was last modified, or FALSE if it not found. |
421 | 424 | */ |
422 | 425 | public function getModifTime($sFile) |
@@ -430,6 +433,7 @@ discard block |
||
430 | 433 | * |
431 | 434 | * @static |
432 | 435 | * @param string Full path of the file. |
436 | + * @param string $sFile |
|
433 | 437 | * @return integer Returns the latest modification time of the file in Unix timestamp. |
434 | 438 | */ |
435 | 439 | public static function version($sFile) |
@@ -441,7 +445,7 @@ discard block |
||
441 | 445 | * Delay script execution. |
442 | 446 | * |
443 | 447 | * @param integer $iSleep Halt time in seconds. Optional parameter, default value is 5. |
444 | - * @return mixed (integer | boolean) Returns "0" on success, or "false" on error. |
|
448 | + * @return integer (integer | boolean) Returns "0" on success, or "false" on error. |
|
445 | 449 | */ |
446 | 450 | public function sleep($iSleep = null) |
447 | 451 | { |
@@ -680,7 +684,7 @@ discard block |
||
680 | 684 | * Get the URL contents (For URLs, it is better to use CURL because it is faster than file_get_contents function). |
681 | 685 | * |
682 | 686 | * @param string $sFile URL to be read contents. |
683 | - * @return mixed (string | boolean) Return the result content on success, FALSE on failure. |
|
687 | + * @return string (string | boolean) Return the result content on success, FALSE on failure. |
|
684 | 688 | */ |
685 | 689 | public function getUrlContents($sFile) |
686 | 690 | { |
@@ -732,7 +736,7 @@ discard block |
||
732 | 736 | * Create a recurive directory iterator for a given directory. |
733 | 737 | * |
734 | 738 | * @param string $sPath |
735 | - * @return string The directory. |
|
739 | + * @return \RecursiveDirectoryIterator The directory. |
|
736 | 740 | */ |
737 | 741 | public function getDirIterator($sPath) |
738 | 742 | { |
@@ -263,7 +263,6 @@ discard block |
||
263 | 263 | /** |
264 | 264 | * Set the zoom of the infowindow |
265 | 265 | * |
266 | - * @param int $zoom GoogleMap zoom. |
|
267 | 266 | * |
268 | 267 | * @return void |
269 | 268 | */ |
@@ -276,8 +275,8 @@ discard block |
||
276 | 275 | /** |
277 | 276 | * Enable the zoom on the marker when you click on it |
278 | 277 | * |
279 | - * @param int $zoom GoogleMap zoom. |
|
280 | 278 | * |
279 | + * @param boolean $enableWindowZoom |
|
281 | 280 | * @return void |
282 | 281 | */ |
283 | 282 | |
@@ -289,7 +288,6 @@ discard block |
||
289 | 288 | /** |
290 | 289 | * Enable theautomatic center/zoom at the gmap load |
291 | 290 | * |
292 | - * @param int $zoom GoogleMap zoom. |
|
293 | 291 | * |
294 | 292 | * @return void |
295 | 293 | */ |
@@ -400,8 +398,7 @@ discard block |
||
400 | 398 | /** |
401 | 399 | * Remove accentued characters |
402 | 400 | * |
403 | - * @param string $chaine The string to treat |
|
404 | - * @param string $remplace_par The replacement character |
|
401 | + * @param string $text |
|
405 | 402 | * @return string |
406 | 403 | */ |
407 | 404 | public function withoutSpecialChars($text, $replaceBy = '_') |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * @static |
93 | 93 | * @param integer $iStatus The "code" for the HTTP status |
94 | - * @return mixed (string | boolean) $iStatus Returns the "HTTP status code" if found otherwise returns "false" |
|
94 | + * @return integer (string | boolean) $iStatus Returns the "HTTP status code" if found otherwise returns "false" |
|
95 | 95 | */ |
96 | 96 | public static function getStatusCodes($iStatus) |
97 | 97 | { |
@@ -129,6 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @static |
131 | 131 | * @param mixed (string | array) $mHeaders Headers to send. |
132 | + * @param string $mHeaders |
|
132 | 133 | */ |
133 | 134 | public static function setHeaders($mHeaders) |
134 | 135 | { |
@@ -184,7 +185,7 @@ discard block |
||
184 | 185 | * @static |
185 | 186 | * @param string $sUsr |
186 | 187 | * @param string $sPwd |
187 | - * @return boolean TRUE if the authentication is correct, otherwise FALSE. |
|
188 | + * @return null|boolean TRUE if the authentication is correct, otherwise FALSE. |
|
188 | 189 | */ |
189 | 190 | public static function requireAuth($sUsr, $sPwd) |
190 | 191 | { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | - * @param array $aData The data from a request |
|
38 | + * @param string $aData The data from a request |
|
39 | 39 | * @param integer $iStatus Status Code. Default 200 |
40 | 40 | * @return void |
41 | 41 | */ |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * @desc Image Quality. |
102 | 102 | * @param integer $iQ Devault value 100. |
103 | - * @return object $this |
|
103 | + * @return Image $this |
|
104 | 104 | */ |
105 | 105 | public function quality($iQ = 100) |
106 | 106 | { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * @desc Image Compression. |
113 | 113 | * @param integer $iC Devault value 4. |
114 | - * @return object $this |
|
114 | + * @return Image $this |
|
115 | 115 | */ |
116 | 116 | public function compression($iC = 4) |
117 | 117 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @desc Resize |
124 | 124 | * @param integer $iX Default value null |
125 | 125 | * @param integer $iY Default value null |
126 | - * @return object $this |
|
126 | + * @return Image $this |
|
127 | 127 | */ |
128 | 128 | public function resize($iX = null, $iY = null) |
129 | 129 | { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @param integer $iY Default value 0. |
155 | 155 | * @param integer $iWidth Default valie 1. |
156 | 156 | * @param integer $iHeight Default value 1. |
157 | - * @return object $this |
|
157 | + * @return Image $this |
|
158 | 158 | */ |
159 | 159 | public function crop($iX = 0, $iY = 0, $iWidth = 1, $iHeight = 1) |
160 | 160 | { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @desc Dynamic Resize. |
174 | 174 | * @param integer $iNewWidth |
175 | 175 | * @param integer $iNewHeight |
176 | - * @return object $this |
|
176 | + * @return Image $this |
|
177 | 177 | */ |
178 | 178 | public function dynamicResize($iNewWidth, $iNewHeight) |
179 | 179 | { |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * @desc Square. |
205 | 205 | * @param integer $iSize |
206 | 206 | * @see \PH7\Framework\Image\Image::dynamicResize() The method that is returned by this method. |
207 | - * @return object $this |
|
207 | + * @return Image $this |
|
208 | 208 | */ |
209 | 209 | public function square($iSize) |
210 | 210 | { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * @param integer $iHeight |
218 | 218 | * @param string $sZone Default value is center. |
219 | 219 | * @see \PH7\Framework\Image\Image::crop() The method that is returned by this method. |
220 | - * @return object $this |
|
220 | + * @return Image $this |
|
221 | 221 | * @throws \PH7\Framework\Error\CException\PH7InvalidArgumentException If the image crop is invalid. |
222 | 222 | */ |
223 | 223 | public function zoneCrop($iWidth, $iHeight, $sZone = 'center') |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | * @desc Rotate. |
292 | 292 | * @param integer $iDeg Default value 0. |
293 | 293 | * @param integer $iBg Default value 0. |
294 | - * @return object $this |
|
294 | + * @return Image $this |
|
295 | 295 | */ |
296 | 296 | public function rotate($iDeg = 0, $iBg = 0) |
297 | 297 | { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * @desc Create a Watermark text. |
305 | 305 | * @param string $sText Text of watermark. |
306 | 306 | * @param integer $iSize The size of text. Between 0 to 5. |
307 | - * @return object $this |
|
307 | + * @return Image $this |
|
308 | 308 | */ |
309 | 309 | public function watermarkText($sText, $iSize) |
310 | 310 | { |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | /** |
342 | 342 | * @desc Save Image. |
343 | 343 | * @param string $sFile |
344 | - * @return object $this |
|
344 | + * @return Image $this |
|
345 | 345 | * @throws \PH7\Framework\Error\CException\PH7InvalidArgumentException If the image format is invalid. |
346 | 346 | */ |
347 | 347 | public function save($sFile) |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | |
374 | 374 | /** |
375 | 375 | * @desc Show Image. |
376 | - * @return object $this |
|
376 | + * @return Image $this |
|
377 | 377 | * @throws \PH7\Framework\Error\CException\PH7InvalidArgumentException If the image format is invalid. |
378 | 378 | */ |
379 | 379 | public function show() |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | |
409 | 409 | /** |
410 | 410 | * @desc Get File Name. |
411 | - * @return string |
|
411 | + * @return resource |
|
412 | 412 | */ |
413 | 413 | public function getFileName() |
414 | 414 | { |
@@ -198,6 +198,9 @@ |
||
198 | 198 | $this->form = $form; |
199 | 199 | } |
200 | 200 | |
201 | + /** |
|
202 | + * @param string $id |
|
203 | + */ |
|
201 | 204 | public function setID($id) |
202 | 205 | { |
203 | 206 | $this->attributes['id'] = $id; |
@@ -281,6 +281,10 @@ discard block |
||
281 | 281 | } |
282 | 282 | |
283 | 283 | /*This method restores the serialized form instance.*/ |
284 | + |
|
285 | + /** |
|
286 | + * @param string $id |
|
287 | + */ |
|
284 | 288 | private static function recover($id) |
285 | 289 | { |
286 | 290 | if(!empty($_SESSION['pfbc'][$id]['form'])) |
@@ -481,6 +485,10 @@ discard block |
||
481 | 485 | |
482 | 486 | /*Valldation errors are saved in the session after the form submission, and will be displayed to the user |
483 | 487 | when redirected back to the form.*/ |
488 | + |
|
489 | + /** |
|
490 | + * @param string $id |
|
491 | + */ |
|
484 | 492 | public static function setError($id, $errors, $element = '') |
485 | 493 | { |
486 | 494 | if(!is_array($errors)) |
@@ -493,11 +501,18 @@ discard block |
||
493 | 501 | } |
494 | 502 | |
495 | 503 | /*setSuccess*/ |
504 | + |
|
505 | + /** |
|
506 | + * @param string $id |
|
507 | + */ |
|
496 | 508 | public static function setSuccess($id, $success, $element = '') |
497 | 509 | { |
498 | 510 | return (new \PH7\Framework\Layout\Html\Design)->setFlashMsg($success); |
499 | 511 | } |
500 | 512 | |
513 | + /** |
|
514 | + * @param string $id |
|
515 | + */ |
|
501 | 516 | public static function setSessionValue($id, $element, $value) |
502 | 517 | { |
503 | 518 | $_SESSION['pfbc'][$id]['values'][$element] = $value; |
@@ -114,7 +114,7 @@ |
||
114 | 114 | * Get Time text. |
115 | 115 | * |
116 | 116 | * @param integer $iWaitTime |
117 | - * @return integer |
|
117 | + * @return string |
|
118 | 118 | */ |
119 | 119 | private static function _getTimeText($iWaitTime) |
120 | 120 | { |
@@ -357,7 +357,7 @@ |
||
357 | 357 | /** |
358 | 358 | * Set CSS/JS variables. |
359 | 359 | * |
360 | - * @param array $aVars Variable names containing the values. |
|
360 | + * @param array $aVals Variable names containing the values. |
|
361 | 361 | * @return void |
362 | 362 | */ |
363 | 363 | private function _setVariables(array $aVals) |