Passed
Pull Request — master (#105)
by Alexander
05:13
created
Classes/Controller/TableOfContentsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
                 }
141 141
             }
142 142
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
143
-            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB');
143
+            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB');
144 144
         }
145 145
         return $entryArray;
146 146
     }
Please login to merge, or discard this patch.
Classes/Hooks/Form/FieldInformation/SolrCoreStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                     $uptimeInSeconds = floor($response->getUptime() / 1000);
56 56
                     $dateTimeFrom = new \DateTime('@0');
57 57
                     $dateTimeTo = new \DateTime("@$uptimeInSeconds");
58
-                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a ' . Helper::getLanguageService()->getLL('flash.days') . ', %H:%I:%S');
58
+                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a '.Helper::getLanguageService()->getLL('flash.days').', %H:%I:%S');
59 59
                     $numDocuments = $response->getNumberOfDocuments();
60 60
                     $startTime = $response->getStartTime() ? strftime('%c', $response->getStartTime()->getTimestamp()) : 'N/A';
61 61
                     $lastModified = $response->getLastModified() ? strftime('%c', $response->getLastModified()->getTimestamp()) : 'N/A';
Please login to merge, or discard this patch.
Classes/Hooks/DataHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
                     ) {
140 140
                         // Get current configuration.
141 141
                         $result = $queryBuilder
142
-                            ->select($table . '.is_listed AS is_listed')
142
+                            ->select($table.'.is_listed AS is_listed')
143 143
                             ->from($table)
144 144
                             ->where(
145
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
145
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
146 146
                                 Helper::whereExpression($table)
147 147
                             )
148 148
                             ->setMaxResults(1)
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
                     ) {
165 165
                         // Get current configuration.
166 166
                         $result = $queryBuilder
167
-                            ->select($table . '.index_autocomplete AS index_autocomplete')
167
+                            ->select($table.'.index_autocomplete AS index_autocomplete')
168 168
                             ->from($table)
169 169
                             ->where(
170
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
170
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
171 171
                                 Helper::whereExpression($table)
172 172
                             )
173 173
                             ->setMaxResults(1)
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                                 if ($solr->ready) {
243 243
                                     // Delete Solr document.
244 244
                                     $updateQuery = $solr->service->createUpdate();
245
-                                    $updateQuery->addDeleteQuery('uid:' . $id);
245
+                                    $updateQuery->addDeleteQuery('uid:'.$id);
246 246
                                     $updateQuery->addCommit();
247 247
                                     $solr->service->update($updateQuery);
248 248
                                 }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                                     $document->setDoc($doc);
255 255
                                     Indexer::add($document);
256 256
                                 } else {
257
-                                    $this->logger->error('Failed to re-index document with UID ' . $id);
257
+                                    $this->logger->error('Failed to re-index document with UID '.$id);
258 258
                                 }
259 259
                             }
260 260
                         }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                         if ($solr->ready) {
322 322
                             // Delete Solr document.
323 323
                             $updateQuery = $solr->service->createUpdate();
324
-                            $updateQuery->addDeleteQuery('uid:' . $id);
324
+                            $updateQuery->addDeleteQuery('uid:'.$id);
325 325
                             $updateQuery->addCommit();
326 326
                             $solr->service->update($updateQuery);
327 327
                             if ($command == 'delete') {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                             $document->setDoc($doc);
337 337
                             Indexer::add($document);
338 338
                         } else {
339
-                            $this->logger->error('Failed to re-index document with UID ' . $id);
339
+                            $this->logger->error('Failed to re-index document with UID '.$id);
340 340
                         }
341 341
                         break;
342 342
                 }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                             // Nothing to do here.
388 388
                         }
389 389
                     }
390
-                    $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr');
390
+                    $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr');
391 391
                 }
392 392
             }
393 393
         }
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
@@ -126,8 +126,8 @@
 block discarded – undo
126 126
             ->select(...explode(',', $fields))
127 127
             ->from($table)
128 128
             ->where(
129
-                $queryBuilder->expr()->eq($table . '.pid', intval($this->storagePid)),
130
-                $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]),
129
+                $queryBuilder->expr()->eq($table.'.pid', intval($this->storagePid)),
130
+                $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]),
131 131
                 $andWhere
132 132
             )
133 133
             ->orderBy($sorting)
Please login to merge, or discard this patch.
Classes/Hooks/ThumbnailCustomElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters']
23 23
         $result = $this->initializeResultArray();
