| @@ -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(['*']) |