Passed
Pull Request — master (#123)
by
unknown
04:23
created
Classes/Controller/ToolboxController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                         $this->renderToolByName('renderScoreTool');
107 107
                         break;
108 108
                     default:
109
-                        $this->logger->warning('Incorrect tool configuration: "' . $this->settings['tools'] . '". Tool "' . $tool . '" does not exist.');
109
+                        $this->logger->warning('Incorrect tool configuration: "'.$this->settings['tools'].'". Tool "'.$tool.'" does not exist.');
110 110
                 }
111 111
             }
112 112
         }
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                 $file['url'] = $this->currentDocument->getDownloadLocation($fileId);
319 319
                 $file['mimetype'] = $this->currentDocument->getFileMimeType($fileId);
320 320
             } else {
321
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
321
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
322 322
             }
323 323
         }
324 324
         return $file;
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             empty($firstPageLink)
427 427
             && empty($secondPageLink)
428 428
         ) {
429
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
429
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
430 430
         }
431 431
 
432 432
         if (!empty($firstPageLink)) {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             }
465 465
         }
466 466
         if (empty($workLink)) {
467
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
467
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
468 468
         }
469 469
         return $workLink;
470 470
     }
Please login to merge, or discard this patch.
ext_localconf.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
 $_EXTKEY = 'dlf';
67 67
 // Register tools for toolbox plugin.
68 68
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = [];
69
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_scoretool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.scoretool';
70
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool';
71
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool';
72
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool';
73
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool';
74
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool';
75
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_modeldownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.modeldownloadtool';
76
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool';
77
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool';
69
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_scoretool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.scoretool';
70
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool';
71
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool';
72
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool';
73
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool';
74
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool';
75
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_modeldownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.modeldownloadtool';
76
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool';
77
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool';
78 78
 // Register hooks.
79 79
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
80 80
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 ];
113 113
 // Register AJAX eID handlers.
114 114
 if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) {
115
-    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
115
+    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main';
116 116
 }
117 117
 // Use Caching Framework for Solr queries
118 118
 $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] ??= [];
Please login to merge, or discard this patch.
Classes/Command/SuggestBuildCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@
 block discarded – undo
74 74
         $solr = Solr::getInstance($input->getOption('solr'));
75 75
         // Connect to Solr server.
76 76
         if (!$solr->ready) {
77
-            $io->error('ERROR: Connection to Solr core ("' . $input->getOption('solr') . '") not possible \n');
77
+            $io->error('ERROR: Connection to Solr core ("'.$input->getOption('solr').'") not possible \n');
78 78
             return BaseCommand::FAILURE;
79 79
         }
80 80
 
81 81
         if (!$solr->suggestBuild()) {
82
-            $io->error('ERROR: Sending the command suggest.build=true to Solr core ("' . $input->getOption('solr') . '") not possible \n');
82
+            $io->error('ERROR: Sending the command suggest.build=true to Solr core ("'.$input->getOption('solr').'") not possible \n');
83 83
             return BaseCommand::FAILURE;
84 84
         }
85 85
 
Please login to merge, or discard this patch.
Classes/Command/IndexCommand.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $this->initializeRepositories((int) $input->getOption('pid'));
105 105
 
106 106
         if ($this->storagePid == 0) {
107
-            $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.');
107
+            $io->error('ERROR: No valid PID ('.$this->storagePid.') given.');
108 108
             return BaseCommand::FAILURE;
109 109
         }
110 110
 
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
120 120
                 $outputSolrCores = [];
121 121
                 foreach ($allSolrCores as $indexName => $uid) {
122
-                    $outputSolrCores[] = $uid . ' : ' . $indexName;
122
+                    $outputSolrCores[] = $uid.' : '.$indexName;
123 123
                 }
124 124
                 if (empty($outputSolrCores)) {
125
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
125
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n");
126 126
                     return BaseCommand::FAILURE;
127 127
                 } else {
128
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n");
128
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $outputSolrCores)."\n");
129 129
                     return BaseCommand::FAILURE;
130 130
                 }
