@@ -115,7 +115,7 @@ |
||
| 115 | 115 | return array_values( |
| 116 | 116 | array_filter( |
| 117 | 117 | $result, |
| 118 | - static function ($item) { |
|
| 118 | + static function($item) { |
|
| 119 | 119 | return \is_array($item) && VersionState::DELETE_PLACEHOLDER !== ($item['t3ver_state'] ?? false); |
| 120 | 120 | } |
| 121 | 121 | ) |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | OptionRequest $options, |
| 79 | 79 | array $allowedPages = [], |
| 80 | 80 | bool $ignoreEnableFields = true |
| 81 | - ): array|QueryResultInterface { |
|
| 81 | + ): array | QueryResultInterface { |
|
| 82 | 82 | $query = $this->createQuery(); |
| 83 | 83 | $querySettings = $query->getQuerySettings(); |
| 84 | 84 | $querySettings->setIgnoreEnableFields($ignoreEnableFields); |
@@ -138,12 +138,12 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function findList( |
| 140 | 140 | int $limit = 0, |
| 141 | - int|string $listStartTime = 0, |
|
| 141 | + int | string $listStartTime = 0, |
|
| 142 | 142 | int $startOffsetHours = 0, |
| 143 | 143 | int $overrideStartDate = 0, |
| 144 | 144 | int $overrideEndDate = 0, |
| 145 | 145 | bool $ignoreStoragePid = false |
| 146 | - ): array|QueryResultInterface { |
|
| 146 | + ): array | QueryResultInterface { |
|
| 147 | 147 | $startTime = DateTimeUtility::getNow(); |
| 148 | 148 | $endTime = null; |
| 149 | 149 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | \DateTimeInterface $endDate = null, |
| 185 | 185 | array $customSearch = [], |
| 186 | 186 | int $limit = 0 |
| 187 | - ): array|QueryResultInterface { |
|
| 187 | + ): array | QueryResultInterface { |
|
| 188 | 188 | $event = new IndexRepositoryFindBySearchEvent($startDate, $endDate, $customSearch, $this->indexTypes, false); |
| 189 | 189 | $this->eventDispatcher->dispatch($event); |
| 190 | 190 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | /** |
| 270 | 270 | * Find Past Events. |
| 271 | 271 | */ |
| 272 | - public function findByPast(int $limit, string $sort, string $listStartTime = '0'): array|QueryResultInterface |
|
| 272 | + public function findByPast(int $limit, string $sort, string $listStartTime = '0'): array | QueryResultInterface |
|
| 273 | 273 | { |
| 274 | 274 | $now = DateTimeUtility::getNow(); |
| 275 | 275 | if ('now' !== $listStartTime) { |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | /** |
| 296 | 296 | * Find by Index UIDs. |
| 297 | 297 | */ |
| 298 | - public function findByUids(array $uids): array|QueryResultInterface |
|
| 298 | + public function findByUids(array $uids): array | QueryResultInterface |
|
| 299 | 299 | { |
| 300 | 300 | $query = $this->createQuery(); |
| 301 | 301 | $query->setOrderings($this->getSorting(QueryInterface::ORDER_ASCENDING)); |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | int $limit = 100, |
| 317 | 317 | string $sort = QueryInterface::ORDER_ASCENDING, |
| 318 | 318 | bool $useIndexTime = false |
| 319 | - ): array|QueryResultInterface { |
|
| 319 | + ): array | QueryResultInterface { |
|
| 320 | 320 | if (!$future && !$past) { |
| 321 | 321 | return []; |
| 322 | 322 | } |
@@ -340,8 +340,7 @@ discard block |
||
| 340 | 340 | |
| 341 | 341 | $query->setLimit($limit); |
| 342 | 342 | $sort = QueryInterface::ORDER_ASCENDING === $sort ? |
| 343 | - QueryInterface::ORDER_ASCENDING : |
|
| 344 | - QueryInterface::ORDER_DESCENDING; |
|
| 343 | + QueryInterface::ORDER_ASCENDING : QueryInterface::ORDER_DESCENDING; |
|
| 345 | 344 | $query->setOrderings($this->getSorting($sort)); |
| 346 | 345 | |
| 347 | 346 | return $this->matchAndExecute($query, $constraints); |
@@ -356,7 +355,7 @@ discard block |
||
| 356 | 355 | bool $past = false, |
| 357 | 356 | int $limit = 100, |
| 358 | 357 | string $sort = QueryInterface::ORDER_ASCENDING |
| 359 | - ): array|QueryResultInterface { |
|
| 358 | + ): array | QueryResultInterface { |
|
| 360 | 359 | if (!$future && !$past) { |
| 361 | 360 | return []; |
| 362 | 361 | } |
@@ -384,8 +383,7 @@ discard block |
||
| 384 | 383 | |
| 385 | 384 | $query->setLimit($limit); |
| 386 | 385 | $sort = QueryInterface::ORDER_ASCENDING === $sort ? |
| 387 | - QueryInterface::ORDER_ASCENDING : |
|
| 388 | - QueryInterface::ORDER_DESCENDING; |
|
| 386 | + QueryInterface::ORDER_ASCENDING : QueryInterface::ORDER_DESCENDING; |
|
| 389 | 387 | $query->setOrderings($this->getSorting($sort)); |
| 390 | 388 | |
| 391 | 389 | return $this->matchAndExecute($query, $constraints); |
@@ -394,7 +392,7 @@ discard block |
||
| 394 | 392 | /** |
| 395 | 393 | * find Year. |
| 396 | 394 | */ |
| 397 | - public function findYear(int $year): array|QueryResultInterface |
|
| 395 | + public function findYear(int $year): array | QueryResultInterface |
|
| 398 | 396 | { |
| 399 | 397 | $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, 1, 1); |
| 400 | 398 | $endTime = $startTime->modify('+1 year -1 second'); |
@@ -405,7 +403,7 @@ discard block |
||
| 405 | 403 | /** |
| 406 | 404 | * find quarter. |
| 407 | 405 | */ |
| 408 | - public function findQuarter(int $year, int $quarter): array|QueryResultInterface |
|
| 406 | + public function findQuarter(int $year, int $quarter): array | QueryResultInterface |
|
| 409 | 407 | { |
| 410 | 408 | $startMonth = 1 + (3 * ($quarter - 1)); |
| 411 | 409 | $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, $startMonth, 1); |
@@ -417,7 +415,7 @@ discard block |
||
| 417 | 415 | /** |
| 418 | 416 | * find Month. |
| 419 | 417 | */ |
| 420 | - public function findMonth(int $year, int $month): array|QueryResultInterface |
|
| 418 | + public function findMonth(int $year, int $month): array | QueryResultInterface |
|
| 421 | 419 | { |
| 422 | 420 | $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, $month, 1); |
| 423 | 421 | $endTime = $startTime->modify('+1 month -1 second'); |
@@ -428,7 +426,7 @@ discard block |
||
| 428 | 426 | /** |
| 429 | 427 | * find Week. |
| 430 | 428 | */ |
| 431 | - public function findWeek(int $year, int $week, int $weekStart = 1): array|QueryResultInterface |
|
| 429 | + public function findWeek(int $year, int $week, int $weekStart = 1): array | QueryResultInterface |
|
| 432 | 430 | { |
| 433 | 431 | $startTime = \DateTimeImmutable::createFromMutable( |
| 434 | 432 | DateTimeUtility::convertWeekYear2DayMonthYear($week, $year, $weekStart) |
@@ -441,7 +439,7 @@ discard block |
||
| 441 | 439 | /** |
| 442 | 440 | * find day. |
| 443 | 441 | */ |
| 444 | - public function findDay(int $year, int $month, int $day): array|QueryResultInterface |
|
| 442 | + public function findDay(int $year, int $month, int $day): array | QueryResultInterface |
|
| 445 | 443 | { |
| 446 | 444 | $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, $month, $day); |
| 447 | 445 | $endTime = $startTime->modify('+1 day -1 second'); |
@@ -479,7 +477,7 @@ discard block |
||
| 479 | 477 | public function findByTimeSlot( |
| 480 | 478 | ?\DateTimeInterface $startTime, |
| 481 | 479 | \DateTimeInterface $endTime = null |
| 482 | - ): array|QueryResultInterface { |
|
| 480 | + ): array | QueryResultInterface { |
|
| 483 | 481 | $query = $this->createQuery(); |
| 484 | 482 | $constraints = $this->getDefaultConstraints($query); |
| 485 | 483 | $this->addTimeFrameConstraints($constraints, $query, $startTime, $endTime); |
@@ -493,7 +491,7 @@ discard block |
||
| 493 | 491 | /** |
| 494 | 492 | * Find all indices by the given Event model. |
| 495 | 493 | */ |
| 496 | - public function findByEvent(DomainObjectInterface $event): array|QueryResultInterface |
|
| 494 | + public function findByEvent(DomainObjectInterface $event): array | QueryResultInterface |
|
| 497 | 495 | { |
| 498 | 496 | $query = $this->createQuery(); |
| 499 | 497 | |
@@ -522,8 +520,7 @@ discard block |
||
| 522 | 520 | ->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK); |
| 523 | 521 | |
| 524 | 522 | return isset($frameworkConfig['persistence']['storagePid']) ? |
| 525 | - GeneralUtility::intExplode(',', $frameworkConfig['persistence']['storagePid']) : |
|
| 526 | - []; |
|
| 523 | + GeneralUtility::intExplode(',', $frameworkConfig['persistence']['storagePid']) : []; |
|
| 527 | 524 | } |
| 528 | 525 | |
| 529 | 526 | /** |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | { |
| 105 | 105 | static $tables; |
| 106 | 106 | if (!\is_array($tables)) { |
| 107 | - $tables = array_map(static function ($config) { |
|
| 107 | + $tables = array_map(static function($config) { |
|
| 108 | 108 | return $config['tableName']; |
| 109 | 109 | }, Register::getRegister()); |
| 110 | 110 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | /** |
| 171 | 171 | * Reset the DateTime. |
| 172 | 172 | */ |
| 173 | - public static function resetTime(string|\DateTimeInterface $dateTime = null): \DateTime |
|
| 173 | + public static function resetTime(string | \DateTimeInterface $dateTime = null): \DateTime |
|
| 174 | 174 | { |
| 175 | 175 | $dateTime = self::normalizeDateTimeSingle($dateTime); |
| 176 | 176 | $dateTime->setTime(0, 0); |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * @throws \Exception |
| 185 | 185 | */ |
| 186 | 186 | public static function normalizeDateTimeSingle( |
| 187 | - int|string|\DateTimeInterface $dateInformation = null, |
|
| 187 | + int | string | \DateTimeInterface $dateInformation = null, |
|
| 188 | 188 | \DateTimeZone $timezone = null |
| 189 | 189 | ): \DateTime { |
| 190 | 190 | $timezone = $timezone ?? self::getTimeZone(); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * |
| 234 | 234 | * @see resetTime() |
| 235 | 235 | */ |
| 236 | - public static function getDayStart(string|\DateTimeInterface $dateInformation): \DateTime |
|
| 236 | + public static function getDayStart(string | \DateTimeInterface $dateInformation): \DateTime |
|
| 237 | 237 | { |
| 238 | 238 | return self::resetTime($dateInformation); |
| 239 | 239 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | /** |
| 242 | 242 | * Get the End of the given day. |
| 243 | 243 | */ |
| 244 | - public static function getDayEnd(string|\DateTimeInterface $dateInformation): \DateTime |
|
| 244 | + public static function getDayEnd(string | \DateTimeInterface $dateInformation): \DateTime |
|
| 245 | 245 | { |
| 246 | 246 | $dateTime = self::resetTime($dateInformation); |
| 247 | 247 | $dateTime->setTime(23, 59, 59); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * Configuration cache. |
| 17 | 17 | */ |
| 18 | - protected static ?array $configuration = null; |
|
| 18 | + protected static ? array $configuration = null; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Get the given configuration value. |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * Get the query for the given class name oder object. |
| 30 | 30 | */ |
| 31 | - public static function getQuery(string|object $objectName): QueryInterface |
|
| 31 | + public static function getQuery(string | object $objectName): QueryInterface |
|
| 32 | 32 | { |
| 33 | 33 | $objectName = \is_object($objectName) ? $objectName::class : $objectName; |
| 34 | 34 | /** @var PersistenceManagerInterface $manager */ |