@@ -184,7 +184,7 @@ |
||
| 184 | 184 | foreach ($searchResult as $ftsSearch) { |
| 185 | 185 | foreach ($ftsSearch->getDocuments() as $document) { |
| 186 | 186 | $excerpts = $document->getExcerpts(); |
| 187 | - $title = '(' . $document->getProviderId() . ') '; |
|
| 187 | + $title = '('.$document->getProviderId().') '; |
|
| 188 | 188 | if (empty($excerpts)) { |
| 189 | 189 | $title .= $document->getTitle(); |
| 190 | 190 | $subline = ''; |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | $circleManager = OC::$server->get(CirclesManager::class); |
| 230 | 230 | $circleManager->startsession(); |
| 231 | 231 | $circleIds = array_map( |
| 232 | - function (Circle $circle): string { |
|
| 232 | + function(Circle $circle): string { |
|
| 233 | 233 | return $circle->getSingleId(); |
| 234 | 234 | }, $circleManager->getCircles() |
| 235 | 235 | ); |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, string $userId, |
| 156 | 156 | IndexOptions $options |
| 157 | 157 | ) { |
| 158 | - $this->updateRunnerAction('generateIndex' . $provider->getName()); |
|
| 158 | + $this->updateRunnerAction('generateIndex'.$provider->getName()); |
|
| 159 | 159 | $this->updateRunnerInfoArray( |
| 160 | 160 | [ |
| 161 | 161 | 'userId' => $userId, |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | return array_map( |
| 130 | - function (Index $index): array { |
|
| 130 | + function(Index $index): array { |
|
| 131 | 131 | return $index->asSitemap($this->urlGenerator); |
| 132 | 132 | }, |
| 133 | 133 | $this->indexesRequest->getQueuedIndexes($collection, false, $length) |
@@ -74,10 +74,10 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | protected function execute(InputInterface $input, OutputInterface $output) { |
| 76 | 76 | $collections = $this->collectionService->getCollections(); |
| 77 | - $output->writeln('found ' . sizeof($collections) . ' collection(s)'); |
|
| 77 | + $output->writeln('found '.sizeof($collections).' collection(s)'); |
|
| 78 | 78 | |
| 79 | 79 | foreach ($this->collectionService->getCollections() as $collection) { |
| 80 | - $output->writeln('- ' . $collection); |
|
| 80 | + $output->writeln('- '.$collection); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return 0; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | * @return bool |
| 182 | 182 | */ |
| 183 | 183 | public function isAlreadyRunning(): bool { |
| 184 | - $ttl = (int) $this->configService->getAppValue(ConfigService::TICK_TTL); |
|
| 184 | + $ttl = (int)$this->configService->getAppValue(ConfigService::TICK_TTL); |
|
| 185 | 185 | $ticks = $this->tickRequest->getTicksByStatus('run'); |
| 186 | 186 | |
| 187 | 187 | $isAlreadyRunning = false; |
@@ -215,23 +215,23 @@ discard block |
||
| 215 | 215 | * @param Tick $tick |
| 216 | 216 | * @param string $action |
| 217 | 217 | */ |
| 218 | - private function assignActionToTick(Tick &$tick, string $action) { |
|
| 218 | + private function assignActionToTick(Tick & $tick, string $action) { |
|
| 219 | 219 | $now = microtime(true); |
| 220 | 220 | $preAction = $tick->getAction(); |
| 221 | 221 | |
| 222 | 222 | if ($preAction !== '') { |
| 223 | - $preActionTotal = $tick->getInfoFloat($preAction . 'Total', 0); |
|
| 224 | - $preActionStart = $tick->getInfoFloat($preAction . 'Init', 0); |
|
| 223 | + $preActionTotal = $tick->getInfoFloat($preAction.'Total', 0); |
|
| 224 | + $preActionStart = $tick->getInfoFloat($preAction.'Init', 0); |
|
| 225 | 225 | |
| 226 | 226 | if ($preActionStart > 0) { |
| 227 | 227 | |
| 228 | 228 | $preActionTotal += ($now - $preActionStart); |
| 229 | - $tick->setInfoFloat($preAction . 'Total', $preActionTotal); |
|
| 230 | - $tick->unsetInfo($preAction . 'Init'); |
|
| 229 | + $tick->setInfoFloat($preAction.'Total', $preActionTotal); |
|
| 230 | + $tick->unsetInfo($preAction.'Init'); |
|
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | $tick->setAction($action) |
| 234 | - ->setInfoFloat($action . 'Init', $now); |
|
| 234 | + ->setInfoFloat($action.'Init', $now); |
|
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @param IQueryBuilder $qb |
| 92 | 92 | * @param int $id |
| 93 | 93 | */ |
| 94 | - protected function limitToId(IQueryBuilder &$qb, int $id) { |
|
| 94 | + protected function limitToId(IQueryBuilder & $qb, int $id) { |
|
| 95 | 95 | $this->limitToDBFieldInt($qb, 'id', $id); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @param IQueryBuilder $qb |
| 103 | 103 | * @param string $userId |
| 104 | 104 | */ |
| 105 | - protected function limitToOwnerId(IQueryBuilder &$qb, string $userId) { |
|
| 105 | + protected function limitToOwnerId(IQueryBuilder & $qb, string $userId) { |
|
| 106 | 106 | $this->limitToDBField($qb, 'owner_id', $userId); |
| 107 | 107 | } |
| 108 | 108 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * @param IQueryBuilder $qb |
| 114 | 114 | * @param string $providerId |
| 115 | 115 | */ |
| 116 | - protected function limitToProviderId(IQueryBuilder &$qb, string $providerId) { |
|
| 116 | + protected function limitToProviderId(IQueryBuilder & $qb, string $providerId) { |
|
| 117 | 117 | $this->limitToDBField($qb, 'provider_id', $providerId); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param IQueryBuilder $qb |
| 125 | 125 | * @param string $documentId |
| 126 | 126 | */ |
| 127 | - protected function limitToDocumentId(IQueryBuilder &$qb, string $documentId) { |
|
| 127 | + protected function limitToDocumentId(IQueryBuilder & $qb, string $documentId) { |
|
| 128 | 128 | $this->limitToDBField($qb, 'document_id', $documentId); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * @param IQueryBuilder $qb |
| 136 | 136 | * @param string $collection |
| 137 | 137 | */ |
| 138 | - protected function limitToCollection(IQueryBuilder &$qb, string $collection) { |
|
| 138 | + protected function limitToCollection(IQueryBuilder & $qb, string $collection) { |
|
| 139 | 139 | $this->limitToDBField($qb, 'collection', $collection); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @param IQueryBuilder $qb |
| 147 | 147 | */ |
| 148 | - protected function limitToErr(IQueryBuilder &$qb) { |
|
| 148 | + protected function limitToErr(IQueryBuilder & $qb) { |
|
| 149 | 149 | $expr = $qb->expr(); |
| 150 | 150 | $qb->andWhere($expr->gte('err', $qb->createNamedParameter(1))); |
| 151 | 151 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * |
| 157 | 157 | * @param IQueryBuilder $qb |
| 158 | 158 | */ |
| 159 | - protected function limitToNoErr(IQueryBuilder &$qb) { |
|
| 159 | + protected function limitToNoErr(IQueryBuilder & $qb) { |
|
| 160 | 160 | $expr = $qb->expr(); |
| 161 | 161 | $qb->andWhere($expr->eq('err', $qb->createNamedParameter(0))); |
| 162 | 162 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * @param IQueryBuilder $qb |
| 169 | 169 | * @param array $documentIds |
| 170 | 170 | */ |
| 171 | - protected function limitToDocumentIds(IQueryBuilder &$qb, array $documentIds) { |
|
| 171 | + protected function limitToDocumentIds(IQueryBuilder & $qb, array $documentIds) { |
|
| 172 | 172 | $this->limitToDBFieldArray($qb, 'document_id', $documentIds); |
| 173 | 173 | } |
| 174 | 174 | |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * @param IQueryBuilder $qb |
| 180 | 180 | * @param string $source |
| 181 | 181 | */ |
| 182 | - protected function limitToSource(IQueryBuilder &$qb, string $source) { |
|
| 182 | + protected function limitToSource(IQueryBuilder & $qb, string $source) { |
|
| 183 | 183 | $this->limitToDBField($qb, 'id', $source); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @param IQueryBuilder $qb |
| 191 | 191 | * @param string $status |
| 192 | 192 | */ |
| 193 | - protected function limitToStatus(IQueryBuilder &$qb, string $status) { |
|
| 193 | + protected function limitToStatus(IQueryBuilder & $qb, string $status) { |
|
| 194 | 194 | $this->limitToDBField($qb, 'status', $status); |
| 195 | 195 | } |
| 196 | 196 | |
@@ -200,10 +200,10 @@ discard block |
||
| 200 | 200 | * @param string $field |
| 201 | 201 | * @param string $value |
| 202 | 202 | */ |
| 203 | - private function limitToDBField(IQueryBuilder &$qb, string $field, string $value) { |
|
| 203 | + private function limitToDBField(IQueryBuilder & $qb, string $field, string $value) { |
|
| 204 | 204 | $expr = $qb->expr(); |
| 205 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 206 | - $field = $pf . $field; |
|
| 205 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 206 | + $field = $pf.$field; |
|
| 207 | 207 | |
| 208 | 208 | $qb->andWhere($expr->eq($field, $qb->createNamedParameter($value))); |
| 209 | 209 | } |
@@ -213,10 +213,10 @@ discard block |
||
| 213 | 213 | * @param string $field |
| 214 | 214 | * @param int $value |
| 215 | 215 | */ |
| 216 | - private function limitToDBFieldInt(IQueryBuilder &$qb, string $field, int $value) { |
|
| 216 | + private function limitToDBFieldInt(IQueryBuilder & $qb, string $field, int $value) { |
|
| 217 | 217 | $expr = $qb->expr(); |
| 218 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 219 | - $field = $pf . $field; |
|
| 218 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 219 | + $field = $pf.$field; |
|
| 220 | 220 | |
| 221 | 221 | $qb->andWhere($expr->eq($field, $qb->createNamedParameter($value))); |
| 222 | 222 | } |
@@ -227,10 +227,10 @@ discard block |
||
| 227 | 227 | * @param string $field |
| 228 | 228 | * @param string|integer|array $values |
| 229 | 229 | */ |
| 230 | - private function limitToDBFieldArray(IQueryBuilder &$qb, string $field, array $values) { |
|
| 230 | + private function limitToDBFieldArray(IQueryBuilder & $qb, string $field, array $values) { |
|
| 231 | 231 | $expr = $qb->expr(); |
| 232 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 233 | - $field = $pf . $field; |
|
| 232 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 233 | + $field = $pf.$field; |
|
| 234 | 234 | |
| 235 | 235 | if (!is_array($values)) { |
| 236 | 236 | $values = [$values]; |
@@ -248,10 +248,10 @@ discard block |
||
| 248 | 248 | /** |
| 249 | 249 | * @param IQueryBuilder $qb |
| 250 | 250 | */ |
| 251 | - protected function limitToQueuedIndexes(IQueryBuilder &$qb) { |
|
| 251 | + protected function limitToQueuedIndexes(IQueryBuilder & $qb) { |
|
| 252 | 252 | $expr = $qb->expr(); |
| 253 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 254 | - $qb->andWhere($expr->neq($pf . 'status', $qb->createNamedParameter(Index::INDEX_OK))); |
|
| 253 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 254 | + $qb->andWhere($expr->neq($pf.'status', $qb->createNamedParameter(Index::INDEX_OK))); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | return $line; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - return substr($line, 0, $length - 5) . ' (..)'; |
|
| 99 | + return substr($line, 0, $length - 5).' (..)'; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | protected function feedStringWithParams(string $line, array $params): string { |
| 135 | 135 | $ak = array_keys($params); |
| 136 | 136 | foreach ($ak as $k) { |
| 137 | - $line = str_replace('{' . $k . '}', (string)$params[$k], $line); |
|
| 137 | + $line = str_replace('{'.$k.'}', (string)$params[$k], $line); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | return $line; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $s = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; |
| 189 | 189 | $e = floor(log($bytes, 1024)); |
| 190 | 190 | |
| 191 | - return round($bytes / pow(1024, $e), 2) . ' ' . $s[$e]; |
|
| 191 | + return round($bytes / pow(1024, $e), 2).' '.$s[$e]; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | $second = time(); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | - $f = new DateTime('@' . $first); |
|
| 215 | - $s = new DateTime('@' . $second); |
|
| 214 | + $f = new DateTime('@'.$first); |
|
| 215 | + $s = new DateTime('@'.$second); |
|
| 216 | 216 | $duration = $second - $first; |
| 217 | 217 | if ($short) { |
| 218 | 218 | $minutes = $this->get('minutes', $words, 'M'); |
@@ -220,16 +220,16 @@ discard block |
||
| 220 | 220 | $days = $this->get('days', $words, 'D'); |
| 221 | 221 | |
| 222 | 222 | if ($duration < 60) { |
| 223 | - return $f->diff($s)->format('<1' . $minutes); |
|
| 223 | + return $f->diff($s)->format('<1'.$minutes); |
|
| 224 | 224 | } |
| 225 | 225 | if ($duration < 3600) { |
| 226 | - return $f->diff($s)->format('%i' . $minutes); |
|
| 226 | + return $f->diff($s)->format('%i'.$minutes); |
|
| 227 | 227 | } |
| 228 | 228 | if ($duration < 86400) { |
| 229 | - return $f->diff($s)->format('%h' . $hours . ', %i' . $minutes); |
|
| 229 | + return $f->diff($s)->format('%h'.$hours.', %i'.$minutes); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - return $f->diff($s)->format('%a' . $days . ', %h' . $hours . ', %i' . $minutes); |
|
| 232 | + return $f->diff($s)->format('%a'.$days.', %h'.$hours.', %i'.$minutes); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | $seconds = $this->get('seconds', $words, 'seconds'); |
@@ -237,22 +237,22 @@ discard block |
||
| 237 | 237 | $hours = $this->get('hours', $words, 'hours'); |
| 238 | 238 | $days = $this->get('days', $words, 'days'); |
| 239 | 239 | if ($duration < 60) { |
| 240 | - return $f->diff($s)->format('%s ' . $seconds); |
|
| 240 | + return $f->diff($s)->format('%s '.$seconds); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | if ($duration < 3600) { |
| 244 | - return $f->diff($s)->format('%i ' . $minutes . ' and %s ' . $seconds); |
|
| 244 | + return $f->diff($s)->format('%i '.$minutes.' and %s '.$seconds); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | if ($duration < 86400) { |
| 248 | - return $f->diff($s)->format('%h ' . $hours . ', %i ' . $minutes . ' and %s ' . $seconds); |
|
| 248 | + return $f->diff($s)->format('%h '.$hours.', %i '.$minutes.' and %s '.$seconds); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | return $f->diff($s)->format( |
| 252 | - '%a ' . $days . |
|
| 253 | - ', %h ' . $hours . |
|
| 254 | - ', %i ' . $minutes . |
|
| 255 | - ' and %s ' . $seconds |
|
| 252 | + '%a '.$days. |
|
| 253 | + ', %h '.$hours. |
|
| 254 | + ', %i '.$minutes. |
|
| 255 | + ' and %s '.$seconds |
|
| 256 | 256 | ); |
| 257 | 257 | } |
| 258 | 258 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | public function limitToCreation(int $delay = 0): self { |
| 213 | 213 | $date = new DateTime('now'); |
| 214 | - $date->sub(new DateInterval('PT' . $delay . 'M')); |
|
| 214 | + $date->sub(new DateInterval('PT'.$delay.'M')); |
|
| 215 | 215 | |
| 216 | 216 | $this->limitToDBFieldDateTime('creation', $date, true); |
| 217 | 217 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $expr = $this->expr(); |
| 229 | 229 | $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() |
| 230 | 230 | . '.' : ''; |
| 231 | - $field = $pf . $field; |
|
| 231 | + $field = $pf.$field; |
|
| 232 | 232 | |
| 233 | 233 | $orX = $expr->orX(); |
| 234 | 234 | $orX->add( |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | $expr = $this->expr(); |
| 261 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
| 262 | - $field = $pf . $field; |
|
| 261 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
| 262 | + $field = $pf.$field; |
|
| 263 | 263 | |
| 264 | 264 | $orX = $expr->orX(); |
| 265 | 265 | $orX->add( |
@@ -277,8 +277,8 @@ discard block |
||
| 277 | 277 | public function searchInDBField(string $field, string $value): void { |
| 278 | 278 | $expr = $this->expr(); |
| 279 | 279 | |
| 280 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
| 281 | - $field = $pf . $field; |
|
| 280 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
| 281 | + $field = $pf.$field; |
|
| 282 | 282 | |
| 283 | 283 | $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); |
| 284 | 284 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | */ |
| 401 | 401 | public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 402 | 402 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 403 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 403 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | $expr = $this->expr(); |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | |
| 414 | 414 | public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 415 | 415 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 416 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 416 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | $expr = $this->expr(); |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | |
| 432 | 432 | public function exprLimitInt(string $field, int $value, string $alias = ''): string { |
| 433 | 433 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 434 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 434 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | $expr = $this->expr(); |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | */ |
| 450 | 450 | public function exprLimitBool(string $field, bool $value, string $alias = ''): string { |
| 451 | 451 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 452 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 452 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | $expr = $this->expr(); |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | string $alias = '' |
| 471 | 471 | ): ICompositeExpression { |
| 472 | 472 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 473 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 473 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | $expr = $this->expr(); |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | string $alias = '' |
| 497 | 497 | ): ICompositeExpression { |
| 498 | 498 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 499 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 499 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | $expr = $this->expr(); |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | bool $cs = true |
| 526 | 526 | ): ICompositeExpression { |
| 527 | 527 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 528 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 528 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | $andX = $this->expr()->andX(); |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | */ |
| 551 | 551 | public function exprLimitInArray(string $field, array $values, string $alias = ''): string { |
| 552 | 552 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 553 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 553 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | $expr = $this->expr(); |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | */ |
| 571 | 571 | public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string { |
| 572 | 572 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 573 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 573 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 574 | 574 | } |
| 575 | 575 | |
| 576 | 576 | $expr = $this->expr(); |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | */ |
| 593 | 593 | public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string { |
| 594 | 594 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 595 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 595 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | $expr = $this->expr(); |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | */ |
| 615 | 615 | public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string { |
| 616 | 616 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 617 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 617 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 618 | 618 | } |
| 619 | 619 | |
| 620 | 620 | $expr = $this->expr(); |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | */ |
| 724 | 724 | public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 725 | 725 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 726 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 726 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 727 | 727 | } |
| 728 | 728 | |
| 729 | 729 | $expr = $this->expr(); |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | */ |
| 748 | 748 | public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 749 | 749 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 750 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 750 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 751 | 751 | } |
| 752 | 752 | |
| 753 | 753 | $expr = $this->expr(); |
@@ -773,7 +773,7 @@ discard block |
||
| 773 | 773 | */ |
| 774 | 774 | public function exprFilterInt(string $field, int $value, string $alias = ''): string { |
| 775 | 775 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 776 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 776 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 777 | 777 | } |
| 778 | 778 | |
| 779 | 779 | $expr = $this->expr(); |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | */ |
| 792 | 792 | public function exprFilterBool(string $field, bool $value, string $alias = ''): string { |
| 793 | 793 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 794 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 794 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 795 | 795 | } |
| 796 | 796 | |
| 797 | 797 | $expr = $this->expr(); |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | string $alias = '' |
| 813 | 813 | ): ICompositeExpression { |
| 814 | 814 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 815 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 815 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 816 | 816 | } |
| 817 | 817 | |
| 818 | 818 | $expr = $this->expr(); |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | string $alias = '' |
| 839 | 839 | ): ICompositeExpression { |
| 840 | 840 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 841 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 841 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | $expr = $this->expr(); |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | bool $cs = true |
| 868 | 868 | ): ICompositeExpression { |
| 869 | 869 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 870 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 870 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 871 | 871 | } |
| 872 | 872 | |
| 873 | 873 | $orX = $this->expr()->orX(); |
@@ -892,7 +892,7 @@ discard block |
||
| 892 | 892 | */ |
| 893 | 893 | public function exprFilterInArray(string $field, array $values, string $alias = ''): string { |
| 894 | 894 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 895 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 895 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 896 | 896 | } |
| 897 | 897 | |
| 898 | 898 | $expr = $this->expr(); |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | */ |
| 911 | 911 | public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string { |
| 912 | 912 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 913 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 913 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 914 | 914 | } |
| 915 | 915 | |
| 916 | 916 | $expr = $this->expr(); |
@@ -1075,8 +1075,8 @@ discard block |
||
| 1075 | 1075 | } |
| 1076 | 1076 | |
| 1077 | 1077 | $selectFields = array_map( |
| 1078 | - function (string $item) use ($alias) { |
|
| 1079 | - return $alias . '.' . $item; |
|
| 1078 | + function(string $item) use ($alias) { |
|
| 1079 | + return $alias.'.'.$item; |
|
| 1080 | 1080 | }, $fields |
| 1081 | 1081 | ); |
| 1082 | 1082 | |
@@ -1102,13 +1102,13 @@ discard block |
||
| 1102 | 1102 | string $prefix, |
| 1103 | 1103 | array $default = [] |
| 1104 | 1104 | ): self { |
| 1105 | - $prefix = trim($prefix) . '_'; |
|
| 1105 | + $prefix = trim($prefix).'_'; |
|
| 1106 | 1106 | foreach ($default as $k => $v) { |
| 1107 | - $this->addDefaultValue($prefix . $k, (string)$v); |
|
| 1107 | + $this->addDefaultValue($prefix.$k, (string)$v); |
|
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | 1110 | foreach ($fields as $field) { |
| 1111 | - $this->selectAlias($alias . '.' . $field, $prefix . $field); |
|
| 1111 | + $this->selectAlias($alias.'.'.$field, $prefix.$field); |
|
| 1112 | 1112 | } |
| 1113 | 1113 | |
| 1114 | 1114 | return $this; |