Completed
Push — master ( 6f6675...50a3c8 )
by
unknown
15s
created
Classes/Domain/Repository/IndexRepository.php 1 patch
Spacing   +17 added lines, -19 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         OptionRequest $options,
81 81
         array $allowedPages = [],
82 82
         bool $ignoreEnableFields = true
83
-    ): array|QueryResultInterface {
83
+    ): array | QueryResultInterface {
84 84
         $query = $this->createQuery();
85 85
         $querySettings = $query->getQuerySettings();
86 86
         $querySettings->setIgnoreEnableFields($ignoreEnableFields);
@@ -142,12 +142,12 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function findList(
144 144
         int $limit = 0,
145
-        int|string $listStartTime = 0,
145
+        int | string $listStartTime = 0,
146 146
         int $startOffsetHours = 0,
147 147
         int $overrideStartDate = 0,
148 148
         int $overrideEndDate = 0,
149 149
         bool $ignoreStoragePid = false
150
-    ): array|QueryResultInterface {
150
+    ): array | QueryResultInterface {
151 151
         $startTime = DateTimeUtility::getNow();
152 152
         $endTime = null;
153 153
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         \DateTimeInterface $endDate = null,
189 189
         array $customSearch = [],
190 190
         int $limit = 0
191
-    ): array|QueryResultInterface {
191
+    ): array | QueryResultInterface {
192 192
         $event = $this->eventDispatcher->dispatch(new IndexRepositoryFindBySearchEvent(
193 193
             $startDate,
194 194
             $endDate,
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     /**
225 225
      * Find Past Events.
226 226
      */
227
-    public function findByPast(int $limit, string $sort, string $listStartTime = '0'): array|QueryResultInterface
227
+    public function findByPast(int $limit, string $sort, string $listStartTime = '0'): array | QueryResultInterface
228 228
     {
229 229
         $now = DateTimeUtility::getNow();
230 230
         if ('now' !== $listStartTime) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     /**
251 251
      * Find by Index UIDs.
252 252
      */
253
-    public function findByUids(array $uids): array|QueryResultInterface
253
+    public function findByUids(array $uids): array | QueryResultInterface
254 254
     {
255 255
         $query = $this->createQuery();
256 256
         $query->setOrderings($this->getSorting(QueryInterface::ORDER_ASCENDING));
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         int $limit = 100,
272 272
         string $sort = QueryInterface::ORDER_ASCENDING,
273 273
         bool $useIndexTime = false
274
-    ): array|QueryResultInterface {
274
+    ): array | QueryResultInterface {
275 275
         if (!$future && !$past) {
276 276
             return [];
277 277
         }
@@ -295,8 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
         $query->setLimit($limit);
297 297
         $sort = QueryInterface::ORDER_ASCENDING === $sort ?
298
-            QueryInterface::ORDER_ASCENDING :
299
-            QueryInterface::ORDER_DESCENDING;
298
+            QueryInterface::ORDER_ASCENDING : QueryInterface::ORDER_DESCENDING;
300 299
         $query->setOrderings($this->getSorting($sort));
301 300
 
302 301
         return $this->matchAndExecute($query, $constraints);
@@ -311,7 +310,7 @@  discard block
 block discarded – undo
311 310
         bool $past = false,
312 311
         int $limit = 100,
313 312
         string $sort = QueryInterface::ORDER_ASCENDING
314
-    ): array|QueryResultInterface {
313
+    ): array | QueryResultInterface {
315 314
         if (!$future && !$past) {
316 315
             return [];
317 316
         }
@@ -339,8 +338,7 @@  discard block
 block discarded – undo
339 338
 
340 339
         $query->setLimit($limit);
341 340
         $sort = QueryInterface::ORDER_ASCENDING === $sort ?
342
-            QueryInterface::ORDER_ASCENDING :
343
-            QueryInterface::ORDER_DESCENDING;
341
+            QueryInterface::ORDER_ASCENDING : QueryInterface::ORDER_DESCENDING;
344 342
         $query->setOrderings($this->getSorting($sort));
345 343
 
346 344
         return $this->matchAndExecute($query, $constraints);
@@ -349,7 +347,7 @@  discard block
 block discarded – undo
349 347
     /**
350 348
      * find Year.
351 349
      */
352
-    public function findYear(int $year): array|QueryResultInterface
350
+    public function findYear(int $year): array | QueryResultInterface
353 351
     {
354 352
         $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, 1, 1);
355 353
         $endTime = $startTime->modify('+1 year -1 second');
@@ -360,7 +358,7 @@  discard block
 block discarded – undo
360 358
     /**
361 359
      * find quarter.
362 360
      */
363
-    public function findQuarter(int $year, int $quarter): array|QueryResultInterface
361
+    public function findQuarter(int $year, int $quarter): array | QueryResultInterface
364 362
     {
365 363
         $startMonth = 1 + (3 * ($quarter - 1));
366 364
         $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, $startMonth, 1);
@@ -372,7 +370,7 @@  discard block
 block discarded – undo
372 370
     /**
373 371
      * find Month.
374 372
      */
375
-    public function findMonth(int $year, int $month): array|QueryResultInterface
373
+    public function findMonth(int $year, int $month): array | QueryResultInterface
376 374
     {
377 375
         $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, $month, 1);
378 376
         $endTime = $startTime->modify('+1 month -1 second');
@@ -383,7 +381,7 @@  discard block
 block discarded – undo
383 381
     /**
384 382
      * find Week.
385 383
      */
386
-    public function findWeek(int $year, int $week, int $weekStart = 1): array|QueryResultInterface
384
+    public function findWeek(int $year, int $week, int $weekStart = 1): array | QueryResultInterface
387 385
     {
388 386
         $startTime = \DateTimeImmutable::createFromMutable(
389 387
             DateTimeUtility::convertWeekYear2DayMonthYear($week, $year, $weekStart)
@@ -396,7 +394,7 @@  discard block
 block discarded – undo
396 394
     /**
397 395
      * find day.
398 396
      */
399
-    public function findDay(int $year, int $month, int $day): array|QueryResultInterface
397
+    public function findDay(int $year, int $month, int $day): array | QueryResultInterface
400 398
     {
401 399
         $startTime = (new \DateTimeImmutable('midnight'))->setDate($year, $month, $day);
402 400
         $endTime = $startTime->modify('+1 day -1 second');
@@ -434,7 +432,7 @@  discard block
 block discarded – undo
434 432
     public function findByTimeSlot(
435 433
         ?\DateTimeInterface $startTime,
436 434
         \DateTimeInterface $endTime = null
437
-    ): array|QueryResultInterface {
435
+    ): array | QueryResultInterface {
438 436
         $query = $this->createQuery();
439 437
         $constraints = $this->getDefaultConstraints($query);
440 438
         $this->addTimeFrameConstraints($constraints, $query, $startTime, $endTime);
@@ -449,7 +447,7 @@  discard block
 block discarded – undo
449 447
     /**
450 448
      * Find all indices by the given Event model.
451 449
      */
452
-    public function findByEvent(DomainObjectInterface $event): array|QueryResultInterface
450
+    public function findByEvent(DomainObjectInterface $event): array | QueryResultInterface
453 451
     {
454 452
         $query = $this->createQuery();
455 453
 
Please login to merge, or discard this patch.