Completed
Pull Request — master (#15)
by recca
28:11 queued 22:10
created
lib/elFinderVolumeFTP.class.php 1 patch
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
      * Return ftp transfer mode for file.
574 574
      *
575 575
      * @param  string  $path  file path
576
-     * @return string
576
+     * @return integer
577 577
      * @author Dmitry (dio) Levashov
578 578
      **/
579 579
     protected function ftpMode($path)
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
      * If file does not exists - returns empty array or false.
765 765
      *
766 766
      * @param  string  $path    file path
767
-     * @return array|false
767
+     * @return string
768 768
      * @author Dmitry (dio) Levashov
769 769
      **/
770 770
     protected function _stat($path)
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
      *
1049 1049
      * @param  resource $fp file pointer
1050 1050
      * @param string $path
1051
-     * @return bool
1051
+     * @return boolean|null
1052 1052
      * @author Dmitry (dio) Levashov
1053 1053
      */
1054 1054
     protected function _fclose($fp, $path = '')
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
      *
1067 1067
      * @param  string  $path  parent dir path
1068 1068
      * @param string  $name  new directory name
1069
-     * @return string|bool
1069
+     * @return false|string
1070 1070
      * @author Dmitry (dio) Levashov
1071 1071
      **/
1072 1072
     protected function _mkdir($path, $name)
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
      *
1087 1087
      * @param  string  $path  parent dir path
1088 1088
      * @param string  $name  new file name
1089
-     * @return string|bool
1089
+     * @return string|false
1090 1090
      * @author Dmitry (dio) Levashov
1091 1091
      **/
1092 1092
     protected function _mkfile($path, $name)
@@ -1123,7 +1123,7 @@  discard block
 block discarded – undo
1123 1123
      * @param  string  $source     source file path
1124 1124
      * @param  string  $targetDir  target directory path
1125 1125
      * @param  string  $name       new file name
1126
-     * @return bool
1126
+     * @return string|false
1127 1127
      * @author Dmitry (dio) Levashov
1128 1128
      **/
1129 1129
     protected function _copy($source, $targetDir, $name)
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
      * @param  string $source source file path
1152 1152
      * @param $targetDir
1153 1153
      * @param  string $name file name
1154
-     * @return bool|string
1154
+     * @return string|false
1155 1155
      * @internal param string $target target dir path
1156 1156
      * @author Dmitry (dio) Levashov
1157 1157
      */
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
      * @param  string    $dir  target dir path
1195 1195
      * @param  string    $name file name
1196 1196
      * @param  array     $stat file stat (required by some virtual fs)
1197
-     * @return bool|string
1197
+     * @return string|false
1198 1198
      * @author Dmitry (dio) Levashov
1199 1199
      **/
1200 1200
     protected function _save($fp, $dir, $name, $stat)
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
      *
1271 1271
      * @param string $path
1272 1272
      * @param string $mode
1273
-     * @return bool
1273
+     * @return integer
1274 1274
      */
1275 1275
     protected function _chmod($path, $mode)
1276 1276
     {
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
      * Recursive symlinks search.
1284 1284
      *
1285 1285
      * @param  string  $path  file/dir path
1286
-     * @return bool
1286
+     * @return boolean|null
1287 1287
      * @author Dmitry (dio) Levashov
1288 1288
      **/
1289 1289
     protected function _findSymlinks($path)
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
      * @param  array   $files  files names list
1463 1463
      * @param  string  $name   archive name
1464 1464
      * @param  array   $arc    archiver options
1465
-     * @return string|bool
1465
+     * @return false|string
1466 1466
      * @author Dmitry (dio) Levashov,
1467 1467
      * @author Alexey Sukhotin
1468 1468
      **/
@@ -1587,9 +1587,9 @@  discard block
 block discarded – undo
1587 1587
      * Downloads specified files from remote directory
1588 1588
      * if there is a directory among files it is downloaded recursively (omitting symbolic links).
1589 1589
      *
1590
-     * @param $remote_directory string remote FTP path to a source directory to download from.
1590
+     * @param string $remote_directory string remote FTP path to a source directory to download from.
1591 1591
      * @param array $files list of files to download from remote directory.
1592
-     * @param $dest_local_directory string destination folder to store downloaded files.
1592
+     * @param string $dest_local_directory string destination folder to store downloaded files.
1593 1593
      * @return bool true on success and false on failure.
1594 1594
      */
1595 1595
     private function ftp_download_files($remote_directory, array $files, $dest_local_directory)
@@ -1664,7 +1664,7 @@  discard block
 block discarded – undo
1664 1664
     /**
1665 1665
      * Returns array of strings containing all files and folders in the specified local directory.
1666 1666
      * @param $dir
1667
-     * @param $omitSymlinks
1667
+     * @param boolean $omitSymlinks
1668 1668
      * @param string $prefix
1669 1669
      * @return array array of files and folders names relative to the $path
1670 1670
      * or an empty array if the directory $path is empty,
Please login to merge, or discard this patch.
lib/elFinderVolumeLocalFileSystem.class.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
      *
829 829
      * @param  string  $path  parent dir path
830 830
      * @param string  $name  new directory name
831
-     * @return string|bool
831
+     * @return string|false
832 832
      * @author Dmitry (dio) Levashov
833 833
      **/
834 834
     protected function _mkdir($path, $name)
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
      *
851 851
      * @param  string  $path  parent dir path
852 852
      * @param string  $name  new file name
853
-     * @return string|bool
853
+     * @return string|false
854 854
      * @author Dmitry (dio) Levashov
855 855
      **/
856 856
     protected function _mkfile($path, $name)
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
      * @param  string $source source file path
911 911
      * @param $targetDir
912 912
      * @param  string $name file name
913
-     * @return bool|string
913
+     * @return string|false
914 914
      * @internal param string $target target dir path
915 915
      * @author Dmitry (dio) Levashov
916 916
      */
@@ -1196,7 +1196,7 @@  discard block
 block discarded – undo
1196 1196
      * @param  array   $files  files names list
1197 1197
      * @param  string  $name   archive name
1198 1198
      * @param  array   $arc    archiver options
1199
-     * @return string|bool
1199
+     * @return false|string
1200 1200
      * @author Dmitry (dio) Levashov,
1201 1201
      * @author Alexey Sukhotin
1202 1202
      **/
Please login to merge, or discard this patch.
lib/elFinderVolumeMySQL.class.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
      *
655 655
      * @param  resource $fp file pointer
656 656
      * @param string $path
657
-     * @return bool
657
+     * @return boolean|null
658 658
      * @author Dmitry (dio) Levashov
659 659
      */
660 660
     protected function _fclose($fp, $path = '')
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
      *
673 673
      * @param  string  $path  parent dir path
674 674
      * @param string  $name  new directory name
675
-     * @return string|bool
675
+     * @return string|false
676 676
      * @author Dmitry (dio) Levashov
677 677
      **/
678 678
     protected function _mkdir($path, $name)
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
      *
686 686
      * @param  string  $path  parent dir path
687 687
      * @param string  $name  new file name
688
-     * @return string|bool
688
+     * @return string|false
689 689
      * @author Dmitry (dio) Levashov
690 690
      **/
691 691
     protected function _mkfile($path, $name)
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
      * @param  string $source source file path
736 736
      * @param $targetDir
737 737
      * @param  string $name file name
738
-     * @return bool|string
738
+     * @return string|false
739 739
      * @internal param string $target target dir path
740 740
      * @author Dmitry (dio) Levashov
741 741
      */
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
      *
930 930
      * @param  string  $path  archive path
931 931
      * @param  array   $arc   archiver command and arguments (same as in $this->archivers)
932
-     * @return true
932
+     * @return boolean
933 933
      * @author Dmitry (dio) Levashov,
934 934
      * @author Alexey Sukhotin
935 935
      **/
Please login to merge, or discard this patch.
lib/elFinderFlysystemGoogleDriveNetmount.php 1 patch
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use League\Flysystem\Filesystem;
4
-use League\Flysystem\Adapter\Local;
3
+use Hypweb\Flysystem\Cached\Extra\DisableEnsureParentDirectories;
5 4
 use Hypweb\Flysystem\Cached\Extra\Hasdir;
6
-use League\Flysystem\Cached\CachedAdapter;
7 5
 use Hypweb\Flysystem\GoogleDrive\GoogleDriveAdapter;
6
+use League\Flysystem\Adapter\Local;
7
+use League\Flysystem\Cached\CachedAdapter;
8 8
 use League\Flysystem\Cached\Storage\Adapter as ACache;
9
-use Hypweb\Flysystem\Cached\Extra\DisableEnsureParentDirectories;
9
+use League\Flysystem\Filesystem;
10 10
 
11 11
 elFinder::$netDrivers['googledrive'] = 'FlysystemGoogleDriveNetmount';
12 12
 
Please login to merge, or discard this patch.
lib/elFinderVolumeBox.class.php 1 patch
Doc Comments   +11 added lines, -18 removed lines patch added patch discarded remove patch
@@ -284,7 +284,6 @@  discard block
 block discarded – undo
284 284
      * process of on netunmount
285 285
      * Drop `box` & rm thumbs.
286 286
      *
287
-     * @param array $options
288 287
      *
289 288
      * @return bool
290 289
      */
@@ -393,11 +392,9 @@  discard block
 block discarded – undo
393 392
     /**
394 393
      * Obtains a new access token from OAuth. This token is valid for one hour.
395 394
      *
396
-     * @param string $clientSecret The Box client secret
395
+     * @param string $client_secret The Box client secret
397 396
      * @param string $code         The code returned by Box after
398 397
      *                             successful log in
399
-     * @param string $redirectUri  Must be the same as the redirect URI passed
400
-     *                             to LoginUrl
401 398
      *
402 399
      * @throws \Exception Thrown if this Client instance's clientId is not set
403 400
      * @throws \Exception Thrown if the redirect URI of this Client instance's
@@ -449,7 +446,7 @@  discard block
 block discarded – undo
449 446
     /**
450 447
      * Get token and auto refresh.
451 448
      *
452
-     * @return true|string error message
449
+     * @return boolean error message
453 450
      */
454 451
     protected function _bd_refreshToken()
455 452
     {
@@ -533,8 +530,8 @@  discard block
 block discarded – undo
533 530
     /**
534 531
      * Creates a base cURL object which is compatible with the Box.com API.
535 532
      *
536
-     * @param string $path The path of the API call (eg. /folders/0)
537 533
      *
534
+     * @param string $url
538 535
      * @return resource A compatible cURL object
539 536
      */
540 537
     protected function _bd_fetch($url, $contents = false)
@@ -582,7 +579,7 @@  discard block
 block discarded – undo
582 579
      *
583 580
      * @param resource    $curl
584 581
      * @param bool|string $decodeOrParent
585
-     * @param array       $headers
582
+     * @param string[]       $headers
586 583
      *
587 584
      * @throws \Exception
588 585
      *
@@ -636,7 +633,6 @@  discard block
 block discarded – undo
636 633
     /**
637 634
      * Drive query and fetchAll.
638 635
      *
639
-     * @param string $sql
640 636
      *
641 637
      * @return bool|array
642 638
      */
@@ -740,7 +736,6 @@  discard block
 block discarded – undo
740 736
      * Get thumbnail from Box.com.
741 737
      *
742 738
      * @param string $path
743
-     * @param string $size
744 739
      *
745 740
      * @return string | boolean
746 741
      */
@@ -763,6 +758,7 @@  discard block
 block discarded – undo
763 758
      * Remove item.
764 759
      *
765 760
      * @param string $path file path
761
+     * @param string $type
766 762
      *
767 763
      * @return bool
768 764
      **/
@@ -979,7 +975,7 @@  discard block
 block discarded – undo
979 975
      * @param string $dst  destination dir path
980 976
      * @param string $name new file name (optionaly)
981 977
      *
982
-     * @return string|false
978
+     * @return string|boolean
983 979
      *
984 980
      * @author Dmitry (dio) Levashov
985 981
      * @author Naoki Sawada
@@ -1038,7 +1034,6 @@  discard block
 block discarded – undo
1038 1034
      * Create thumnbnail and return it's URL on success.
1039 1035
      *
1040 1036
      * @param string $path file path
1041
-     * @param string $mime file mime type
1042 1037
      *
1043 1038
      * @return string|false
1044 1039
      *
@@ -1395,7 +1390,6 @@  discard block
 block discarded – undo
1395 1390
      * Open file and return file pointer.
1396 1391
      *
1397 1392
      * @param string $path  file path
1398
-     * @param bool   $write open file for writing
1399 1393
      *
1400 1394
      * @return resource|false
1401 1395
      *
@@ -1421,7 +1415,7 @@  discard block
 block discarded – undo
1421 1415
      *
1422 1416
      * @param resource $fp file pointer
1423 1417
      *
1424
-     * @return bool
1418
+     * @return boolean|null
1425 1419
      *
1426 1420
      * @author Dmitry (dio) Levashov
1427 1421
      **/
@@ -1505,7 +1499,7 @@  discard block
 block discarded – undo
1505 1499
      * @param string $targetDir target directory path
1506 1500
      * @param string $name      new file name
1507 1501
      *
1508
-     * @return string|false
1502
+     * @return string|boolean
1509 1503
      *
1510 1504
      * @author Dmitry (dio) Levashov
1511 1505
      **/
@@ -1552,7 +1546,7 @@  discard block
 block discarded – undo
1552 1546
      * Return new file path or false.
1553 1547
      *
1554 1548
      * @param string $source source file path
1555
-     * @param string $target target dir path
1549
+     * @param string $targetDir target dir path
1556 1550
      * @param string $name   file name
1557 1551
      *
1558 1552
      * @return string|bool
@@ -1630,7 +1624,6 @@  discard block
 block discarded – undo
1630 1624
      * Return new file path or false on error.
1631 1625
      *
1632 1626
      * @param resource $fp   file pointer
1633
-     * @param string   $dir  target dir path
1634 1627
      * @param string   $name file name
1635 1628
      * @param array    $stat file stat (required by some virtual fs)
1636 1629
      *
@@ -1729,7 +1722,7 @@  discard block
 block discarded – undo
1729 1722
      * @param string $path    file path
1730 1723
      * @param string $content new file content
1731 1724
      *
1732
-     * @return bool
1725
+     * @return string|boolean
1733 1726
      *
1734 1727
      * @author Dmitry (dio) Levashov
1735 1728
      **/
@@ -1791,7 +1784,7 @@  discard block
 block discarded – undo
1791 1784
      *
1792 1785
      * @param string $path file/dir path
1793 1786
      *
1794
-     * @return bool
1787
+     * @return boolean|null
1795 1788
      *
1796 1789
      * @author Dmitry (dio) Levashov
1797 1790
      **/
Please login to merge, or discard this patch.
lib/elFinderVolumeOneDrive.class.php 1 patch
Doc Comments   +12 added lines, -16 removed lines patch added patch discarded remove patch
@@ -294,7 +294,6 @@  discard block
 block discarded – undo
294 294
      * process of on netunmount
295 295
      * Drop `onedrive` & rm thumbs.
296 296
      *
297
-     * @param array $options
298 297
      *
299 298
      * @return bool
300 299
      */
@@ -382,11 +381,9 @@  discard block
 block discarded – undo
382 381
     /**
383 382
      * Obtains a new access token from OAuth. This token is valid for one hour.
384 383
      *
385
-     * @param string $clientSecret The OneDrive client secret
384
+     * @param string $client_secret The OneDrive client secret
386 385
      * @param string $code         The code returned by OneDrive after
387 386
      *                             successful log in
388
-     * @param string $redirectUri  Must be the same as the redirect URI passed
389
-     *                             to LoginUrl
390 387
      *
391 388
      * @throws \Exception Thrown if this Client instance's clientId is not set
392 389
      * @throws \Exception Thrown if the redirect URI of this Client instance's
@@ -456,7 +453,7 @@  discard block
 block discarded – undo
456 453
     /**
457 454
      * Get token and auto refresh.
458 455
      *
459
-     * @return true|Exception
456
+     * @return boolean
460 457
      */
461 458
     protected function _od_refreshToken()
462 459
     {
@@ -563,6 +560,7 @@  discard block
 block discarded – undo
563 560
     /**
564 561
      * Creates a base cURL object which is compatible with the OneDrive API.
565 562
      *
563
+     * @param string $url
566 564
      * @return resource A compatible cURL object
567 565
      */
568 566
     protected function _od_prepareCurl($url = null)
@@ -621,7 +619,6 @@  discard block
 block discarded – undo
621 619
     /**
622 620
      * Drive query and fetchAll.
623 621
      *
624
-     * @param string $sql
625 622
      *
626 623
      * @return object|array
627 624
      */
@@ -716,7 +713,7 @@  discard block
 block discarded – undo
716 713
      *
717 714
      * @param string $path
718 715
      *
719
-     * @return array|object onedrive metadata
716
+     * @return string onedrive metadata
720 717
      */
721 718
     protected function _od_getFileRaw($path)
722 719
     {
@@ -734,7 +731,6 @@  discard block
 block discarded – undo
734 731
      * Get thumbnail from OneDrive.com.
735 732
      *
736 733
      * @param string $path
737
-     * @param string $size
738 734
      *
739 735
      * @return string | boolean
740 736
      */
@@ -854,6 +850,9 @@  discard block
 block discarded – undo
854 850
         $this->disabled[] = 'extract';
855 851
     }
856 852
 
853
+    /**
854
+     * @param string $path
855
+     */
857 856
     protected function isNameExists($path)
858 857
     {
859 858
         list($pid, $name) = $this->_od_splitPath($path);
@@ -907,7 +906,7 @@  discard block
 block discarded – undo
907 906
      * @param string $dst  destination dir path
908 907
      * @param string $name new file name (optionaly)
909 908
      *
910
-     * @return string|false
909
+     * @return boolean
911 910
      *
912 911
      * @author Dmitry (dio) Levashov
913 912
      * @author Naoki Sawada
@@ -974,7 +973,6 @@  discard block
 block discarded – undo
974 973
      * Create thumnbnail and return it's URL on success.
975 974
      *
976 975
      * @param string $path file path
977
-     * @param string $mime file mime type
978 976
      *
979 977
      * @return string|false
980 978
      *
@@ -1296,7 +1294,6 @@  discard block
 block discarded – undo
1296 1294
      * Open file and return file pointer.
1297 1295
      *
1298 1296
      * @param string $path  file path
1299
-     * @param bool   $write open file for writing
1300 1297
      *
1301 1298
      * @return resource|false
1302 1299
      *
@@ -1322,7 +1319,7 @@  discard block
 block discarded – undo
1322 1319
      *
1323 1320
      * @param resource $fp file pointer
1324 1321
      *
1325
-     * @return bool
1322
+     * @return boolean|null
1326 1323
      *
1327 1324
      * @author Dmitry (dio) Levashov
1328 1325
      **/
@@ -1494,7 +1491,7 @@  discard block
 block discarded – undo
1494 1491
      * Return new file path or false.
1495 1492
      *
1496 1493
      * @param string $source source file path
1497
-     * @param string $target target dir path
1494
+     * @param string $targetDir target dir path
1498 1495
      * @param string $name   file name
1499 1496
      *
1500 1497
      * @return string|bool
@@ -1589,7 +1586,6 @@  discard block
 block discarded – undo
1589 1586
      * Return new file path or false on error.
1590 1587
      *
1591 1588
      * @param resource $fp   file pointer
1592
-     * @param string   $dir  target dir path
1593 1589
      * @param string   $name file name
1594 1590
      * @param array    $stat file stat (required by some virtual fs)
1595 1591
      *
@@ -1680,7 +1676,7 @@  discard block
 block discarded – undo
1680 1676
      * @param string $path    file path
1681 1677
      * @param string $content new file content
1682 1678
      *
1683
-     * @return bool
1679
+     * @return string|boolean
1684 1680
      *
1685 1681
      * @author Dmitry (dio) Levashov
1686 1682
      **/
@@ -1742,7 +1738,7 @@  discard block
 block discarded – undo
1742 1738
      *
1743 1739
      * @param string $path file/dir path
1744 1740
      *
1745
-     * @return bool
1741
+     * @return boolean|null
1746 1742
      *
1747 1743
      * @author Dmitry (dio) Levashov
1748 1744
      **/
Please login to merge, or discard this patch.
lib/libs/GdBmp.php 1 patch
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
  * 以下のものは非対応
63 63
  *   BITMAPV4HEADER と BITMAPV5HEADER に含まれる色空間に関する様ã€
64 64
  * な機能
65
- * @param $filename_or_stream_or_binary
65
+ * @param string $filename_or_stream_or_binary
66 66
  * @return bool|resource
67 67
  */
68 68
 function imagecreatefrombmp($filename_or_stream_or_binary)
@@ -100,6 +100,9 @@  discard block
 block discarded – undo
100 100
         return $bmp;
101 101
     }
102 102
 
103
+    /**
104
+     * @param string $str
105
+     */
103 106
     public static function loadFromString($str)
104 107
     {
105 108
         //data scheme より古いバージョンから対応しているようなので php://memory を使う
@@ -127,6 +130,9 @@  discard block
 block discarded – undo
127 130
         return $bmp;
128 131
     }
129 132
 
133
+    /**
134
+     * @param resource $stream
135
+     */
130 136
     public static function loadFromStream($stream)
131 137
     {
132 138
         $buf = fread($stream, 14); //2+4+2+2+4
Please login to merge, or discard this patch.