@@ -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; |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | foreach ($keys as $key) { |
| 405 | 405 | if (!array_key_exists($key, $arr)) { |
| 406 | 406 | throw new MalformedArrayException( |
| 407 | - 'source: ' . json_encode($arr) . ' - missing key: ' . $key |
|
| 407 | + 'source: '.json_encode($arr).' - missing key: '.$key |
|
| 408 | 408 | ); |
| 409 | 409 | } |
| 410 | 410 | } |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | protected function cleanArray(array &$arr): void { |
| 418 | 418 | $arr = array_filter( |
| 419 | 419 | $arr, |
| 420 | - function ($v) { |
|
| 420 | + function($v) { |
|
| 421 | 421 | if (is_string($v)) { |
| 422 | 422 | return ($v !== ''); |
| 423 | 423 | } |
@@ -68,11 +68,11 @@ |
||
| 68 | 68 | try { |
| 69 | 69 | $test = new ReflectionClass($class); |
| 70 | 70 | } catch (\ReflectionException $e) { |
| 71 | - throw new InvalidItemException('cannot ReflectionClass ' . $class); |
|
| 71 | + throw new InvalidItemException('cannot ReflectionClass '.$class); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if (!in_array(IDeserializable::class, $test->getInterfaceNames())) { |
| 75 | - throw new InvalidItemException($class . ' does not implement IDeserializable'); |
|
| 75 | + throw new InvalidItemException($class.' does not implement IDeserializable'); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** @var IDeserializable $item */ |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | use Symfony\Component\Routing\Exception\RouteNotFoundException; |
| 52 | 52 | use Throwable; |
| 53 | 53 | |
| 54 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
| 54 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | class Application extends App implements IBootstrap { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | return [ |
| 140 | 140 | 'id' => self::APP_ID, |
| 141 | 141 | 'order' => 5, |
| 142 | - 'href' => $urlGen->linkToRoute(self::APP_ID . '.Navigation.navigate'), |
|
| 142 | + 'href' => $urlGen->linkToRoute(self::APP_ID.'.Navigation.navigate'), |
|
| 143 | 143 | 'icon' => $urlGen->imagePath(self::APP_ID, 'fulltextsearch.svg'), |
| 144 | 144 | 'name' => 'Search' |
| 145 | 145 | ]; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function switchPanel(string $panelSlot, string $panelId) { |
| 139 | 139 | $this->displayedPanel = array_map( |
| 140 | - function ($item) use ($panelId, $panelSlot) { |
|
| 140 | + function($item) use ($panelId, $panelSlot) { |
|
| 141 | 141 | if ($item['slot'] === $panelSlot) { |
| 142 | 142 | $item['id'] = $panelId; |
| 143 | 143 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - $this->display->setFormat(implode("\n", $format) . "\n"); |
|
| 198 | + $this->display->setFormat(implode("\n", $format)."\n"); |
|
| 199 | 199 | $this->refreshInfo(); |
| 200 | 200 | $this->display->start(); |
| 201 | 201 | } |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | |
| 118 | 118 | $this->cliService->createPanel( |
| 119 | 119 | 'collection', [ |
| 120 | - '┌─ Collection ' . $collection . ' ────', |
|
| 120 | + '┌─ Collection '.$collection.' ────', |
|
| 121 | 121 | '│ ProviderId, UserId: <info>%providerId%</info> / <info>%userId%</info>', |
| 122 | 122 | '│ Chunk: <info>%chunkCurr:3s%</info>/<info>%chunkTotal%</info>', |
| 123 | 123 | '│ Document: <info>%documentCurr:6s%</info>/<info>%documentChunk%</info>', |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $output->write(' ', true); |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | - $output->write($line . ' ', false); |
|
| 221 | + $output->write($line.' ', false); |
|
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $testProvider->setIndexOptions(new IndexOptions()); |
| 280 | 280 | $indexableDocuments = |
| 281 | 281 | $testProvider->generateIndexableDocuments(TestService::DOCUMENT_USER1, ''); |
| 282 | - $this->output($output, '(' . sizeof($indexableDocuments) . ' items)', false); |
|
| 282 | + $this->output($output, '('.sizeof($indexableDocuments).' items)', false); |
|
| 283 | 283 | $this->outputResult($output, true); |
| 284 | 284 | } |
| 285 | 285 | |
@@ -295,12 +295,12 @@ discard block |
||
| 295 | 295 | $wrapper = $this->platformService->getPlatform(); |
| 296 | 296 | $testPlatform = $wrapper->getPlatform(); |
| 297 | 297 | |
| 298 | - $this->output($output, '(' . $testPlatform->getName() . ')', false); |
|
| 298 | + $this->output($output, '('.$testPlatform->getName().')', false); |
|
| 299 | 299 | $this->outputResult($output, true); |
| 300 | 300 | |
| 301 | 301 | $this->output($output, 'Testing search platform.'); |
| 302 | 302 | if (!$testPlatform->testPlatform()) { |
| 303 | - throw new Exception('Search platform (' . $testPlatform->getName() . ') down ?'); |
|
| 303 | + throw new Exception('Search platform ('.$testPlatform->getName().') down ?'); |
|
| 304 | 304 | } |
| 305 | 305 | $this->outputResult($output, true); |
| 306 | 306 | |
@@ -397,13 +397,13 @@ discard block |
||
| 397 | 397 | ); |
| 398 | 398 | |
| 399 | 399 | $this->output( |
| 400 | - $output, '(size: ' . $indexDocument->getContentSize() . ')', false |
|
| 400 | + $output, '(size: '.$indexDocument->getContentSize().')', false |
|
| 401 | 401 | ); |
| 402 | 402 | $this->outputResult($output, true); |
| 403 | 403 | } catch (Exception $e) { |
| 404 | 404 | throw new Exception( |
| 405 | - "Issue while getting test document '" . TestService::DOCUMENT_TYPE_LICENSE |
|
| 406 | - . "' from search platform: " . $e->getMessage() |
|
| 405 | + "Issue while getting test document '".TestService::DOCUMENT_TYPE_LICENSE |
|
| 406 | + . "' from search platform: ".$e->getMessage() |
|
| 407 | 407 | ); |
| 408 | 408 | } |
| 409 | 409 | |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | ) { |
| 594 | 594 | $this->output( |
| 595 | 595 | $output, |
| 596 | - " - '" . $search . "'" . (($moreOutput === '') ? '' : ' - ' . $moreOutput . ' - ') |
|
| 596 | + " - '".$search."'".(($moreOutput === '') ? '' : ' - '.$moreOutput.' - ') |
|
| 597 | 597 | ); |
| 598 | 598 | $request = new SearchRequest(); |
| 599 | 599 | |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | |
| 608 | 608 | $this->output( |
| 609 | 609 | $output, |
| 610 | - '(result: ' . $searchResult->getCount() . ', expected: ' . json_encode($expected) . ')', |
|
| 610 | + '(result: '.$searchResult->getCount().', expected: '.json_encode($expected).')', |
|
| 611 | 611 | false |
| 612 | 612 | ); |
| 613 | 613 | $this->compareSearchResult($searchResult, $expected); |
@@ -671,12 +671,12 @@ discard block |
||
| 671 | 671 | private function compareSearchResult(SearchResult $searchResult, array $entries) { |
| 672 | 672 | $documents = $searchResult->getDocuments(); |
| 673 | 673 | if (sizeof($documents) !== sizeof($entries)) { |
| 674 | - throw new Exception('Unexpected SearchResult: ' . json_encode($searchResult)); |
|
| 674 | + throw new Exception('Unexpected SearchResult: '.json_encode($searchResult)); |
|
| 675 | 675 | } |
| 676 | 676 | |
| 677 | 677 | foreach ($documents as $document) { |
| 678 | 678 | if (!in_array($document->getId(), $entries)) { |
| 679 | - throw new Exception('Unexpected Document: ' . json_encode($document)); |
|
| 679 | + throw new Exception('Unexpected Document: '.json_encode($document)); |
|
| 680 | 680 | } |
| 681 | 681 | } |
| 682 | 682 | } |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | * @throws InterruptException |
| 690 | 690 | */ |
| 691 | 691 | private function pause(OutputInterface $output, int $s) { |
| 692 | - $this->output($output, 'Pausing ' . $s . ' seconds'); |
|
| 692 | + $this->output($output, 'Pausing '.$s.' seconds'); |
|
| 693 | 693 | |
| 694 | 694 | for ($i = 1; $i <= $s; $i++) { |
| 695 | 695 | if (time_nanosleep(1, 0) !== true) { |
@@ -222,11 +222,11 @@ discard block |
||
| 222 | 222 | /** do not get stuck while waiting interactive input */ |
| 223 | 223 | try { |
| 224 | 224 | readline_callback_handler_install( |
| 225 | - '', function () { |
|
| 225 | + '', function() { |
|
| 226 | 226 | } |
| 227 | 227 | ); |
| 228 | 228 | } catch (Throwable $t) { |
| 229 | - $this->miscService->log($t->getMessage() . ' -- ' . $t->getTraceAsString()); |
|
| 229 | + $this->miscService->log($t->getMessage().' -- '.$t->getTraceAsString()); |
|
| 230 | 230 | throw new Exception('Please install php-readline, or use --no-readline'); |
| 231 | 231 | } |
| 232 | 232 | } |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | $index = $error['index']; |
| 643 | 643 | $errorIndex = ''; |
| 644 | 644 | if ($index !== null) { |
| 645 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 645 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 646 | 646 | } |
| 647 | 647 | |
| 648 | 648 | $width = $this->terminal->getWidth() - 13; |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | $index = $result['index']; |
| 695 | 695 | $resultIndex = ''; |
| 696 | 696 | if ($index !== null) { |
| 697 | - $resultIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 697 | + $resultIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | |