Passed
Pull Request — master (#123)
by
unknown
07:53 queued 02:59
created
Classes/Common/Helper.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 } elseif ($checksum == 10) {
149 149
                     //TODO: Binary operation "+" between string and 1 results in an error.
150 150
                     // @phpstan-ignore-next-line
151
-                    return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD');
151
+                    return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD');
152 152
                 } elseif (substr($id, -1, 1) != $checksum) {
153 153
                     return false;
154 154
                 }
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv);
355 355
         // Merge initialization vector and encrypted data.
356 356
         if ($encrypted !== false) {
357
-            $encrypted = base64_encode($iv . $encrypted);
357
+            $encrypted = base64_encode($iv.$encrypted);
358 358
         }
359 359
         return $encrypted;
360 360
     }
@@ -396,8 +396,8 @@  discard block
 block discarded – undo
396 396
     public static function getHookObjects(string $scriptRelPath): array
397 397
     {
398 398
         $hookObjects = [];
399
-        if (is_array(self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'])) {
400
-            foreach (self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) {
399
+        if (is_array(self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'])) {
400
+            foreach (self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) {
401 401
                 $hookObjects[] = GeneralUtility::makeInstance($classRef);
402 402
             }
403 403
         }
@@ -426,12 +426,12 @@  discard block
 block discarded – undo
426 426
             // NOTE: Only use tables that don't have too many entries!
427 427
             || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'])
428 428
         ) {
429
-            self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR);
429
+            self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR);
430 430
             return '';
431 431
         }
432 432
 
433
-        $makeCacheKey = function ($pid, $uid) {
434
-            return $pid . '.' . $uid;
433
+        $makeCacheKey = function($pid, $uid) {
434
+            return $pid.'.'.$uid;
435 435
         };
436 436
 
437 437
         static $cache = [];
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
 
442 442
             $result = $queryBuilder
443 443
                 ->select(
444
-                    $table . '.index_name AS index_name',
445
-                    $table . '.uid AS uid',
446
-                    $table . '.pid AS pid',
444
+                    $table.'.index_name AS index_name',
445
+                    $table.'.uid AS uid',
446
+                    $table.'.pid AS pid',
447 447
                 )
448 448
                 ->from($table)
449 449
                 ->execute();
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         $result = $cache[$table][$cacheKey] ?? '';
462 462
 
463 463
         if ($result === '') {
464
-            self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING);
464
+            self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING);
465 465
         }
466 466
 
467 467
         return $result;
@@ -490,11 +490,11 @@  discard block
 block discarded – undo
490 490
             // No ISO code, return unchanged.
491 491
             return $code;
492 492
         }
493
-        $lang = LocalizationUtility::translate('LLL:' . $file . ':' . $code);
493
+        $lang = LocalizationUtility::translate('LLL:'.$file.':'.$code);
494 494
         if (!empty($lang)) {
495 495
             return $lang;
496 496
         } else {
497
-            self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE);
497
+            self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE);
498 498
             return $code;
499 499
         }
500 500
     }
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
         // Sanitize input.
659 659
         $pid = max((int) $pid, 0);
660 660
         if (!$pid) {
661
-            self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING);
661
+            self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING);
662 662
             return $indexName;
663 663
         }
664 664
         /** @var PageRepository $pageRepository */
@@ -681,13 +681,13 @@  discard block
 block discarded – undo
681 681
         // First fetch the uid of the received index_name
682 682
         $result = $queryBuilder
683 683
             ->select(
684
-                $table . '.uid AS uid',
685
-                $table . '.l18n_parent AS l18n_parent'
684
+                $table.'.uid AS uid',
685
+                $table.'.l18n_parent AS l18n_parent'
686 686
             )
687 687
             ->from($table)
688 688
             ->where(
689
-                $queryBuilder->expr()->eq($table . '.pid', $pid),
690
-                $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($indexName)),
689
+                $queryBuilder->expr()->eq($table.'.pid', $pid),
690
+                $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($indexName)),
691 691
                 self::whereExpression($table, true)
692 692
             )
693 693
             ->setMaxResults(1)
@@ -698,12 +698,12 @@  discard block
 block discarded – undo
698 698
         if ($row) {
699 699
             // Now we use the uid of the l18_parent to fetch the index_name of the translated content element.
700 700
             $result = $queryBuilder
701
-                ->select($table . '.index_name AS index_name')
701
+                ->select($table.'.index_name AS index_name')
702 702
                 ->from($table)
703 703
                 ->where(
704
-                    $queryBuilder->expr()->eq($table . '.pid', $pid),
705
-                    $queryBuilder->expr()->eq($table . '.uid', $row['l18n_parent']),
706
-                    $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId),
704
+                    $queryBuilder->expr()->eq($table.'.pid', $pid),
705
+                    $queryBuilder->expr()->eq($table.'.uid', $row['l18n_parent']),
706
+                    $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId),
707 707
                     self::whereExpression($table, true)
708 708
                 )
709 709
                 ->setMaxResults(1)
@@ -721,14 +721,14 @@  discard block
 block discarded – undo
721 721
         if (empty($labels[$table][$pid][$languageContentId][$indexName])) {
722 722
             // Check if this table is allowed for translation.
723 723
             if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'])) {
724
-                $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]);
724
+                $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]);
725 725
                 if ($languageContentId > 0) {
726 726
                     $additionalWhere = $queryBuilder->expr()->andX(
727 727
                         $queryBuilder->expr()->orX(
728
-                            $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]),
729
-                            $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId)
728
+                            $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]),
729
+                            $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId)
730 730
                         ),
731
-                        $queryBuilder->expr()->eq($table . '.l18n_parent', 0)
731
+                        $queryBuilder->expr()->eq($table.'.l18n_parent', 0)
732 732
                     );
733 733
                 }
734 734
 
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
                     ->select('*')
738 738
                     ->from($table)
739 739
                     ->where(
740
-                        $queryBuilder->expr()->eq($table . '.pid', $pid),
740
+                        $queryBuilder->expr()->eq($table.'.pid', $pid),
741 741
                         $additionalWhere,
742 742
                         self::whereExpression($table, true)
743 743
                     )
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
                         }
756 756
                     }
757 757
                 } else {
758
-                    self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE);
758
+                    self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE);
759 759
                 }
760 760
             } else {
761
-                self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING);
761
+                self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING);
762 762
             }
763 763
         }
764 764
 
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
             return GeneralUtility::makeInstance(ConnectionPool::class)
805 805
                 ->getQueryBuilderForTable($table)
806 806
                 ->expr()
807
-                ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0);
807
+                ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0);
808 808
         } else {
809 809
             self::log('Unexpected TYPO3_MODE', LOG_SEVERITY_ERROR);
810 810
             return '1=-1';
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
         try {
871 871
             $response = $requestFactory->request($url, 'GET', $configuration);
872 872
         } catch (\Exception $e) {
873
-            self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING);
873
+            self::log('Could not fetch data from URL "'.$url.'". Error: '.$e->getMessage().'.', LOG_SEVERITY_WARNING);
874 874
             return false;
875 875
         }
876 876
         return $response->getBody()->getContents();
Please login to merge, or discard this patch.
Classes/Controller/CollectionController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             $simplePagination = new SimplePagination($solrPaginator);
169 169
 
170 170
             $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator);
171
-            $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]);
171
+            $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]);
172 172
         }
173 173
 
174 174
         $this->view->assign('viewData', $this->viewData);
@@ -220,9 +220,9 @@  discard block
 block discarded – undo
220 220
         foreach ($collections as $collection) {
221 221
             $solrQuery = '';
222 222
             if ($collection->getIndexSearch() != '') {
223
-                $solrQuery .= '(' . $collection->getIndexSearch() . ')';
223
+                $solrQuery .= '('.$collection->getIndexSearch().')';
224 224
             } else {
225
-                $solrQuery .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")';
225
+                $solrQuery .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")';
226 226
             }
227 227
 
228 228
             // We only care about the UID and partOf in the results and want them sorted
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
             if ($collection->getIndexSearch()) {
237 237
                 $params['query'] = $solrQuery;
238 238
             } else {
239
-                $params['query'] = $solrQuery . ' AND partof:0 AND toplevel:true';
239
+                $params['query'] = $solrQuery.' AND partof:0 AND toplevel:true';
240 240
             }
241 241
             $partOfNothing = $solr->searchRaw($params);
242 242
 
243
-            $params['query'] = $solrQuery . ' AND NOT partof:0 AND toplevel:true';
243
+            $params['query'] = $solrQuery.' AND NOT partof:0 AND toplevel:true';
244 244
             $partOfSomething = $solr->searchRaw($params);
245 245
 
246 246
             $collectionInfo = [];
Please login to merge, or discard this patch.
Classes/Controller/BasketController.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 foreach ($this->requestData['selected'] as $docValue) {
134 134
                     if ($docValue['id']) {
135 135
                         $docData = $this->getDocumentData((int) $docValue['id'], $docValue);
136
-                        $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
136
+                        $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
137 137
                         $this->redirectToUri($pdfUrl);
138 138
                     }
139 139
                 }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         if ($allMails->count() > 0) {
201 201
             $mailSelect[0] = htmlspecialchars(LocalizationUtility::translate('basket.chooseMail', 'dlf'));
202 202
             foreach ($allMails as $mail) {
203
-                $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()) . ' (' . htmlspecialchars($mail->getMail()) . ')';
203
+                $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()).' ('.htmlspecialchars($mail->getMail()).')';
204 204
             }
205 205
             $this->view->assign('mailSelect', $mailSelect);
206 206
         }
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
 
289 289
         $docData = $this->getDocumentData((int) $id, $data);
290 290
 
291
-        $entryKey = $id . '_' . $startPage;
291
+        $entryKey = $id.'_'.$startPage;
292 292
         if (!empty($startX)) {
293
-            $entryKey .= '_' . $startX;
293
+            $entryKey .= '_'.$startX;
294 294
         }
295 295
         if (!empty($endX)) {
296
-            $entryKey .= '_' . $endX;
296
+            $entryKey .= '_'.$endX;
297 297
         }
298 298
 
299 299
         $entry = [
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : (int) $data['endY'], $urlParams);
353 353
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : (int) $data['rotation'], $urlParams);
354 354
 
355
-            $downloadUrl = $this->settings['pdfgenerate'] . $urlParams;
355
+            $downloadUrl = $this->settings['pdfgenerate'].$urlParams;
356 356
 
357 357
             $title = $this->document->getTitle();
358 358
             if (empty($title)) {
@@ -363,15 +363,15 @@  discard block
 block discarded – undo
363 363
             $info = '';
364 364
             if ($data['startX'] != '' && $data['endX'] != '') {
365 365
                 // cutout
366
-                $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')) . ' ';
366
+                $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')).' ';
367 367
             }
368 368
             if ($data['startpage'] == $data['endpage']) {
369 369
                 // One page
370
-                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'];
370
+                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'];
371 371
             } else {
372
-                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'] . '-' . $data['endpage'];
372
+                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'].'-'.$data['endpage'];
373 373
             }
374
-            $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')';
374
+            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')';
375 375
             if ($data['startpage'] == $data['endpage']) {
376 376
                 $pageNums = 1;
377 377
             } else {
@@ -444,12 +444,12 @@  discard block
 block discarded – undo
444 444
             if ($piVars['addToBasket'] == 'list') {
445 445
                 $documentItem['endpage'] = $this->document->getCurrentDocument()->numPages;
446 446
             }
447
-            $arrayKey = $documentItem['id'] . '_' . $page;
447
+            $arrayKey = $documentItem['id'].'_'.$page;
448 448
             if (!empty($documentItem['startX'])) {
449
-                $arrayKey .= '_' . $documentItem['startX'];
449
+                $arrayKey .= '_'.$documentItem['startX'];
450 450
             }
451 451
             if (!empty($documentItem['endX'])) {
452
-                $arrayKey .= '_' . $documentItem['endX'];
452
+                $arrayKey .= '_'.$documentItem['endX'];
453 453
             }
454 454
             // do not add more than one identical object
455 455
             if (!in_array($arrayKey, $items)) {
@@ -470,14 +470,14 @@  discard block
 block discarded – undo
470 470
                     // remove parameter endpage
471 471
                     $pdfParams = str_replace(",##endpage##", '', $pdfParams);
472 472
                 }
473
-                $pdfGenerateUrl = $this->settings['pdfgenerate'] . $pdfParams;
473
+                $pdfGenerateUrl = $this->settings['pdfgenerate'].$pdfParams;
474 474
                 if ($this->settings['pregeneration']) {
475 475
                     // send ajax request to webapp
476 476
                     $output .= '
477 477
      <script>
478 478
       $(document).ready(function(){
479 479
        $.ajax({
480
-         url: "' . $pdfGenerateUrl . '",
480
+         url: "' . $pdfGenerateUrl.'",
481 481
        }).done(function() {
482 482
        });
483 483
       });
@@ -515,12 +515,12 @@  discard block
 block discarded – undo
515 515
         }
516 516
         foreach ($piVars['selected'] as $value) {
517 517
             if (isset($value['id'])) {
518
-                $arrayKey = $value['id'] . '_' . $value['startpage'];
518
+                $arrayKey = $value['id'].'_'.$value['startpage'];
519 519
                 if (!empty($value['startX'])) {
520
-                    $arrayKey .= '_' . $value['startX'];
520
+                    $arrayKey .= '_'.$value['startX'];
521 521
                 }
522 522
                 if (!empty($value['endX'])) {
523
-                    $arrayKey .= '_' . $value['endX'];
523
+                    $arrayKey .= '_'.$value['endX'];
524 524
                 }
525 525
                 if (isset($items[$arrayKey])) {
526 526
                     unset($items[$arrayKey]);
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 
554 554
         $mailObject = $this->mailRepository->findByUid(intval($mailId))->getFirst();
555 555
 
556
-        $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf')) . "\n";
556
+        $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf'))."\n";
557 557
         $numberOfPages = 0;
558 558
         $pdfUrl = $this->settings['pdfdownload'];
559 559
         // prepare links
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
             if ($docValue['id']) {
562 562
                 $explodeId = explode("_", $docValue['id']);
563 563
                 $docData = $this->getDocumentData((int) $explodeId[0], $docValue);
564
-                $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
564
+                $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
565 565
                 $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
566 566
                 if ($pages === 0) {
567 567
                     $numberOfPages = $numberOfPages + 1;
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
         }
573 573
         // Remove leading/tailing pdfparamseperator
574 574
         $pdfUrl = trim($pdfUrl, $this->settings['pdfparamseparator']);
575
-        $mailBody = $mailText . $pdfUrl;
575
+        $mailBody = $mailText.$pdfUrl;
576 576
         // Get hook objects.
577 577
         $hookObjects = Helper::getHookObjects('Classes/Controller/BasketController.php');
578 578
         // Hook for getting a customized mail body.
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
         $newActionLog = GeneralUtility::makeInstance(ActionLog::class);
600 600
         $newActionLog->setFileName($pdfUrl);
601 601
         $newActionLog->setCountPages($numberOfPages);
602
-        $newActionLog->setLabel('Mail: ' . $mailObject->getMail());
602
+        $newActionLog->setLabel('Mail: '.$mailObject->getMail());
603 603
 
604 604
         if ($GLOBALS["TSFE"]->loginUser) {
605 605
             // internal user
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
         foreach ($this->requestData['selected'] as $docId => $docValue) {
631 631
             if ($docValue['id']) {
632 632
                 $docData = $this->getDocumentData((int) $docValue['id'], $docValue);
633
-                $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
633
+                $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
634 634
                 $numberOfPages += $docData['pageNums'];
635 635
             }
636 636
         }
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                 if ($docValue['id']) {
649 649
                     $explodeId = explode("_", $docId);
650 650
                     $docData = $this->getDocumentData((int) $explodeId[0], $docValue);
651
-                    $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
651
+                    $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
652 652
                     $numberOfPages += $docData['pageNums'];
653 653
                 }
654 654
             }
@@ -665,12 +665,12 @@  discard block
 block discarded – undo
665 665
             // internal user
666 666
             $actionLog->setUserId($GLOBALS["TSFE"]->fe_user->user['uid']);
667 667
             $actionLog->setName($GLOBALS["TSFE"]->fe_user->user['username']);
668
-            $actionLog->setLabel('Print: ' . $printer->getLabel());
668
+            $actionLog->setLabel('Print: '.$printer->getLabel());
669 669
         } else {
670 670
             // external user
671 671
             $actionLog->setUserId(0);
672 672
             $actionLog->setName('n/a');
673
-            $actionLog->setLabel('Print: ' . $printer->getLabel());
673
+            $actionLog->setLabel('Print: '.$printer->getLabel());
674 674
         }
675 675
         // add action to protocol
676 676
         $this->actionLogRepository->add($actionLog);
Please login to merge, or discard this patch.
Classes/Controller/TableOfContentsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 }
162 162
             }
163 163
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
164
-            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB');
164
+            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB');
165 165
         }
166 166
         return $entryArray;
167 167
     }
@@ -338,16 +338,16 @@  discard block
 block discarded – undo
338 338
                     $title = '';
339 339
                     foreach ($fields as $field) {
340 340
                         if ($field == 'type') {
341
-                            $title .= $this->getTranslatedType($entry['type']) . ' ';
341
+                            $title .= $this->getTranslatedType($entry['type']).' ';
342 342
                         } else {
343
-                            $title .= $entry[$field] . ' ';
343
+                            $title .= $entry[$field].' ';
344 344
                         }
345 345
                     }
346 346
                     return trim($title);
347 347
                 }
348 348
             }
349 349
         }
350
-        return $label ?: $orderLabel;
350
+        return $label ? : $orderLabel;
351 351
     }
352 352
 
353 353
     /**
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
     {
383 383
         usort(
384 384
             $menu[0]['_SUB_MENU'],
385
-            function ($firstElement, $secondElement) {
385
+            function($firstElement, $secondElement) {
386 386
                 if (!empty($firstElement['orderlabel'])) {
387 387
                     return $firstElement['orderlabel'] <=> $secondElement['orderlabel'];
388 388
                 }
Please login to merge, or discard this patch.
Classes/Hooks/DataHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
                     ) {
149 149
                         // Get current configuration.
150 150
                         $result = $queryBuilder
151
-                            ->select($table . '.is_listed AS is_listed')
151
+                            ->select($table.'.is_listed AS is_listed')
152 152
                             ->from($table)
153 153
                             ->where(
154
-                                $queryBuilder->expr()->eq($table . '.uid', (int) $id),
154
+                                $queryBuilder->expr()->eq($table.'.uid', (int) $id),
155 155
                                 Helper::whereExpression($table)
156 156
                             )
157 157
                             ->setMaxResults(1)
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
                     ) {
175 175
                         // Get current configuration.
176 176
                         $result = $queryBuilder
177
-                            ->select($table . '.index_autocomplete AS index_autocomplete')
177
+                            ->select($table.'.index_autocomplete AS index_autocomplete')
178 178
                             ->from($table)
179 179
                             ->where(
180
-                                $queryBuilder->expr()->eq($table . '.uid', (int) $id),
180
+                                $queryBuilder->expr()->eq($table.'.uid', (int) $id),
181 181
                                 Helper::whereExpression($table)
182 182
                             )
183 183
                             ->setMaxResults(1)
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         if ($solr->ready) {
348 348
             // Delete Solr document.
349 349
             $updateQuery = $solr->service->createUpdate();
350
-            $updateQuery->addDeleteQuery('uid:' . (int) $id);
350
+            $updateQuery->addDeleteQuery('uid:'.(int) $id);
351 351
             $updateQuery->addCommit();
352 352
             $solr->service->update($updateQuery);
353 353
         }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
             $document->setCurrentDocument($doc);
371 371
             Indexer::add($document, $this->getDocumentRepository());
372 372
         } else {
373
-            $this->logger->error('Failed to re-index document with UID ' . (string) $id);
373
+            $this->logger->error('Failed to re-index document with UID '.(string) $id);
374 374
         }
375 375
     }
376 376
 
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
                     try {
422 422
                         $response = $solr->service->coreAdmin($query);
423 423
                         if ($response->getWasSuccessful() == false) {
424
-                            $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr');
424
+                            $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr');
425 425
                         }
426 426
                     } catch (\Exception $e) {
427 427
                         $this->logger->warning($e->getMessage());
Please login to merge, or discard this patch.
Classes/Hooks/ItemsProcFunc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,8 +155,8 @@
 block discarded – undo
155 155
             ->select(...explode(',', $fields))
156 156
             ->from($table)
157 157
             ->where(
158
-                $queryBuilder->expr()->eq($table . '.pid', $this->storagePid),
159
-                $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]),
158
+                $queryBuilder->expr()->eq($table.'.pid', $this->storagePid),
159
+                $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]),
160 160
                 $andWhere
161 161
             )
162 162
             ->orderBy($sorting)
Please login to merge, or discard this patch.