24 24
         if (!empty($this->data['databaseRow']['thumbnail'])) {
25
-            $result['html'] = '<img alt="Thumbnail" title="" src="' . $this->data['databaseRow']['thumbnail'] . '" />';
25
+            $result['html'] = '<img alt="Thumbnail" title="" src="'.$this->data['databaseRow']['thumbnail'].'" />';
26 26
         } else {
27 27
             $result['html'] = '';
28 28
         }
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentRepository.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 
395 395
         $excludeOtherWhere = '';
396 396
         if ($settings['excludeOther']) {
397
-            $excludeOtherWhere = 'tx_dlf_documents.pid=' . intval($settings['pages']);
397
+            $excludeOtherWhere = 'tx_dlf_documents.pid='.intval($settings['pages']);
398 398
         }
399 399
         // Check if there are any metadata to suggest.
400 400
         $result = $queryBuilder
@@ -446,12 +446,12 @@  discard block
 block discarded – undo
446 446
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
447 447
             ->getConnectionForTable('tx_dlf_documents');
448 448
 
449
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
450
-            'FROM `tx_dlf_documents` ' .
451
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
452
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
453
-            'WHERE `tx_dlf_documents`.`record_id` = ? ' .
454
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
449
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
450
+            'FROM `tx_dlf_documents` '.
451
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
452
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
453
+            'WHERE `tx_dlf_documents`.`record_id` = ? '.
454
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
455 455
             $where;
456 456
 
457 457
         $values = [
@@ -481,13 +481,13 @@  discard block
 block discarded – undo
481 481
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
482 482
             ->getConnectionForTable('tx_dlf_documents');
483 483
 
484
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
485
-            'FROM `tx_dlf_documents` ' .
486
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
487
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
488
-            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) ' .
489
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
490
-            'AND ' . Helper::whereExpression('tx_dlf_collections') . ' ' .
484
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
485
+            'FROM `tx_dlf_documents` '.
486
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
487
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
488
+            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) '.
489
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
490
+            'AND '.Helper::whereExpression('tx_dlf_collections').' '.
491 491
             'GROUP BY `tx_dlf_documents`.`uid` ';
492 492
 
493 493
         $values = [
@@ -569,13 +569,13 @@  discard block
 block discarded – undo
569 569
         // Set search query.
570 570
         if (
571 571
             (!empty($searchParams['fulltext']))
572
-            || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches)
572
+            || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches)
573 573
         ) {
574 574
             // If the query already is a fulltext query e.g using the facets
575 575
             $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1];
576 576
             // Search in fulltext field if applicable. Query must not be empty!
577 577
             if (!empty($searchParams['query'])) {
578
-                $query = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')';
578
+                $query = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')';
579 579
             }
580 580
             $params['fulltext'] = true;
581 581
         } else {
@@ -598,9 +598,9 @@  discard block
 block discarded – undo
598 598
                         in_array($searchParams['extOperator'][$i], $allowedOperators)
599 599
                     ) {
600 600
                         if (!empty($query)) {
601
-                            $query .= ' ' . $searchParams['extOperator'][$i] . ' ';
601
+                            $query .= ' '.$searchParams['extOperator'][$i].' ';
602 602
                         }
603
-                        $query .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')';
603
+                        $query .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')';
604 604
                     }
605 605
                 }
606 606
             }
@@ -620,12 +620,12 @@  discard block
 block discarded – undo
620 620
         ) {
621 621
             // Search in document and all subordinates (valid for up to three levels of hierarchy).
622 622
             $params['filterquery'][]['query'] = '_query_:"{!join from='
623
-                . $fields['uid'] . ' to=' . $fields['partof'] . '}'
624
-                . $fields['uid'] . ':{!join from=' . $fields['uid'] . ' to=' . $fields['partof'] . '}'
625
-                . $fields['uid'] . ':' . $searchParams['documentId'] . '"' . ' OR {!join from='
626
-                . $fields['uid'] . ' to=' . $fields['partof'] . '}'
627
-                . $fields['uid'] . ':' . $searchParams['documentId'] . ' OR '
628
-                . $fields['uid'] . ':' . $searchParams['documentId'];
623
+                . $fields['uid'].' to='.$fields['partof'].'}'
624
+                . $fields['uid'].':{!join from='.$fields['uid'].' to='.$fields['partof'].'}'
625
+                . $fields['uid'].':'.$searchParams['documentId'].'"'.' OR {!join from='
626
+                . $fields['uid'].' to='.$fields['partof'].'}'
627
+                . $fields['uid'].':'.$searchParams['documentId'].' OR '
628
+                . $fields['uid'].':'.$searchParams['documentId'];
629 629
         }
630 630
 
631 631
         // if a collection is given, we prepare the collection query string
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
             $collecionsQueryString = $collection->getIndexName();
634 634
             $params['filterquery'][]['query'] = 'toplevel:true';
635 635
             $params['filterquery'][]['query'] = 'partof:0';
636
-            $params['filterquery'][]['query'] = 'collection_faceting:("' . $collecionsQueryString . '")';
636
+            $params['filterquery'][]['query'] = 'collection_faceting:("'.$collecionsQueryString.'")';
637 637
         }
638 638
 
639 639
         // Set some query parameters.
@@ -662,8 +662,8 @@  discard block
 block discarded – undo
662 662
         if ($listedMetadata) {
663 663
             foreach ($listedMetadata as $metadata) {
664 664
                 if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) {
665
-                    $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u');
666
-                    $params['fields'] .= ',' . $listMetadataRecord;
665
+                    $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u');
666
+                    $params['fields'] .= ','.$listMetadataRecord;
667 667
                     $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord;
668 668
                 }
669 669
             }
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
                     if (empty($documents[$doc['uid']]['title']) && ($documents[$doc['uid']]['partOf'] > 0)) {
750 750
                         $parentDocument = $this->findByUid($documents[$doc['uid']]['partOf']);
751 751
                         if ($parentDocument) {
752
-                            $documents[$doc['uid']]['title'] = '[' . $parentDocument->getTitle() . ']';
752
+                            $documents[$doc['uid']]['title'] = '['.$parentDocument->getTitle().']';
753 753
                         }
754 754
                     }
755 755
                 }
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
         $metadataArray = [];
774 774
 
775 775
         // Set some query parameters.
776
-        $params['query'] = 'uid:' . $uid;
776
+        $params['query'] = 'uid:'.$uid;
777 777
         $params['start'] = 0;
778 778
         $params['rows'] = 1;
779 779
         $params['sort'] = ['score' => 'desc'];
@@ -785,8 +785,8 @@  discard block
 block discarded – undo
785 785
         if ($listedMetadata) {
786 786
             foreach ($listedMetadata as $metadata) {
787 787
                 if ($metadata->getIndexIndexed()) {
788
-                    $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . 'i';
789
-                    $params['fields'] .= ',' . $listMetadataRecord;
788
+                    $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').'i';
789
+                    $params['fields'] .= ','.$listMetadataRecord;
790 790
                     $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord;
791 791
                 }
792 792
             }
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
         $cache = null;
837 837
         // Calculate cache identifier.
838 838
         if ($enableCache === true) {
839
-            $cacheIdentifier = Helper::digest($solr->core . print_r($parameters, true));
839
+            $cacheIdentifier = Helper::digest($solr->core.print_r($parameters, true));
840 840
             $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('tx_dlf_solr');
841 841
         }
842 842
         $resultSet = [
Please login to merge, or discard this patch.
Classes/Domain/Repository/MetadataRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         // order by oai_name
49 49
         $query->setOrderings(
50
-            array('sorting' => QueryInterface::ORDER_ASCENDING)
50
+            array ('sorting' => QueryInterface::ORDER_ASCENDING)
51 51
         );
52 52
 
53 53
         return $query->execute();
Please login to merge, or discard this patch.
Classes/Domain/Repository/CollectionRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         // order by oai_name
100 100
         $query->setOrderings(
101
-            array('oai_name' => QueryInterface::ORDER_ASCENDING)
101
+            array ('oai_name' => QueryInterface::ORDER_ASCENDING)
102 102
         );
103 103
 
104 104
         return $query->execute();
Please login to merge, or discard this patch.
Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 if ($this->document) {
158 158
                     $doc = Doc::getInstance($this->document->getLocation(), ['storagePid' => $pid], true);
159 159
                 } else {
160
-                    $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $pid . '" for document loading');
160
+                    $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$pid.'" for document loading');
161 161
                 }
162 162
             } else if (GeneralUtility::isValidUrl($requestData['id'])) {
163 163
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
                     $this->document->setLocation($requestData['id']);
177 177
                 } else {
178
-                    $this->logger->error('Invalid location given "' . $requestData['id'] . '" for document loading');
178
+                    $this->logger->error('Invalid location given "'.$requestData['id'].'" for document loading');
179 179
                 }
180 180
             }
181 181
 
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
                 if ($this->document !== null && $doc !== null) {
193 193
                     $this->document->setDoc($doc);
194 194
                 } else {
195
-                    $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"');
195
+                    $this->logger->error('Failed to load document with record ID "'.$requestData['recordId'].'"');
196 196
                 }
197 197
             }
198 198
         } else {
199
-            $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $pid . '" for document loading');
199
+            $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$pid.'" for document loading');
200 200
         }
201 201
     }
202 202
 }
Please login to merge, or discard this patch.