@@ -24,6 +24,9 @@ |
||
24 | 24 | class StateFullCommand implements ICommand { |
25 | 25 | private $state; |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $state |
|
29 | + */ |
|
27 | 30 | function __construct($state) { |
28 | 31 | $this->state = $state; |
29 | 32 | } |
@@ -46,6 +46,10 @@ |
||
46 | 46 | |
47 | 47 | class SimpleUserForTesting implements \OCP\IUser { |
48 | 48 | |
49 | + /** |
|
50 | + * @param string $uid |
|
51 | + * @param string $displayName |
|
52 | + */ |
|
49 | 53 | public function __construct($uid, $displayName) { |
50 | 54 | |
51 | 55 | $this->uid = $uid; |
@@ -37,6 +37,9 @@ |
||
37 | 37 | $this->formatter = new \OC\DateTimeFormatter(new \DateTimeZone('UTC'), new \OC_L10N('lib', 'en')); |
38 | 38 | } |
39 | 39 | |
40 | + /** |
|
41 | + * @param integer $time |
|
42 | + */ |
|
40 | 43 | protected function getTimestampAgo($time, $seconds = 0, $minutes = 0, $hours = 0, $days = 0, $years = 0) { |
41 | 44 | return $time - $seconds - $minutes * 60 - $hours * 3600 - $days * 24*3600 - $years * 365*24*3600; |
42 | 45 | } |
@@ -322,11 +322,19 @@ |
||
322 | 322 | $this->assertSame(2, $query->execute(array('uri1'))); |
323 | 323 | } |
324 | 324 | |
325 | + /** |
|
326 | + * @param string $fullname |
|
327 | + * @param string $uri |
|
328 | + */ |
|
325 | 329 | protected function insertCardData($fullname, $uri) { |
326 | 330 | $query = OC_DB::prepare("INSERT INTO `*PREFIX*{$this->table2}` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)"); |
327 | 331 | $this->assertSame(1, $query->execute(array($fullname, $uri, $this->getUniqueID()))); |
328 | 332 | } |
329 | 333 | |
334 | + /** |
|
335 | + * @param string $fullname |
|
336 | + * @param string $uri |
|
337 | + */ |
|
330 | 338 | protected function updateCardData($fullname, $uri) { |
331 | 339 | $query = OC_DB::prepare("UPDATE `*PREFIX*{$this->table2}` SET `uri` = ? WHERE `fullname` = ?"); |
332 | 340 | return $query->execute(array($uri, $fullname)); |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | - * @return \Doctrine\DBAL\Schema\Schema[] |
|
55 | + * @return Schema[] |
|
56 | 56 | */ |
57 | 57 | private function getDuplicateKeySchemas() { |
58 | 58 | $startSchema = new Schema(array(), array(), $this->getSchemaConfig()); |
@@ -217,6 +217,7 @@ |
||
217 | 217 | * create mock of the update method |
218 | 218 | * |
219 | 219 | * @param array$methods methods which should be set |
220 | + * @param string[] $methods |
|
220 | 221 | * @return \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject |
221 | 222 | */ |
222 | 223 | protected function getUpdateMock($methods) { |
@@ -415,6 +415,10 @@ discard block |
||
415 | 415 | $this->copyBetweenStorages($storage1, $storage2); |
416 | 416 | } |
417 | 417 | |
418 | + /** |
|
419 | + * @param \OC\Files\Storage\Storage $storage1 |
|
420 | + * @param \OC\Files\Storage\Storage $storage2 |
|
421 | + */ |
|
418 | 422 | function copyBetweenStorages($storage1, $storage2) { |
419 | 423 | \OC\Files\Filesystem::mount($storage1, array(), '/'); |
420 | 424 | \OC\Files\Filesystem::mount($storage2, array(), '/substorage'); |
@@ -461,6 +465,10 @@ discard block |
||
461 | 465 | $this->moveBetweenStorages($storage1, $storage2); |
462 | 466 | } |
463 | 467 | |
468 | + /** |
|
469 | + * @param \OC\Files\Storage\Storage $storage1 |
|
470 | + * @param \OC\Files\Storage\Storage $storage2 |
|
471 | + */ |
|
464 | 472 | function moveBetweenStorages($storage1, $storage2) { |
465 | 473 | \OC\Files\Filesystem::mount($storage1, array(), '/'); |
466 | 474 | \OC\Files\Filesystem::mount($storage2, array(), '/substorage'); |
@@ -895,6 +903,9 @@ discard block |
||
895 | 903 | return $this->relativePathProvider(null); |
896 | 904 | } |
897 | 905 | |
906 | + /** |
|
907 | + * @param string|null $missingRootExpectedPath |
|
908 | + */ |
|
898 | 909 | public function relativePathProvider($missingRootExpectedPath) { |
899 | 910 | return array( |
900 | 911 | // No root - returns the path |
@@ -1095,6 +1106,9 @@ discard block |
||
1095 | 1106 | $this->doTestCopyRenameFail('copy'); |
1096 | 1107 | } |
1097 | 1108 | |
1109 | + /** |
|
1110 | + * @param string $operation |
|
1111 | + */ |
|
1098 | 1112 | private function doTestCopyRenameFail($operation) { |
1099 | 1113 | $storage1 = new Temporary(array()); |
1100 | 1114 | /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Files\Storage\Temporary $storage2 */ |
@@ -1509,7 +1523,7 @@ discard block |
||
1509 | 1523 | /** |
1510 | 1524 | * Create test movable mount points |
1511 | 1525 | * |
1512 | - * @param array $mountPoints array of mount point locations |
|
1526 | + * @param string[] $mountPoints array of mount point locations |
|
1513 | 1527 | * @return array array of MountPoint objects |
1514 | 1528 | */ |
1515 | 1529 | private function createTestMovableMountPoints($mountPoints) { |
@@ -1735,7 +1749,7 @@ discard block |
||
1735 | 1749 | * @param string $lockedPath path of the locked item to check |
1736 | 1750 | * @param string $hookType hook type |
1737 | 1751 | * @param int $expectedLockBefore expected lock during pre hooks |
1738 | - * @param int $expectedLockduring expected lock during operation |
|
1752 | + * @param int $expectedLockDuring expected lock during operation |
|
1739 | 1753 | * @param int $expectedLockAfter expected lock during post hooks |
1740 | 1754 | * @param int $expectedStrayLock expected lock after returning, should |
1741 | 1755 | * be null (unlock) for most operations |
@@ -517,8 +517,8 @@ |
||
517 | 517 | /** |
518 | 518 | * Allows us to test private methods/properties |
519 | 519 | * |
520 | - * @param $object |
|
521 | - * @param $methodName |
|
520 | + * @param OC\Files\View $object |
|
521 | + * @param string $methodName |
|
522 | 522 | * @param array $parameters |
523 | 523 | * @return mixed |
524 | 524 | * @deprecated Please extend \Test\TestCase and use self::invokePrivate() then |
@@ -104,7 +104,7 @@ |
||
104 | 104 | * Returns the storage id based on the numeric id |
105 | 105 | * |
106 | 106 | * @param int $storageId numeric id of the storage |
107 | - * @return string storage id or null if not found |
|
107 | + * @return integer|null storage id or null if not found |
|
108 | 108 | */ |
109 | 109 | private function getStorageId($storageId) { |
110 | 110 | $numericId = Storage::getNumericStorageId($storageId); |