131 131
             }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             $document = $this->documentRepository->findByUid($input->getOption('doc'));
166 166
 
167 167
             if ($document === null) {
168
-                $io->error('ERROR: Document with UID "' . $input->getOption('doc') . '" could not be found on PID ' . $this->storagePid . ' .');
168
+                $io->error('ERROR: Document with UID "'.$input->getOption('doc').'" could not be found on PID '.$this->storagePid.' .');
169 169
                 return BaseCommand::FAILURE;
170 170
             } else {
171 171
                 $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true);
@@ -178,31 +178,31 @@  discard block
 block discarded – undo
178 178
         }
179 179
 
180 180
         if ($doc === null) {
181
-            $io->error('ERROR: Document "' . $input->getOption('doc') . '" could not be loaded.');
181
+            $io->error('ERROR: Document "'.$input->getOption('doc').'" could not be loaded.');
182 182
             return BaseCommand::FAILURE;
183 183
         }
184 184
 
185 185
         $document->setSolrcore($solrCoreUid);
186 186
 
187 187
         if ($dryRun) {
188
-            $io->section('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
188
+            $io->section('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
189 189
             $io->success('All done!');
190 190
             return BaseCommand::SUCCESS;
191 191
         } else {
192 192
             $document->setCurrentDocument($doc);
193 193
 
194 194
             if ($io->isVerbose()) {
195
-                $io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . '.');
195
+                $io->section('Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.'.');
196 196
             }
197 197
             $isSaved = $this->saveToDatabase($document, $input->getOption('softCommit'));
198 198
 
199 199
             if ($isSaved) {
200 200
                 if ($io->isVerbose()) {
201
-                    $io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on Solr core ' . $solrCoreUid . '.');
201
+                    $io->section('Indexing '.$document->getUid().' ("'.$document->getLocation().'") on Solr core '.$solrCoreUid.'.');
202 202
                 }
203 203
                 $isSaved = Indexer::add($document, $this->documentRepository, $input->getOption('softCommit'));
204 204
             } else {
205
-                $io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on PID ' . $this->storagePid . ' . There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.');
205
+                $io->error('ERROR: Document with UID "'.$document->getUid().'" could not be indexed on PID '.$this->storagePid.' . There are missing mandatory fields (at least one of those: '.$this->extConf['general']['requiredMetadataFields'].') in this document.');
206 206
                 return BaseCommand::FAILURE;
207 207
             }
208 208
 
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
                 return BaseCommand::SUCCESS;
212 212
             }
213 213
 
214
-            $io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on Solr core ' . $solrCoreUid . ' . There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.');
215
-            $io->info('INFO: Document with UID "' . $document->getUid() . '" is already in database. If you want to keep the database and index consistent you need to remove it.');
214
+            $io->error('ERROR: Document with UID "'.$document->getUid().'" could not be indexed on Solr core '.$solrCoreUid.' . There are missing mandatory fields (at least one of those: '.$this->extConf['general']['requiredMetadataFields'].') in this document.');
215
+            $io->info('INFO: Document with UID "'.$document->getUid().'" is already in database. If you want to keep the database and index consistent you need to remove it.');
216 216
             return BaseCommand::FAILURE;
217 217
         }
218 218
     }
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -181,18 +181,18 @@  discard block
 block discarded – undo
181 181
             }
182 182
 
183 183
             $navigationArray[$i]['next'] = [
184
-                'tx_dlf[docPage][' . $i . ']' =>
184
+                'tx_dlf[docPage]['.$i.']' =>
185 185
                     MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] + 1, 1, $document->numPages, 1)
186 186
             ];
187 187
             $navigationArray[$i]['prev'] = [
188
-                'tx_dlf[docPage][' . $i . ']' =>
188
+                'tx_dlf[docPage]['.$i.']' =>
189 189
                     MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] - 1, 1, $document->numPages, 1)
190 190
             ];
191 191
 
192 192
             $navigateAllPageNext = array_merge(
193 193
                 $navigateAllPageNext,
194 194
                 [
195
-                    'tx_dlf[docPage][' . $i . ']' =>
195
+                    'tx_dlf[docPage]['.$i.']' =>
196 196
                         MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] + 1, 1, $document->numPages, 1)
197 197
                 ]
198 198
             );
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             $navigateAllPagePrev = array_merge(
201 201
                 $navigateAllPagePrev,
202 202
                 [
203
-                    'tx_dlf[docPage][' . $i . ']' =>
203
+                    'tx_dlf[docPage]['.$i.']' =>
204 204
                         MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] - 1, 1, $document->numPages, 1)
205 205
                 ]
206 206
             );
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             $navigateAllMeasureNext = array_merge(
209 209
                 $navigateAllMeasureNext,
210 210
                 [
211
-                    'tx_dlf[docMeasure][' . $i . ']' =>
211
+                    'tx_dlf[docMeasure]['.$i.']' =>
212 212
                         MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] + 1, 1, $document->numMeasures, 1)
213 213
                 ]
214 214
             );
@@ -216,19 +216,19 @@  discard block
 block discarded – undo
216 216
             $navigateAllMeasurePrev = array_merge(
217 217
                 $navigateAllMeasurePrev,
218 218
                 [
219
-                    'tx_dlf[docMeasure][' . $i . ']' =>
219
+                    'tx_dlf[docMeasure]['.$i.']' =>
220 220
                         MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] - 1, 1, $document->numMeasures, 1)
221 221
                 ]
222 222
             );
223 223
 
224 224
             if ($document->numMeasures > 0) {
225 225
                 $navigationMeasureArray[$i]['next'] = [
226
-                    'tx_dlf[docMeasure][' . $i . ']' =>
226
+                    'tx_dlf[docMeasure]['.$i.']' =>
227 227
                         MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] + 1, 1, $document->numMeasures, 1)
228 228
                 ];
229 229
 
230 230
                 $navigationMeasureArray[$i]['prev'] = [
231
-                    'tx_dlf[docMeasure][' . $i . ']' =>
231
+                    'tx_dlf[docMeasure]['.$i.']' =>
232 232
                         MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] - 1, 1, $document->numMeasures, 1)
233 233
                 ];
234 234
             }
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             }
283 283
             $params = array_merge(
284 284
                 ['tx_dlf' => $this->requestData],
285
-                ['tx_dlf[multipleSource][' . $nextMultipleSourceKey . ']' => $formAddDocument->getLocation()],
285
+                ['tx_dlf[multipleSource]['.$nextMultipleSourceKey.']' => $formAddDocument->getLocation()],
286 286
                 ['tx_dlf[multiview]' => 1]
287 287
             );
288 288
             $uriBuilder = $this->uriBuilder;
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                             // build link for each measure
330 330
                             $params = [
331 331
                                 'tx_dlf' => $this->requestData,
332
-                                'tx_dlf[docMeasure][' . $docNumber . ']' => $i
332
+                                'tx_dlf[docMeasure]['.$docNumber.']' => $i
333 333
                             ];
334 334
                         } else {
335 335
                             // build link for each measure
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         }
414 414
 
415 415
         if (empty($score)) {
416
-            $this->logger->notice('No score file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpScore'] . '"');
416
+            $this->logger->notice('No score file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpScore'].'"');
417 417
         }
418 418
         return $score;
419 419
     }
@@ -444,11 +444,11 @@  discard block
 block discarded – undo
444 444
                 $fulltext['mimetype'] = $file['mimeType'];
445 445
                 break;
446 446
             } else {
447
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
447
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
448 448
             }
449 449
         }
450 450
         if (empty($fulltext)) {
451
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpFulltext'] . '"');
451
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpFulltext'].'"');
452 452
         }
453 453
         return $fulltext;
454 454
     }
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                         'measureIdLinks' => $docMeasures['measureLinks']
509 509
                     ];
510 510
 
511
-                    $jsViewer .= 'tx_dlf_viewer[' . $i . '] = new dlfViewer(' . json_encode($viewer) . ');
511
+                    $jsViewer .= 'tx_dlf_viewer['.$i.'] = new dlfViewer('.json_encode($viewer).');
512 512
                             ';
