@@ -1,12 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace OC\Migrations; |
3 | 3 | |
4 | -use OC\User\Account; |
|
5 | 4 | use OC\User\AccountMapper; |
6 | 5 | use OC\User\AccountTermMapper; |
7 | 6 | use OC\User\Database; |
8 | 7 | use OC\User\SyncService; |
9 | -use OCP\IConfig; |
|
10 | 8 | use OCP\Migration\ISimpleMigration; |
11 | 9 | use OCP\Migration\IOutput; |
12 | 10 |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Delegate to term mapper to avoid needing to inject term mapper |
44 | - * @param $account_id |
|
45 | - * @param array $terms |
|
44 | + * @param integer $account_id |
|
45 | + * @param string[] $terms |
|
46 | 46 | */ |
47 | 47 | public function setTermsForAccount($account_id, array $terms) { |
48 | 48 | $this->termMapper->setTermsForAccount($account_id, $terms); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Delegate to term mapper to avoid needing to inject term mapper |
53 | - * @param $account_id |
|
53 | + * @param integer $account_id |
|
54 | 54 | * @return AccountTerm[] $terms |
55 | 55 | */ |
56 | 56 | public function findByAccountId($account_id) { |
@@ -162,6 +162,9 @@ discard block |
||
162 | 162 | return $this->findEntities($qb->getSQL(), $qb->getParameters(), $limit, $offset); |
163 | 163 | } |
164 | 164 | |
165 | + /** |
|
166 | + * @param boolean $hasLoggedIn |
|
167 | + */ |
|
165 | 168 | public function getUserCountPerBackend($hasLoggedIn) { |
166 | 169 | $qb = $this->db->getQueryBuilder(); |
167 | 170 | $qb->select(['backend', $qb->createFunction('count(*) as `count`')]) |
@@ -184,6 +187,9 @@ discard block |
||
184 | 187 | return $return; |
185 | 188 | } |
186 | 189 | |
190 | + /** |
|
191 | + * @param boolean $hasLoggedIn |
|
192 | + */ |
|
187 | 193 | public function getUserCount($hasLoggedIn) { |
188 | 194 | $qb = $this->db->getQueryBuilder(); |
189 | 195 | $qb->select([$qb->createFunction('count(*) as `count`')]) |
@@ -200,6 +206,11 @@ discard block |
||
200 | 206 | return (int) $data['count']; |
201 | 207 | } |
202 | 208 | |
209 | + /** |
|
210 | + * @param \Closure $callback |
|
211 | + * @param string $search |
|
212 | + * @param boolean $onlySeen |
|
213 | + */ |
|
203 | 214 | public function callForAllUsers($callback, $search, $onlySeen) { |
204 | 215 | $qb = $this->db->getQueryBuilder(); |
205 | 216 | $qb->select(['*']) |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * List all installed apps |
124 | 124 | * |
125 | - * @return string[] |
|
125 | + * @return integer[] |
|
126 | 126 | */ |
127 | 127 | public function getInstalledApps() { |
128 | 128 | return array_keys($this->getInstalledAppsValues()); |
@@ -355,6 +355,9 @@ discard block |
||
355 | 355 | return in_array($appId, $this->shippedApps); |
356 | 356 | } |
357 | 357 | |
358 | + /** |
|
359 | + * @param string $appId |
|
360 | + */ |
|
358 | 361 | private function isAlwaysEnabled($appId) { |
359 | 362 | $alwaysEnabled = $this->getAlwaysEnabledApps(); |
360 | 363 | return in_array($appId, $alwaysEnabled); |
@@ -383,7 +386,7 @@ discard block |
||
383 | 386 | /** |
384 | 387 | * @param string $package package path |
385 | 388 | * @param bool $skipMigrations whether to skip migrations, which would only install the code |
386 | - * @return string|false app id or false in case of error |
|
389 | + * @return integer app id or false in case of error |
|
387 | 390 | * @since 10.0 |
388 | 391 | */ |
389 | 392 | public function installApp($package, $skipMigrations = false) { |
@@ -400,7 +403,7 @@ discard block |
||
400 | 403 | |
401 | 404 | /** |
402 | 405 | * @param string $package |
403 | - * @return mixed |
|
406 | + * @return boolean |
|
404 | 407 | * @since 10.0 |
405 | 408 | */ |
406 | 409 | public function updateApp($package) { |
@@ -34,7 +34,6 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param \OCP\Files\Cache\ICache $cache |
37 | - * @param string $root |
|
38 | 37 | */ |
39 | 38 | public function __construct($cache) { |
40 | 39 | parent::__construct($cache); |
@@ -391,6 +391,13 @@ discard block |
||
391 | 391 | return $size; |
392 | 392 | } |
393 | 393 | |
394 | + /** |
|
395 | + * @param string $path |
|
396 | + * @param boolean $recursive |
|
397 | + * @param integer $reuse |
|
398 | + * @param boolean $lock |
|
399 | + * @param integer $size |
|
400 | + */ |
|
394 | 401 | private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$size) { |
395 | 402 | // we put this in it's own function so it cleans up the memory before we start recursing |
396 | 403 | $existingChildren = $this->getExistingChildren($folderId); |
@@ -490,6 +497,9 @@ discard block |
||
490 | 497 | } |
491 | 498 | } |
492 | 499 | |
500 | + /** |
|
501 | + * @param string|boolean $path |
|
502 | + */ |
|
493 | 503 | private function runBackgroundScanJob(callable $callback, $path) { |
494 | 504 | try { |
495 | 505 | $callback(); |