| @@ -214,6 +214,9 @@ | ||
| 214 | 214 | } | 
| 215 | 215 | |
| 216 | 216 | |
| 217 | + /** | |
| 218 | + * @param boolean $boolean | |
| 219 | + */ | |
| 217 | 220 |  	public function setProviderAsIndexed(IFullTextSearchProvider $provider, $boolean) { | 
| 218 | 221 | $this->configService->setProviderOptions( | 
| 219 | 222 | $provider->getId(), ConfigService::PROVIDER_INDEXED, (($boolean) ? '1' : '0') | 
| @@ -106,7 +106,7 @@ discard block | ||
| 106 | 106 | $provider = \OC::$server->query((string)$providerId); | 
| 107 | 107 |  		if (!($provider instanceof IFullTextSearchProvider)) { | 
| 108 | 108 | throw new ProviderIsNotCompatibleException( | 
| 109 | - $providerId . ' is not a compatible IFullTextSearchProvider' | |
| 109 | + $providerId.' is not a compatible IFullTextSearchProvider' | |
| 110 | 110 | ); | 
| 111 | 111 | } | 
| 112 | 112 | |
| @@ -187,7 +187,7 @@ discard block | ||
| 187 | 187 | } | 
| 188 | 188 | } | 
| 189 | 189 | |
| 190 | -		throw new ProviderDoesNotExistException('Provider \'' . $providerId . '\' does not exist'); | |
| 190 | +		throw new ProviderDoesNotExistException('Provider \''.$providerId.'\' does not exist'); | |
| 191 | 191 | } | 
| 192 | 192 | |
| 193 | 193 | |
| @@ -272,7 +272,7 @@ discard block | ||
| 272 | 272 |  		foreach ($this->providers AS $knownProvider) { | 
| 273 | 273 |  			if ($knownProvider->getId() === $provider->getId()) { | 
| 274 | 274 | throw new ProviderIsNotUniqueException( | 
| 275 | - 'FullTextSearchProvider ' . $provider->getId() . ' already exist' | |
| 275 | + 'FullTextSearchProvider '.$provider->getId().' already exist' | |
| 276 | 276 | ); | 
| 277 | 277 | } | 
| 278 | 278 | } | 
| @@ -105,13 +105,13 @@ | ||
| 105 | 105 | |
| 106 | 106 |  	private function displaySearchResult(SearchResult $searchResult) { | 
| 107 | 107 | |
| 108 | - echo '> ' . $searchResult->getProvider() | |
| 109 | - ->getName() . "\n"; | |
| 108 | + echo '> '.$searchResult->getProvider() | |
| 109 | + ->getName()."\n"; | |
| 110 | 110 | |
| 111 | 111 | /** @var IndexDocument[] $result */ | 
| 112 | 112 | $result = $searchResult->getDocuments(); | 
| 113 | 113 |  		foreach ($result as $document) { | 
| 114 | - echo ' - ' . $document->getId() . ' score:' . $document->getScore() . "\n"; | |
| 114 | + echo ' - '.$document->getId().' score:'.$document->getScore()."\n"; | |
| 115 | 115 | } | 
| 116 | 116 | } | 
| 117 | 117 | |
| @@ -140,14 +140,14 @@ | ||
| 140 | 140 | return; | 
| 141 | 141 | } | 
| 142 | 142 | |
| 143 | -		$this->output('- RAM: ' . (memory_get_usage() / 1024 / 1024)); | |
| 143 | +		$this->output('- RAM: '.(memory_get_usage() / 1024 / 1024)); | |
| 144 | 144 | $this->ramTick = $tick; | 
| 145 | 145 | } | 
| 146 | 146 | |
| 147 | 147 | |
| 148 | 148 |  	public function exception($reason, $stop) { | 
| 149 | 149 |  		if (!$stop) { | 
| 150 | -			$this->output('Exception: ' . $reason); | |
| 150 | +			$this->output('Exception: '.$reason); | |
| 151 | 151 | // TODO: feed an array of exceptions for log; | 
| 152 | 152 | } | 
| 153 | 153 | $this->runningService->exception($this->tickId, $reason, $stop); | 
| @@ -224,18 +224,18 @@ | ||
| 224 | 224 | $preAction = $tick->getAction(); | 
| 225 | 225 | |
| 226 | 226 |  		if ($preAction !== '') { | 
| 227 | - $preActionTotal = $tick->getInfo($preAction . 'Total', 0); | |
| 228 | - $preActionStart = $tick->getInfo($preAction . 'Init', 0); | |
| 227 | + $preActionTotal = $tick->getInfo($preAction.'Total', 0); | |
| 228 | + $preActionStart = $tick->getInfo($preAction.'Init', 0); | |
| 229 | 229 | |
| 230 | 230 |  			if ($preActionStart > 0) { | 
| 231 | 231 | |
| 232 | 232 | $preActionTotal += ($now - $preActionStart); | 
| 233 | - $tick->setInfo($preAction . 'Total', $preActionTotal); | |
| 234 | - $tick->unsetInfo($preAction . 'Init'); | |
| 233 | + $tick->setInfo($preAction.'Total', $preActionTotal); | |
| 234 | + $tick->unsetInfo($preAction.'Init'); | |
| 235 | 235 | } | 
| 236 | 236 | } | 
| 237 | 237 | $tick->setAction($action) | 
| 238 | - ->setInfo($action . 'Init', $now); | |
| 238 | + ->setInfo($action.'Init', $now); | |
| 239 | 239 | } | 
| 240 | 240 | |
| 241 | 241 | |
| @@ -184,7 +184,7 @@ | ||
| 184 | 184 |  			try { | 
| 185 | 185 | $rights->setCircles(Circles::joinedCircleIds($user->getUID())); | 
| 186 | 186 |  			} catch (Exception $e) { | 
| 187 | -				$this->miscService->log('Circles is set as enabled but: ' . $e->getMessage()); | |
| 187 | +				$this->miscService->log('Circles is set as enabled but: '.$e->getMessage()); | |
| 188 | 188 | } | 
| 189 | 189 | } | 
| 190 | 190 | |
| @@ -159,7 +159,7 @@ discard block | ||
| 159 | 159 | $platform = \OC::$server->query((string)$selected); | 
| 160 | 160 |  		if (!($platform instanceof IFullTextSearchPlatform)) { | 
| 161 | 161 | throw new PlatformIsNotCompatibleException( | 
| 162 | - $selected . ' is not a compatible FullTextSearchPlatform' | |
| 162 | + $selected.' is not a compatible FullTextSearchPlatform' | |
| 163 | 163 | ); | 
| 164 | 164 | } | 
| 165 | 165 | |
| @@ -182,7 +182,7 @@ discard block | ||
| 182 | 182 | |
| 183 | 183 |  		if (!in_array($selected, $this->platforms)) { | 
| 184 | 184 | throw new PlatformDoesNotExistException( | 
| 185 | - 'FullTextSearchPlatform ' . $selected . ' is not available' | |
| 185 | + 'FullTextSearchPlatform '.$selected.' is not available' | |
| 186 | 186 | ); | 
| 187 | 187 | } | 
| 188 | 188 | |
| @@ -116,7 +116,7 @@ | ||
| 116 | 116 | public function indexProviderContentFromUser( | 
| 117 | 117 | IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, $userId | 
| 118 | 118 |  	) { | 
| 119 | -		$this->updateRunner('generateIndex' . $provider->getName()); | |
| 119 | +		$this->updateRunner('generateIndex'.$provider->getName()); | |
| 120 | 120 | $documents = $provider->generateIndexableDocuments($userId); | 
| 121 | 121 | |
| 122 | 122 | //$maxSize = sizeof($documents); | 
| @@ -92,7 +92,7 @@ | ||
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | /** | 
| 95 | - * @param $action | |
| 95 | + * @param string $action | |
| 96 | 96 | * | 
| 97 | 97 | * @throws InterruptException | 
| 98 | 98 | * @throws TickDoesNotExistException | 
| @@ -129,7 +129,7 @@ | ||
| 129 | 129 | /** | 
| 130 | 130 | * @param int $status | 
| 131 | 131 | * | 
| 132 | - * @return bool | |
| 132 | + * @return integer | |
| 133 | 133 | */ | 
| 134 | 134 |  	public function isStatus($status) { | 
| 135 | 135 | return ((int)$status & $this->getStatus()); | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | |
| 115 | 115 | $providers = $this->providerService->getProviders(); | 
| 116 | 116 |  			foreach ($providers as $provider) { | 
| 117 | -				$this->runner->output('indexing ' . $provider->getName() . '.'); | |
| 117 | +				$this->runner->output('indexing '.$provider->getName().'.'); | |
| 118 | 118 | $provider->setRunner($this->runner); | 
| 119 | 119 | $this->indexProvider($provider); | 
| 120 | 120 | } | 
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 |  		$users = $this->userManager->search(''); | 
| 142 | 142 | |
| 143 | 143 |  		foreach ($users as $user) { | 
| 144 | -			$this->runner->output(' USER: ' . $user->getUID()); | |
| 144 | +			$this->runner->output(' USER: '.$user->getUID()); | |
| 145 | 145 | $this->indexService->indexProviderContentFromUser( | 
| 146 | 146 | $platform, $provider, $user->getUID() | 
| 147 | 147 | ); |