513 513
                     $i++;
514 514
                 }
@@ -517,8 +517,8 @@  discard block
 block discarded – undo
517 517
             // Viewer configuration.
518 518
             $viewerConfiguration = '$(document).ready(function() {
519 519
                     if (dlfUtils.exists(dlfViewer)) {
520
-                        ' . $jsViewer . '
521
-                        viewerCount = ' . ($i - 1) . ';
520
+                        ' . $jsViewer.'
521
+                        viewerCount = ' . ($i - 1).';
522 522
                     }
523 523
                 });';
524 524
         } else {
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
             // Viewer configuration.
549 549
             $viewerConfiguration = '$(document).ready(function() {
550 550
                     if (dlfUtils.exists(dlfViewer)) {
551
-                        tx_dlf_viewer = new dlfViewer(' . json_encode($viewer) . ');
551
+                        tx_dlf_viewer = new dlfViewer(' . json_encode($viewer).');
552 552
                     }
553 553
                 });';
554 554
         }
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
                     }
645 645
                     break;
646 646
                 } else {
647
-                    $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
647
+                    $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
648 648
                 }
649 649
 
650 650
             } else {
@@ -664,12 +664,12 @@  discard block
 block discarded – undo
664 664
                     }
665 665
                     break;
666 666
                 } else {
667
-                    $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
667
+                    $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
668 668
                 }
669 669
             }
670 670
         }
671 671
         if (empty($image)) {
672
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpImages'] . '"');
672
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpImages'].'"');
673 673
         }
674 674
         return $image;
675 675
     }
Please login to merge, or discard this patch.
Classes/Controller/ListViewController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         // extract collection(s) from collection parameter
83 83
         $collections = [];
84 84
         if (is_array($this->searchParams) && array_key_exists('collection', $this->searchParams)) {
85
-            foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) {
85
+            foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) {
86 86
                 $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry);
87 87
             }
88 88
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $simplePagination = new SimplePagination($solrPaginator);
114 114
 
115 115
             $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator);
116
-            $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]);
116
+            $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]);
117 117
         }
118 118
 
119 119
         $this->view->assign('viewData', $this->viewData);
Please login to merge, or discard this patch.
Classes/Common/Solr/SolrSearch.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             // in which case metadata of toplevel entry isn't yet filled.
229 229
             if (empty($document['metadata'])) {
230 230
                 $document['metadata'] = $this->fetchToplevelMetadataFromSolr([
231
-                    'query' => 'uid:' . $document['uid'],
231
+                    'query' => 'uid:'.$document['uid'],
232 232
                     'start' => 0,
233 233
                     'rows' => 1,
234 234
                     'sort' => ['score' => 'desc'],
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             if (empty($document['title']) && $document['partOf'] > 0) {
240 240
                 $superiorTitle = AbstractDocument::getTitle($document['partOf'], true);
241 241
                 if (!empty($superiorTitle)) {
242
-                    $document['title'] = '[' . $superiorTitle . ']';
242
+                    $document['title'] = '['.$superiorTitle.']';
243 243
                 }
244 244
             }
245 245
         }
@@ -374,13 +374,13 @@  discard block
 block discarded – undo
374 374
         // Set search query.
375 375
         if (
376 376
             !empty($this->searchParams['fulltext'])
377
-            || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($this->searchParams['query'] ?? ''), $matches)
377
+            || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($this->searchParams['query'] ?? ''), $matches)
378 378
         ) {
379 379
             // If the query already is a fulltext query e.g using the facets
380 380
             $this->searchParams['query'] = empty($matches[1]) ? $this->searchParams['query'] : $matches[1];
381 381
             // Search in fulltext field if applicable. Query must not be empty!
382 382
             if (!empty($this->searchParams['query'])) {
383
-                $query = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($this->searchParams['query'])) . ')';
383
+                $query = $fields['fulltext'].':('.Solr::escapeQuery(trim($this->searchParams['query'])).')';
384 384
             }
385 385
             $params['fulltext'] = true;
