@@ -106,6 +106,9 @@ discard block |
||
| 106 | 106 | $this->collectLogs($this->logger, true); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | + /** |
|
| 110 | + * @param string $message |
|
| 111 | + */ |
|
| 109 | 112 | public function addMemoryUsage(&$message) |
| 110 | 113 | {
|
| 111 | 114 | $message .= PHP_EOL.'Использовано памяти: '.Yii::app()->format->formatSize(memory_get_usage()); |
@@ -114,11 +117,17 @@ discard block |
||
| 114 | 117 | $message .= sprintf(", la: %.2f, %.2f, %.2f", $load[0], $load[1], $load[2]).PHP_EOL;
|
| 115 | 118 | } |
| 116 | 119 | |
| 120 | + /** |
|
| 121 | + * @param double $time |
|
| 122 | + */ |
|
| 117 | 123 | public function formatTime($time) |
| 118 | 124 | {
|
| 119 | 125 | return sprintf("%d мин. %d с.", $time / 60, $time % 60);
|
| 120 | 126 | } |
| 121 | 127 | |
| 128 | + /** |
|
| 129 | + * @param string $timerId |
|
| 130 | + */ |
|
| 122 | 131 | public function startTimer($timerId) |
| 123 | 132 | {
|
| 124 | 133 | if( isset($this->timers[$timerId]) ) |
@@ -127,6 +136,9 @@ discard block |
||
| 127 | 136 | $this->timers[$timerId] = microtime(true); |
| 128 | 137 | } |
| 129 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $timerId |
|
| 141 | + */ |
|
| 130 | 142 | public function finishTimer($timerId, $message = '') |
| 131 | 143 | {
|
| 132 | 144 | if( !isset($this->timers[$timerId]) ) |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * Показать flash сообщение |
| 148 | - * @param $message |
|
| 148 | + * @param string $message |
|
| 149 | 149 | * @param string $key |
| 150 | 150 | */ |
| 151 | 151 | public static function showFlash($message, $key = 'success') |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | }); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $parameterNameId |
|
| 61 | + */ |
|
| 59 | 62 | private function getReindexProductIdList($parameterNameId) |
| 60 | 63 | {
|
| 61 | 64 | $criteria = new CDbCriteria(); |
@@ -59,6 +59,9 @@ |
||
| 59 | 59 | $this->assertTrue($this->findText($row, $checkedWord), 'failed textRow '.$checkedWord); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string $checkedWord |
|
| 64 | + */ |
|
| 62 | 65 | protected function findText($row, $checkedWord) |
| 63 | 66 | {
|
| 64 | 67 | return mb_strpos($row, $checkedWord) === false ? false : true; |
@@ -1000,7 +1000,6 @@ discard block |
||
| 1000 | 1000 | * Return file info or false on error |
| 1001 | 1001 | * |
| 1002 | 1002 | * @param string $hash file hash |
| 1003 | - * @param bool $realpath add realpath field to file info |
|
| 1004 | 1003 | * @return array|false |
| 1005 | 1004 | * @author Dmitry (dio) Levashov |
| 1006 | 1005 | **/ |
@@ -1022,7 +1021,6 @@ discard block |
||
| 1022 | 1021 | * Return folder info |
| 1023 | 1022 | * |
| 1024 | 1023 | * @param string $hash folder hash |
| 1025 | - * @param bool $hidden return hidden file info |
|
| 1026 | 1024 | * @return array|false |
| 1027 | 1025 | * @author Dmitry (dio) Levashov |
| 1028 | 1026 | **/ |
@@ -1349,7 +1347,6 @@ discard block |
||
| 1349 | 1347 | * |
| 1350 | 1348 | * @param Resource $fp file pointer |
| 1351 | 1349 | * @param string $dst destination folder hash |
| 1352 | - * @param string $src file name |
|
| 1353 | 1350 | * @param string $tmpname file tmp name - required to detect mime type |
| 1354 | 1351 | * @return array|false |
| 1355 | 1352 | * @author Dmitry (dio) Levashov |
@@ -1443,7 +1440,6 @@ discard block |
||
| 1443 | 1440 | * Paste files |
| 1444 | 1441 | * |
| 1445 | 1442 | * @param Object $volume source volume |
| 1446 | - * @param string $source file hash |
|
| 1447 | 1443 | * @param string $dst destination dir hash |
| 1448 | 1444 | * @param bool $rmSrc remove source after copy? |
| 1449 | 1445 | * @return array|false |
@@ -1543,7 +1539,7 @@ discard block |
||
| 1543 | 1539 | * Return file contents |
| 1544 | 1540 | * |
| 1545 | 1541 | * @param string $hash file hash |
| 1546 | - * @return string|false |
|
| 1542 | + * @return boolean|string |
|
| 1547 | 1543 | * @author Dmitry (dio) Levashov |
| 1548 | 1544 | **/ |
| 1549 | 1545 | public function getContents($hash) { |
@@ -1765,7 +1761,7 @@ discard block |
||
| 1765 | 1761 | * Return image dimensions |
| 1766 | 1762 | * |
| 1767 | 1763 | * @param string $hash file hash |
| 1768 | - * @return array |
|
| 1764 | + * @return false|string |
|
| 1769 | 1765 | * @author Dmitry (dio) Levashov |
| 1770 | 1766 | **/ |
| 1771 | 1767 | public function dimensions($hash) { |
@@ -1861,7 +1857,8 @@ discard block |
||
| 1861 | 1857 | * Not implemented |
| 1862 | 1858 | * |
| 1863 | 1859 | * @param string path |
| 1864 | - * @return mixed |
|
| 1860 | + * @param string $path |
|
| 1861 | + * @return string |
|
| 1865 | 1862 | * @author Dmitry (dio) Levashov |
| 1866 | 1863 | **/ |
| 1867 | 1864 | protected function crypt($path) { |
@@ -1873,7 +1870,8 @@ discard block |
||
| 1873 | 1870 | * Not implemented |
| 1874 | 1871 | * |
| 1875 | 1872 | * @param mixed hash |
| 1876 | - * @return mixed |
|
| 1873 | + * @param string $hash |
|
| 1874 | + * @return string |
|
| 1877 | 1875 | * @author Dmitry (dio) Levashov |
| 1878 | 1876 | **/ |
| 1879 | 1877 | protected function uncrypt($hash) { |
@@ -1902,7 +1900,6 @@ discard block |
||
| 1902 | 1900 | /** |
| 1903 | 1901 | * Return new unique name based on file name and suffix |
| 1904 | 1902 | * |
| 1905 | - * @param string $path file path |
|
| 1906 | 1903 | * @param string $suffix suffix append to name |
| 1907 | 1904 | * @return string |
| 1908 | 1905 | * @author Dmitry (dio) Levashov |
@@ -2418,7 +2415,7 @@ discard block |
||
| 2418 | 2415 | * @param string $src source path |
| 2419 | 2416 | * @param string $dst destination dir path |
| 2420 | 2417 | * @param string $name new file name (optionaly) |
| 2421 | - * @return string|false |
|
| 2418 | + * @return string|boolean |
|
| 2422 | 2419 | * @author Dmitry (dio) Levashov |
| 2423 | 2420 | **/ |
| 2424 | 2421 | protected function copy($src, $dst, $name) { |
@@ -2468,7 +2465,7 @@ discard block |
||
| 2468 | 2465 | * @param string $src source path |
| 2469 | 2466 | * @param string $dst destination dir path |
| 2470 | 2467 | * @param string $name new file name |
| 2471 | - * @return string|false |
|
| 2468 | + * @return string|boolean |
|
| 2472 | 2469 | * @author Dmitry (dio) Levashov |
| 2473 | 2470 | **/ |
| 2474 | 2471 | protected function move($src, $dst, $name) { |
@@ -2494,7 +2491,7 @@ discard block |
||
| 2494 | 2491 | * @param string $src source file hash |
| 2495 | 2492 | * @param string $destination destination dir path |
| 2496 | 2493 | * @param string $name file name |
| 2497 | - * @return string|false |
|
| 2494 | + * @return boolean|string |
|
| 2498 | 2495 | * @author Dmitry (dio) Levashov |
| 2499 | 2496 | **/ |
| 2500 | 2497 | protected function copyFrom($volume, $src, $destination, $name) { |
@@ -2662,7 +2659,6 @@ discard block |
||
| 2662 | 2659 | * Create thumnbnail and return it's URL on success |
| 2663 | 2660 | * |
| 2664 | 2661 | * @param string $path file path |
| 2665 | - * @param string $mime file mime type |
|
| 2666 | 2662 | * @return string|false |
| 2667 | 2663 | * @author Dmitry (dio) Levashov |
| 2668 | 2664 | **/ |
@@ -3024,7 +3020,7 @@ discard block |
||
| 3024 | 3020 | * |
| 3025 | 3021 | * @param string $command command line |
| 3026 | 3022 | * @param array $output stdout strings |
| 3027 | - * @param array $return_var process exit code |
|
| 3023 | + * @param integer $return_var process exit code |
|
| 3028 | 3024 | * @param array $error_output stderr strings |
| 3029 | 3025 | * @return int exit code |
| 3030 | 3026 | * @author Alexey Sukhotin |
@@ -3462,7 +3458,6 @@ discard block |
||
| 3462 | 3458 | * Open file and return file pointer |
| 3463 | 3459 | * |
| 3464 | 3460 | * @param string $path file path |
| 3465 | - * @param bool $write open file for writing |
|
| 3466 | 3461 | * @return resource|false |
| 3467 | 3462 | * @author Dmitry (dio) Levashov |
| 3468 | 3463 | **/ |
@@ -3515,7 +3510,7 @@ discard block |
||
| 3515 | 3510 | * Copy file into another file (only inside one volume) |
| 3516 | 3511 | * |
| 3517 | 3512 | * @param string $source source file path |
| 3518 | - * @param string $target target dir path |
|
| 3513 | + * @param string $targetDir target dir path |
|
| 3519 | 3514 | * @param string $name file name |
| 3520 | 3515 | * @return bool |
| 3521 | 3516 | * @author Dmitry (dio) Levashov |
@@ -3527,7 +3522,7 @@ discard block |
||
| 3527 | 3522 | * Return new file path or false. |
| 3528 | 3523 | * |
| 3529 | 3524 | * @param string $source source file path |
| 3530 | - * @param string $target target dir path |
|
| 3525 | + * @param string $targetDir target dir path |
|
| 3531 | 3526 | * @param string $name file name |
| 3532 | 3527 | * @return string|bool |
| 3533 | 3528 | * @author Dmitry (dio) Levashov |
@@ -402,7 +402,6 @@ discard block |
||
| 402 | 402 | * Open file and return file pointer |
| 403 | 403 | * |
| 404 | 404 | * @param string $path file path |
| 405 | - * @param bool $write open file for writing |
|
| 406 | 405 | * @return resource|false |
| 407 | 406 | * @author Dmitry (dio) Levashov |
| 408 | 407 | **/ |
@@ -428,7 +427,7 @@ discard block |
||
| 428 | 427 | * |
| 429 | 428 | * @param string $path parent dir path |
| 430 | 429 | * @param string $name new directory name |
| 431 | - * @return string|bool |
|
| 430 | + * @return string|false |
|
| 432 | 431 | * @author Dmitry (dio) Levashov |
| 433 | 432 | **/ |
| 434 | 433 | protected function _mkdir($path, $name) { |
@@ -447,7 +446,7 @@ discard block |
||
| 447 | 446 | * |
| 448 | 447 | * @param string $path parent dir path |
| 449 | 448 | * @param string $name new file name |
| 450 | - * @return string|bool |
|
| 449 | + * @return string|false |
|
| 451 | 450 | * @author Dmitry (dio) Levashov |
| 452 | 451 | **/ |
| 453 | 452 | protected function _mkfile($path, $name) { |
@@ -492,9 +491,9 @@ discard block |
||
| 492 | 491 | * Return new file path or false. |
| 493 | 492 | * |
| 494 | 493 | * @param string $source source file path |
| 495 | - * @param string $target target dir path |
|
| 494 | + * @param string $targetDir target dir path |
|
| 496 | 495 | * @param string $name file name |
| 497 | - * @return string|bool |
|
| 496 | + * @return string|false |
|
| 498 | 497 | * @author Dmitry (dio) Levashov |
| 499 | 498 | **/ |
| 500 | 499 | protected function _move($source, $targetDir, $name) { |
@@ -532,7 +531,7 @@ discard block |
||
| 532 | 531 | * @param string $dir target dir path |
| 533 | 532 | * @param string $name file name |
| 534 | 533 | * @param array $stat file stat (required by some virtual fs) |
| 535 | - * @return bool|string |
|
| 534 | + * @return false|string |
|
| 536 | 535 | * @author Dmitry (dio) Levashov |
| 537 | 536 | **/ |
| 538 | 537 | protected function _save($fp, $dir, $name, $stat) { |
@@ -741,7 +740,7 @@ discard block |
||
| 741 | 740 | * @param array $files files names list |
| 742 | 741 | * @param string $name archive name |
| 743 | 742 | * @param array $arc archiver options |
| 744 | - * @return string|bool |
|
| 743 | + * @return string|false |
|
| 745 | 744 | * @author Dmitry (dio) Levashov, |
| 746 | 745 | * @author Alexey Sukhotin |
| 747 | 746 | **/ |
@@ -273,7 +273,6 @@ discard block |
||
| 273 | 273 | * @param string $hash image file |
| 274 | 274 | * @param int $width new width |
| 275 | 275 | * @param int $height new height |
| 276 | - * @param bool $crop crop image |
|
| 277 | 276 | * @return array|false |
| 278 | 277 | * @author Dmitry (dio) Levashov |
| 279 | 278 | * @author Alexey Sukhotin |
@@ -686,7 +685,7 @@ discard block |
||
| 686 | 685 | * Close opened file |
| 687 | 686 | * |
| 688 | 687 | * @param resource $fp file pointer |
| 689 | - * @return bool |
|
| 688 | + * @return boolean|null |
|
| 690 | 689 | * @author Dmitry (dio) Levashov |
| 691 | 690 | **/ |
| 692 | 691 | protected function _fclose($fp, $path='') { |
@@ -703,7 +702,7 @@ discard block |
||
| 703 | 702 | * |
| 704 | 703 | * @param string $path parent dir path |
| 705 | 704 | * @param string $name new directory name |
| 706 | - * @return string|bool |
|
| 705 | + * @return string|false |
|
| 707 | 706 | * @author Dmitry (dio) Levashov |
| 708 | 707 | **/ |
| 709 | 708 | protected function _mkdir($path, $name) { |
@@ -715,7 +714,7 @@ discard block |
||
| 715 | 714 | * |
| 716 | 715 | * @param string $path parent dir path |
| 717 | 716 | * @param string $name new file name |
| 718 | - * @return string|bool |
|
| 717 | + * @return string|false |
|
| 719 | 718 | * @author Dmitry (dio) Levashov |
| 720 | 719 | **/ |
| 721 | 720 | protected function _mkfile($path, $name) { |
@@ -759,9 +758,9 @@ discard block |
||
| 759 | 758 | * Return new file path or false. |
| 760 | 759 | * |
| 761 | 760 | * @param string $source source file path |
| 762 | - * @param string $target target dir path |
|
| 761 | + * @param string $targetDir target dir path |
|
| 763 | 762 | * @param string $name file name |
| 764 | - * @return string|bool |
|
| 763 | + * @return string|false |
|
| 765 | 764 | * @author Dmitry (dio) Levashov |
| 766 | 765 | **/ |
| 767 | 766 | protected function _move($source, $targetDir, $name) { |
@@ -934,7 +933,7 @@ discard block |
||
| 934 | 933 | * |
| 935 | 934 | * @param string $path archive path |
| 936 | 935 | * @param array $arc archiver command and arguments (same as in $this->archivers) |
| 937 | - * @return true |
|
| 936 | + * @return boolean |
|
| 938 | 937 | * @author Dmitry (dio) Levashov, |
| 939 | 938 | * @author Alexey Sukhotin |
| 940 | 939 | **/ |