386 386
         } else {
@@ -403,9 +403,9 @@  discard block
 block discarded – undo
403 403
                         in_array($this->searchParams['extOperator'][$i], $allowedOperators)
404 404
                     ) {
405 405
                         if (!empty($query)) {
406
-                            $query .= ' ' . $this->searchParams['extOperator'][$i] . ' ';
406
+                            $query .= ' '.$this->searchParams['extOperator'][$i].' ';
407 407
                         }
408
-                        $query .= Indexer::getIndexFieldName($this->searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($this->searchParams['extQuery'][$i]) . ')';
408
+                        $query .= Indexer::getIndexFieldName($this->searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($this->searchParams['extQuery'][$i]).')';
409 409
                     }
410 410
                 }
411 411
             }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         // Add filter query for date search
415 415
         if (!empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) {
416 416
             // combine dateFrom and dateTo into range search
417
-            $params['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}'. $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']';
417
+            $params['filterquery'][]['query'] = '{!join from='.$fields['uid'].' to='.$fields['uid'].'}'.$fields['date'].':['.$this->searchParams['dateFrom'].' TO '.$this->searchParams['dateTo'].']';
418 418
         }
419 419
 
420 420
         // Add filter query for faceting.
@@ -431,12 +431,12 @@  discard block
 block discarded – undo
431 431
         ) {
432 432
             // Search in document and all subordinates (valid for up to three levels of hierarchy).
433 433
             $params['filterquery'][]['query'] = '_query_:"{!join from='
434
-                . $fields['uid'] . ' to=' . $fields['partof'] . '}'
435
-                . $fields['uid'] . ':{!join from=' . $fields['uid'] . ' to=' . $fields['partof'] . '}'
436
-                . $fields['uid'] . ':' . $this->searchParams['documentId'] . '"' . ' OR {!join from='
437
-                . $fields['uid'] . ' to=' . $fields['partof'] . '}'
438
-                . $fields['uid'] . ':' . $this->searchParams['documentId'] . ' OR '
439
-                . $fields['uid'] . ':' . $this->searchParams['documentId'];
434
+                . $fields['uid'].' to='.$fields['partof'].'}'
435
+                . $fields['uid'].':{!join from='.$fields['uid'].' to='.$fields['partof'].'}'
436
+                . $fields['uid'].':'.$this->searchParams['documentId'].'"'.' OR {!join from='
437
+                . $fields['uid'].' to='.$fields['partof'].'}'
438
+                . $fields['uid'].':'.$this->searchParams['documentId'].' OR '
439
+                . $fields['uid'].':'.$this->searchParams['documentId'];
440 440
         }
441 441
 
442 442
         // if collections are given, we prepare the collection query string
@@ -456,8 +456,8 @@  discard block
 block discarded – undo
456 456
         if ($this->listedMetadata) {
457 457
             foreach ($this->listedMetadata as $metadata) {
458 458
                 if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) {
459
-                    $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u');
460
-                    $params['fields'] .= ',' . $listMetadataRecord;
459
+                    $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u');
460
+                    $params['fields'] .= ','.$listMetadataRecord;
461 461
                     $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord;
462 462
                 }
463 463
             }
@@ -532,8 +532,8 @@  discard block
 block discarded – undo
532 532
                             if ($this->searchParams['fulltext'] == '1') {
533 533
                                 $searchResult['snippet'] = $doc['snippet'];
534 534
                                 $searchResult['highlight'] = $doc['highlight'];
535
-                                $searchResult['highlight_word'] = preg_replace('/^;|;$/', '',       // remove ; at beginning or end
536
-                                                                  preg_replace('/;+/', ';',         // replace any multiple of ; with a single ;
535
+                                $searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end
536
+                                                                  preg_replace('/;+/', ';', // replace any multiple of ; with a single ;
537 537
                                                                   preg_replace('/[{~\d*}{\s+}{^=*\d+.*\d*}`~!@#$%\^&*()_|+-=?;:\'",.<>\{\}\[\]\\\]/', ';', $this->searchParams['query']))); // replace search operators and special characters with ;
538 538
                             }
539 539
                             $documents[$doc['uid']]['searchResults'][] = $searchResult;
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
                         
558 558
                                     // Fetch metadata for the current batch
559 559
                                     $metadataOf = $this->fetchToplevelMetadataFromSolr([
560
-                                        'query' => 'partof:' . $doc['uid'],
560
+                                        'query' => 'partof:'.$doc['uid'],
561 561
                                         'start' => $start,
562 562
                                         'rows' => min($batchSize, $totalChildren - $start),
563 563
                                     ]);
@@ -609,8 +609,8 @@  discard block
 block discarded – undo
609 609
         if ($this->listedMetadata) {
610 610
             foreach ($this->listedMetadata as $metadata) {
611 611
                 if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) {
612
-                    $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u');
613
-                    $params['fields'] .= ',' . $listMetadataRecord;
612
+                    $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u');
613
+                    $params['fields'] .= ','.$listMetadataRecord;
614 614
                     $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord;
615 615
                 }
616 616
             }
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
         $cache = null;
662 662
         // Calculate cache identifier.
663 663
         if ($enableCache === true) {
664
-            $cacheIdentifier = Helper::digest($solr->core . print_r($parameters, true));
664
+            $cacheIdentifier = Helper::digest($solr->core.print_r($parameters, true));
665 665
             $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('tx_dlf_solr');
666 666
         }
667 667
         $resultSet = [
@@ -679,8 +679,8 @@  discard block
 block discarded – undo
679 679
             if ($this->indexedMetadata) {
680 680
                 foreach ($this->indexedMetadata as $metadata) {
681 681
                     if ($metadata->getIndexIndexed()) {
682
-                        $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . 'i';
683
-                        $queryFields .= $listMetadataRecord . '^' . $metadata->getIndexBoost() . ' ';
682
+                        $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').'i';
683
+                        $queryFields .= $listMetadataRecord.'^'.$metadata->getIndexBoost().' ';
684 684
                     }
685 685
                 }
686 686
             }
@@ -766,24 +766,24 @@  discard block
 block discarded – undo
766 766
         foreach ($this->collections as $collection) {
767 767
             // check for virtual collections query string
768 768
             if ($collection->getIndexSearch()) {
769
-                $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collection->getIndexSearch() . ')' : ' OR (' . $collection->getIndexSearch() . ')';
769
+                $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '('.$collection->getIndexSearch().')' : ' OR ('.$collection->getIndexSearch().')';
770 770
             } else {
771
-                $collectionsQueryString .= empty($collectionsQueryString) ? '"' . $collection->getIndexName() . '"' : ' OR "' . $collection->getIndexName() . '"';
771
+                $collectionsQueryString .= empty($collectionsQueryString) ? '"'.$collection->getIndexName().'"' : ' OR "'.$collection->getIndexName().'"';
772 772
             }
773 773
         }
774 774
 
775 775
         // distinguish between simple collection browsing and actual searching within the collection(s)
776 776
         if (!empty($collectionsQueryString)) {
777 777
             if (empty($query)) {
778
-                $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . ') AND toplevel:true AND partof:0)';
778
+                $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.') AND toplevel:true AND partof:0)';
779 779
             } else {
780
-                $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . '))';
780
+                $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.'))';
781 781
             }
782 782
         }
783 783
 
784 784
         // virtual collections might query documents that are neither toplevel:true nor partof:0 and need to be searched separately
785 785
         if (!empty($virtualCollectionsQueryString)) {
786
-            $virtualCollectionsQueryString = '(' . $virtualCollectionsQueryString . ')';
786
+            $virtualCollectionsQueryString = '('.$virtualCollectionsQueryString.')';
787 787
         }
788 788
 
789 789
         // combine both query strings into a single filterquery via OR if both are given, otherwise pass either of those
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
     private function translateLanguageCode(&$doc): void
862 862
     {
863 863
         if (is_array($doc['metadata']) && array_key_exists('language', $doc['metadata'])) {
864
-            foreach($doc['metadata']['language'] as $indexName => $language) {
864
+            foreach ($doc['metadata']['language'] as $indexName => $language) {
865 865
                 $doc['metadata']['language'][$indexName] = Helper::getLanguageName($language);
866 866
             }
867 867
         }
Please login to merge, or discard this patch.
Classes/Controller/AbstractController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
                 if ($doc !== null) {
165 165
                     $this->document->setCurrentDocument($doc);
166 166
                 } else {
167
-                    $this->logger->error('Failed to load document with record ID "' . $this->requestData['recordId'] . '"');
167
+                    $this->logger->error('Failed to load document with record ID "'.$this->requestData['recordId'].'"');
168 168
                 }
169 169
             }
170 170
         } else {
171
-            $this->logger->error('Invalid ID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading');
171
+            $this->logger->error('Invalid ID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading');
172 172
         }
173 173
     }
174 174
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             && !MathUtility::canBeInterpretedAsInteger($this->requestData['id'])
266 266
             && !GeneralUtility::isValidUrl($this->requestData['id'])
267 267
         ) {
268
-            $this->logger->warning('Invalid ID or URI "' . $this->requestData['id'] . '" for document loading');
268
+            $this->logger->warning('Invalid ID or URI "'.$this->requestData['id'].'" for document loading');
269 269
             unset($this->requestData['id']);
270 270
         }
271 271
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     {
326 326
         if (!array_key_exists($setting, $this->settings) || empty($this->settings[$setting])) {
327 327
             $this->settings[$setting] = $value;
328
-            $this->logger->warning('Setting "' . $setting . '" not set, using default value "' . $value . '". Probably FlexForm for controller "' . get_class($this) . '" is not read.');
328
+            $this->logger->warning('Setting "'.$setting.'" not set, using default value "'.$value.'". Probably FlexForm for controller "'.get_class($this).'" is not read.');
329 329
         } else {
330 330
             $this->settings[$setting] = (int) $this->settings[$setting];
331 331
         }
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         $pages = [];
411 411
         $pagesSect = [];
412 412
         $aRange = [];
413
-        $nRange = 5;    // ToDo: should be made configurable
413
+        $nRange = 5; // ToDo: should be made configurable
414 414
 
415 415
         // lower limit of the range
416 416
         $nBottom = $currentPageNumber - $nRange;
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
         // check whether the first screen page is > 1, if yes then points must be added
427 427
         if ($aRange[0] > 1) {
428
-            array_push($pagesSect, ['label' => '...','startRecordNumber' => '...']);
428
+            array_push($pagesSect, ['label' => '...', 'startRecordNumber' => '...']);
429 429
         };
430 430
         $lastStartRecordNumberGrid = 0; // due to validity outside the loop
431 431
         foreach (range($firstPage, $lastPage) as $i) {
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 
469 469
                 // Check if screen page is in range
470 470
                 if (in_array($i, $aRange)) {
471
-                    array_push($pagesSect, ['label' => $i,'startRecordNumber' => $startRecordNumber]);
471
+                    array_push($pagesSect, ['label' => $i, 'startRecordNumber' => $startRecordNumber]);
472 472
                 };
473 473
             };
474 474
         };
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
         if ($this->document) {
532 532
             $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, true);
533 533
         } else {
534
-            $this->logger->error('Invalid UID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading');
534
+            $this->logger->error('Invalid UID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading');
535 535
         }
536 536
 
537 537
         return $doc;
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
             foreach ($this->requestData['multipleSource'] as $location) {
570 570
                 $document = AbstractDocument::getInstance($location, $this->settings, true);
571 571
                 if ($document !== null) {
572
-                    $this->documentArray['extra_' . $i] = $document;
572
+                    $this->documentArray['extra_'.$i] = $document;
573 573
                 }
574 574
                 $i++;
575 575
             }
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 
594 594
             $this->document->setLocation($documentId);
595 595
         } else {
596
-            $this->logger->error('Invalid location given "' . $documentId . '" for document loading');
596
+            $this->logger->error('Invalid location given "'.$documentId.'" for document loading');
597 597
         }
598 598
 
599 599
         return $doc;
Please login to merge, or discard this patch.