Passed
Pull Request — master (#70)
by Alexander
03:07
created
Classes/Hooks/DataHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
                     ) {
124 124
                         // Get current configuration.
125 125
                         $result = $queryBuilder
126
-                            ->select($table . '.is_listed AS is_listed')
126
+                            ->select($table.'.is_listed AS is_listed')
127 127
                             ->from($table)
128 128
                             ->where(
129
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
129
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
130 130
                                 Helper::whereExpression($table)
131 131
                             )
132 132
                             ->setMaxResults(1)
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
                     ) {
149 149
                         // Get current configuration.
150 150
                         $result = $queryBuilder
151
-                            ->select($table . '.index_autocomplete AS index_autocomplete')
151
+                            ->select($table.'.index_autocomplete AS index_autocomplete')
152 152
                             ->from($table)
153 153
                             ->where(
154
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
154
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
155 155
                                 Helper::whereExpression($table)
156 156
                             )
157 157
                             ->setMaxResults(1)
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
                                 if ($solr->ready) {
230 230
                                     // Delete Solr document.
231 231
                                     $updateQuery = $solr->service->createUpdate();
232
-                                    $updateQuery->addDeleteQuery('uid:' . $id);
232
+                                    $updateQuery->addDeleteQuery('uid:'.$id);
233 233
                                     $updateQuery->addCommit();
234 234
                                     $solr->service->update($updateQuery);
235 235
                                 }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                                 if ($doc->ready) {
240 240
                                     Indexer::add($doc, $resArray['core']);
241 241
                                 } else {
242
-                                    $this->logger->error('Failed to re-index document with UID ' . $id);
242
+                                    $this->logger->error('Failed to re-index document with UID '.$id);
243 243
                                 }
244 244
                             }
245 245
                         }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
                         if ($solr->ready) {
310 310
                             // Delete Solr document.
311 311
                             $updateQuery = $solr->service->createUpdate();
312
-                            $updateQuery->addDeleteQuery('uid:' . $id);
312
+                            $updateQuery->addDeleteQuery('uid:'.$id);
313 313
                             $updateQuery->addCommit();
314 314
                             $solr->service->update($updateQuery);
315 315
                             if ($command == 'delete') {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                         if ($doc->ready) {
323 323
                             Indexer::add($doc, $resArray['core']);
324 324
                         } else {
325
-                            $this->logger->error('Failed to re-index document with UID ' . $id);
325
+                            $this->logger->error('Failed to re-index document with UID '.$id);
326 326
                         }
327 327
                         break;
328 328
                 }
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                             // Nothing to do here.
377 377
                         }
378 378
                     }
379
-                    $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr');
379
+                    $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr');
380 380
                 }
381 381
             }
382 382
         }
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
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
     {
63 63
         return new ExpressionFunction(
64 64
             'getDocumentType',
65
-            function () {
65
+            function() {
66 66
                 // Not implemented, we only use the evaluator
67 67
             },
68
-            function ($arguments, $cPid) {
68
+            function($arguments, $cPid) {
69 69
                 /** @var RequestWrapper $requestWrapper */
70 70
                 $requestWrapper = $arguments['request'];
71 71
                 $queryParams = $requestWrapper->getQueryParams();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             if ($doc->ready) {
112 112
                 return $doc;
113 113
             } else {
114
-                $this->logger->warning('Failed to load document with UID ' . $piVars['id']);
114
+                $this->logger->warning('Failed to load document with UID '.$piVars['id']);
115 115
             }
116 116
         } elseif (!empty($piVars['recordId'])) {
117 117
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 // Try to load document.
133 133
                 return $this->loadDocument(['id' => $resArray['uid']]);
134 134
             } else {
135
-                $this->logger->warning('Failed to load document with record ID "' . $piVars['recordId'] . '"');
135
+                $this->logger->warning('Failed to load document with record ID "'.$piVars['recordId'].'"');
136 136
             }
137 137
         }
138 138
     }
Please login to merge, or discard this patch.
Classes/Plugin/Tools/ImageDownloadTool.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,13 +114,13 @@
 block discarded – undo
114 114
                     'parameter' => $image['url'],
115 115
                     'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
116 116
                     'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
117
-                    'title' => $label . $mimetypeLabel,
117
+                    'title' => $label.$mimetypeLabel,
118 118
                     'additionalParams' => '',
119 119
                 ];
120
-                $imageLink = $this->cObj->typoLink($label . $mimetypeLabel, $linkConf);
120
+                $imageLink = $this->cObj->typoLink($label.$mimetypeLabel, $linkConf);
121 121
                 break;
122 122
             } else {
123
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
123
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
124 124
             }
125 125
         }
126 126
         return $imageLink;
Please login to merge, or discard this patch.
Classes/Plugin/Tools/PdfDownloadTool.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             empty($page1Link)
116 116
             && empty($page2Link)
117 117
         ) {
118
-            $this->logger->warning('File not found in fileGrps "' . $this->conf['fileGrpDownload'] . '"');
118
+            $this->logger->warning('File not found in fileGrps "'.$this->conf['fileGrpDownload'].'"');
119 119
         }
120 120
         // Wrap URLs with HTML.
121 121
         $linkConf = [
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             $linkConf['title'] = $this->pi_getLL('rightPage', '');
138 138
             $page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''), $linkConf);
139 139
         }
140
-        return $page1Link . $page2Link;
140
+        return $page1Link.$page2Link;
141 141
     }
142 142
 
143 143
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             ];
175 175
             $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), $linkConf);
176 176
         } else {
177
-            $this->logger->warning('File not found in fileGrp "' . $this->conf['fileGrpDownload'] . '"');
177
+            $this->logger->warning('File not found in fileGrp "'.$this->conf['fileGrpDownload'].'"');
178 178
         }
179 179
         return $workLink;
180 180
     }
Please login to merge, or discard this patch.
Classes/Plugin/Calendar.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 $_day = date('j', $dateTimestamp);
158 158
                 $calendarIssuesByYear[$_year][$_month][$_day][] = $issue;
159 159
             } else {
160
-                $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication');
160
+                $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication');
161 161
             }
162 162
         }
163 163
         // Sort by years.
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             'parameter' => $GLOBALS['TSFE']->id,
207 207
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
208 208
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
209
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid),
209
+            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid),
210 210
         ];
211 211
         $linkTitleData = $this->doc->getTitledata();
212 212
         $linkTitle = !empty($linkTitleData['mets_orderlabel'][0]) ? $linkTitleData['mets_orderlabel'][0] : $linkTitleData['mets_label'][0];
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
             'parameter' => $GLOBALS['TSFE']->id,
218 218
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
219 219
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
220
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId),
220
+            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId),
221 221
         ];
222
-        $allYearsLink = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('allYears', '')) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf);
222
+        $allYearsLink = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('allYears', '')).' '.$this->doc->getTitle($this->doc->parentId), $linkConf);
223 223
         // Fill marker array.
224 224
         $markerArray = [
225 225
             '###CALENDARVIEWACTIVE###' => count($this->allIssues) > 5 ? 'active' : '',
@@ -260,19 +260,19 @@  discard block
 block discarded – undo
260 260
                 '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')),
261 261
                 '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')),
262 262
                 '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')),
263
-                '###MONTHNAME###'  => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year,
264
-                '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">' . $year . '</div>' : ''
263
+                '###MONTHNAME###'  => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year,
264
+                '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">'.$year.'</div>' : ''
265 265
             ];
266 266
             // Fill the month markers.
267 267
             $subPartContentMonth = $this->templateService->substituteMarkerArray($subParts['month'], $markerArray);
268 268
             // Reset week content of new month.
269 269
             $subPartContentWeek = '';
270
-            $firstOfMonth = strtotime($year . '-' . $i . '-1');
270
+            $firstOfMonth = strtotime($year.'-'.$i.'-1');
271 271
             $lastOfMonth = strtotime('last day of', ($firstOfMonth));
272 272
             $firstOfMonthStart = strtotime('last Monday', $firstOfMonth);
273 273
             // There are never more than 6 weeks in a month.
274 274
             for ($j = 0; $j <= 5; $j++) {
275
-                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart);
275
+                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart);
276 276
                 $weekArray = [
277 277
                     '###DAYMON###' => '&nbsp;',
278 278
                     '###DAYTUE###' => '&nbsp;',
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                 ];
285 285
                 // Every week has seven days. ;-)
286 286
                 for ($k = 0; $k <= 6; $k++) {
287
-                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek);
287
+                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek);
288 288
                     if (
289 289
                         $currentDayTime >= $firstOfMonth
290 290
                         && $currentDayTime <= $lastOfMonth
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                                             'parameter' => $this->conf['targetPid'],
305 305
                                             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
306 306
                                             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
307
-                                            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']),
307
+                                            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']),
308 308
                                             'ATagParams' => ' class="title"',
309 309
                                         ];
310 310
                                         $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf);
@@ -316,13 +316,13 @@  discard block
 block discarded – undo
316 316
                             if (!empty($dayLinksText)) {
317 317
                                 $dayLinksList = '<ul>';
318 318
                                 foreach ($dayLinksText as $link) {
319
-                                    $dayLinksList .= '<li>' . $link . '</li>';
319
+                                    $dayLinksList .= '<li>'.$link.'</li>';
320 320
                                 }
321 321
                                 $dayLinksList .= '</ul>';
322 322
                             }
323
-                            $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>';
323
+                            $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>';
324 324
                         }
325
-                        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) {
325
+                        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) {
326 326
                             case '0':
327 327
                                 $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime);
328 328
                                 break;
@@ -418,8 +418,8 @@  discard block
 block discarded – undo
418 418
                     'parameter' => $GLOBALS['TSFE']->id,
419 419
                     'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
420 420
                     'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
421
-                    'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']),
422
-                    'title' => $titleAnchor . ': ' . $year['title']
421
+                    'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']),
422
+                    'title' => $titleAnchor.': '.$year['title']
423 423
                 ];
424 424
                 $yearArray = [
425 425
                     '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf),
@@ -433,9 +433,9 @@  discard block
 block discarded – undo
433 433
             'parameter' => $GLOBALS['TSFE']->id,
434 434
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
435 435
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
436
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid,
436
+            'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid,
437 437
         ];
438
-        $allYearsLink = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('allYears', '')) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf);
438
+        $allYearsLink = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('allYears', '')).' '.$this->doc->getTitle($this->doc->uid), $linkConf);
439 439
         // Fill markers.
440 440
         $markerArray = [
441 441
             '###LABEL_CHOOSE_YEAR###' => htmlspecialchars($this->pi_getLL('label.please_choose_year')),
Please login to merge, or discard this patch.
Classes/Plugin/Collection.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -175,12 +175,12 @@  discard block
 block discarded – undo
175 175
         foreach ($collections as $collection) {
176 176
             $solr_query = '';
177 177
             if ($collection['index_query'] != '') {
178
-                $solr_query .= '(' . $collection['index_query'] . ')';
178
+                $solr_query .= '('.$collection['index_query'].')';
179 179
             } else {
180
-                $solr_query .= 'collection:("' . $collection['index_name'] . '")';
180
+                $solr_query .= 'collection:("'.$collection['index_name'].'")';
181 181
             }
182
-            $partOfNothing = $solr->search_raw($solr_query . ' AND partof:0 AND toplevel:true', $params);
183
-            $partOfSomething = $solr->search_raw($solr_query . ' AND NOT partof:0 AND toplevel:true', $params);
182
+            $partOfNothing = $solr->search_raw($solr_query.' AND partof:0 AND toplevel:true', $params);
183
+            $partOfSomething = $solr->search_raw($solr_query.' AND NOT partof:0 AND toplevel:true', $params);
184 184
             // Titles are all documents that are "root" elements i.e. partof == 0
185 185
             $collection['titles'] = [];
186 186
             foreach ($partOfNothing as $doc) {
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
             $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($collection['label']), $conf);
219 219
             // Add feed link if applicable.
220 220
             if (!empty($this->conf['targetFeed'])) {
221
-                $img = '<img src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Icons/txdlffeeds.png" alt="' . htmlspecialchars($this->pi_getLL('feedAlt', '')) . '" title="' . htmlspecialchars($this->pi_getLL('feedTitle', '')) . '" />';
221
+                $img = '<img src="'.\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Icons/txdlffeeds.png" alt="'.htmlspecialchars($this->pi_getLL('feedAlt', '')).'" title="'.htmlspecialchars($this->pi_getLL('feedTitle', '')).'" />';
222 222
                 $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], false, $this->conf['targetFeed']);
223 223
             } else {
224 224
                 $markerArray[$_key]['###FEED###'] = '';
225 225
             }
226 226
             // Add thumbnail.
227 227
             if (!empty($collection['thumbnail'])) {
228
-                $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="' . htmlspecialchars($collection['label']) . '" src="' . $collection['thumbnail'] . '" />';
228
+                $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="'.htmlspecialchars($collection['label']).'" src="'.$collection['thumbnail'].'" />';
229 229
             } else {
230 230
                 $markerArray[$_key]['###THUMBNAIL###'] = '';
231 231
             }
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
             $markerArray[$_key]['###DESCRIPTION###'] = $this->pi_RTEcssText($collection['description']);
234 234
             // Build statistic's output.
235 235
             $labelTitles = $this->pi_getLL((count($collection['titles']) > 1 ? 'titles' : 'title'), '');
236
-            $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']) . $labelTitles);
236
+            $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']).$labelTitles);
237 237
             $labelVolumes = $this->pi_getLL((count($collection['volumes']) > 1 ? 'volumes' : 'volume'), '');
238
-            $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']) . $labelVolumes);
238
+            $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']).$labelVolumes);
239 239
         }
240 240
         // Randomize sorting?
241 241
         if (!empty($this->conf['randomize'])) {
@@ -319,14 +319,14 @@  discard block
 block discarded – undo
319 319
                 $collectionData = $resArray;
320 320
             }
321 321
         } else {
322
-            $this->logger->warning('No collection with UID ' . $id . ' found.');
322
+            $this->logger->warning('No collection with UID '.$id.' found.');
323 323
             return;
324 324
         }
325 325
         // Fetch corresponding document UIDs from Solr.
326 326
         if ($collectionData['index_search'] != '') {
327
-            $solr_query = '(' . $collectionData['index_search'] . ')';
327
+            $solr_query = '('.$collectionData['index_search'].')';
328 328
         } else {
329
-            $solr_query = 'collection:("' . $collectionData['index_name'] . '") AND toplevel:true';
329
+            $solr_query = 'collection:("'.$collectionData['index_name'].'") AND toplevel:true';
330 330
         }
331 331
         $solr = Solr::getInstance($this->conf['solrcore']);
332 332
         if (!$solr->ready) {
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
                         'source' => 'collection',
376 376
                         'select' => $id,
377 377
                         'userid' => $collectionData['userid'],
378
-                        'params' => ['filterquery' => [['query' => 'collection_faceting:("' . $collectionData['index_name'] . '")']]],
378
+                        'params' => ['filterquery' => [['query' => 'collection_faceting:("'.$collectionData['index_name'].'")']]],
379 379
                         'core' => '',
380 380
                         'pid' => $this->conf['pages'],
381 381
                         'order' => 'title',
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
                 ];
405 405
             } else {
406 406
                 // volume_sorting should be always set - but it's not a required field. We append the uid to the array key to make it always unique.
407
-                $subparts[$resArray['partof']][$resArray['volume_sorting'] . str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
407
+                $subparts[$resArray['partof']][$resArray['volume_sorting'].str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
408 408
                     'u' => $resArray['uid'],
409 409
                     'h' => '',
410 410
                     's' => $sorting,
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
440 440
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http']
441 441
         ];
442
-        header('Location: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
442
+        header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
443 443
         exit;
444 444
     }
445 445
 }
Please login to merge, or discard this patch.
Classes/Plugin/Metadata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             array_unshift($metadata, $data);
131 131
         }
132 132
         if (empty($metadata)) {
133
-            $this->logger->warning('No metadata found for document with UID ' . $this->doc->uid);
133
+            $this->logger->warning('No metadata found for document with UID '.$this->doc->uid);
134 134
             return $content;
135 135
         }
136 136
         ksort($metadata);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             $iiifLink['value.']['wrap'] = '<dd>|</dd>';
185 185
             foreach ($metadataArray as $metadata) {
186 186
                 foreach ($metadata as $key => $group) {
187
-                    $markerArray['###METADATA###'] = '<span class="tx-dlf-metadata-group">' . $this->pi_getLL($key) . '</span>';
187
+                    $markerArray['###METADATA###'] = '<span class="tx-dlf-metadata-group">'.$this->pi_getLL($key).'</span>';
188 188
                     // Reset content object's data array.
189 189
                     $this->cObj->data = $cObjData;
190 190
                     if (!is_array($group)) {
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
                             if (empty($value) && $this->conf['getTitle'] && $this->doc->parentId) {
303 303
                                 $superiorTitle = Document::getTitle($this->doc->parentId, true);
304 304
                                 if (!empty($superiorTitle)) {
305
-                                    $value = '[' . $superiorTitle . ']';
305
+                                    $value = '['.$superiorTitle.']';
306 306
                                 }
307 307
                             }
308 308
                             if (!empty($value)) {
Please login to merge, or discard this patch.
Classes/Plugin/OaiPmh.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             ->delete('tx_dlf_tokens')
88 88
             ->where(
89 89
                 $queryBuilder->expr()->eq('tx_dlf_tokens.ident', $queryBuilder->createNamedParameter('oai')),
90
-                $queryBuilder->expr()->lt('tx_dlf_tokens.tstamp', $queryBuilder->createNamedParameter((int)($GLOBALS['EXEC_TIME'] - $this->conf['expired'])))
90
+                $queryBuilder->expr()->lt('tx_dlf_tokens.tstamp', $queryBuilder->createNamedParameter((int) ($GLOBALS['EXEC_TIME'] - $this->conf['expired'])))
91 91
             )
92 92
             ->execute();
93 93
 
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
158 158
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
159 159
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
160
-        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']);
160
+        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']);
161 161
         $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8')));
162 162
         if (!empty($metadata['purl'])) {
163 163
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['purl'], ENT_NOQUOTES, 'UTF-8')));
164 164
         }
165 165
         if (!empty($metadata['prod_id'])) {
166
-            $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:' . htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8')));
166
+            $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:'.htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8')));
167 167
         }
168 168
         if (!empty($metadata['urn'])) {
169 169
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['urn'], ENT_NOQUOTES, 'UTF-8')));
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         }
261 261
         // Add attributes and build XML tree.
262 262
         $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
263
-        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']);
263
+        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']);
264 264
         // Do we update an URN or register a new one?
265 265
         if ($metadata['tstamp'] == $metadata['crdate']) {
266 266
             $update->setAttribute('type', 'urn_new');
@@ -307,10 +307,10 @@  discard block
 block discarded – undo
307 307
                 // Import node into \DOMDocument.
308 308
                 $mets = $this->oai->importNode($root->item(0), true);
309 309
             } else {
310
-                $this->logger->error('No METS part found in document with location "' . $metadata['location'] . '"');
310
+                $this->logger->error('No METS part found in document with location "'.$metadata['location'].'"');
311 311
             }
312 312
         } else {
313
-            $this->logger->error('Could not load XML file from "' . $metadata['location'] . '"');
313
+            $this->logger->error('Could not load XML file from "'.$metadata['location'].'"');
314 314
         }
315 315
         if ($mets === null) {
316 316
             $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!'), ENT_NOQUOTES, 'UTF-8'));
@@ -346,15 +346,15 @@  discard block
 block discarded – undo
346 346
             if (strpos($this->conf['stylesheet'], 'EXT:') === 0) {
347 347
                 [$extKey, $filePath] = explode('/', substr($this->conf['stylesheet'], 4), 2);
348 348
                 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
349
-                    $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extKey)) . $filePath;
349
+                    $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extKey)).$filePath;
350 350
                 }
351 351
             }
352 352
             $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->conf['stylesheet']);
353 353
         } else {
354 354
             // Use default stylesheet if no custom stylesheet is given.
355
-            $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Stylesheets/OaiPmh.xsl');
355
+            $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Stylesheets/OaiPmh.xsl');
356 356
         }
357
-        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"'));
357
+        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"'));
358 358
         // Create root element.
359 359
         $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH');
360 360
         $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -405,10 +405,10 @@  discard block
 block discarded – undo
405 405
         // Send headers.
406 406
         header('HTTP/1.1 200 OK');
407 407
         header('Cache-Control: no-cache');
408
-        header('Content-Length: ' . strlen($content));
408
+        header('Content-Length: '.strlen($content));
409 409
         header('Content-Type: text/xml; charset=utf-8');
410
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
411
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
410
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
411
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
412 412
         echo $content;
413 413
         exit;
414 414
     }
@@ -469,16 +469,16 @@  discard block
 block discarded – undo
469 469
 
470 470
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tx_dlf_documents');
471 471
 
472
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
473
-            'FROM `tx_dlf_documents` ' .
474
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
475
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
476
-            'WHERE `tx_dlf_documents`.`record_id` = ? ' .
477
-            'AND `tx_dlf_documents`.`pid` = ? ' .
478
-            'AND `tx_dlf_collections`.`pid` = ? ' .
479
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
480
-            $where .
481
-            'AND ' . Helper::whereExpression('tx_dlf_collections');
472
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
473
+            'FROM `tx_dlf_documents` '.
474
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
475
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
476
+            'WHERE `tx_dlf_documents`.`record_id` = ? '.
477
+            'AND `tx_dlf_documents`.`pid` = ? '.
478
+            'AND `tx_dlf_collections`.`pid` = ? '.
479
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
480
+            $where.
481
+            'AND '.Helper::whereExpression('tx_dlf_collections');
482 482
 
483 483
         $values = [
484 484
             $this->piVars['identifier'],
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
             $timestamp = $resArray['tstamp'];
606 606
             $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp);
607 607
         } else {
608
-            $this->logger->notice('No records found with PID ' . $this->conf['pages']);
608
+            $this->logger->notice('No records found with PID '.$this->conf['pages']);
609 609
         }
610 610
         $linkConf = [
611 611
             'parameter' => $GLOBALS['TSFE']->id,
@@ -866,9 +866,9 @@  discard block
 block discarded – undo
866 866
             }
867 867
             $resArray = $allResults[0];
868 868
             if ($resArray['index_query'] != "") {
869
-                $solr_query .= '(' . $resArray['index_query'] . ')';
869
+                $solr_query .= '('.$resArray['index_query'].')';
870 870
             } else {
871
-                $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"';
871
+                $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"';
872 872
             }
873 873
         } else {
874 874
             // If no set is specified we have to query for all collections
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
         }
877 877
         // Check for required fields.
878 878
         foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) {
879
-            $solr_query .= ' NOT ' . $required . ':""';
879
+            $solr_query .= ' NOT '.$required.':""';
880 880
         }
881 881
         // toplevel="true" is always required
882 882
         $solr_query .= ' AND toplevel:true';
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
                 || is_array($date_array = strptime($this->piVars['from'], '%Y-%m-%d'))
890 890
             ) {
891 891
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
892
-                $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z';
892
+                $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z';
893 893
             } else {
894 894
                 throw new \Exception('badArgument');
895 895
             }
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
                 || is_array($date_array = strptime($this->piVars['until'], '%Y-%m-%d'))
904 904
             ) {
905 905
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
906
-                $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z';
906
+                $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z';
907 907
                 if ($from != "*" && $from > $until) {
908 908
                     throw new \Exception('badArgument');
909 909
                 }
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
                 throw new \Exception('badArgument');
921 921
             }
922 922
         }
923
-        $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']';
923
+        $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']';
924 924
         $documentSet = [];
925 925
         $solr = Solr::getInstance($this->conf['solrcore']);
926 926
         if (!$solr->ready) {
@@ -957,22 +957,22 @@  discard block
 block discarded – undo
957 957
      */
958 958
     protected function generateOutputForDocumentList(DocumentList $documentListSet)
959 959
     {
960
-        $documentsToProcess = $documentListSet->removeRange(0, (int)$this->conf['limit']);
960
+        $documentsToProcess = $documentListSet->removeRange(0, (int) $this->conf['limit']);
961 961
         $verb = $this->piVars['verb'];
962 962
 
963 963
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
964 964
             ->getConnectionForTable('tx_dlf_documents');
965 965
 
966
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
967
-            'FROM `tx_dlf_documents` ' .
968
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
969
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
970
-            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) ' .
971
-            'AND `tx_dlf_documents`.`pid` = ? ' .
972
-            'AND `tx_dlf_collections`.`pid` = ? ' .
973
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
974
-            'AND ' . Helper::whereExpression('tx_dlf_collections') . ' ' .
975
-            'GROUP BY `tx_dlf_documents`.`uid` ' .
966
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
967
+            'FROM `tx_dlf_documents` '.
968
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
969
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
970
+            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) '.
971
+            'AND `tx_dlf_documents`.`pid` = ? '.
972
+            'AND `tx_dlf_collections`.`pid` = ? '.
973
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
974
+            'AND '.Helper::whereExpression('tx_dlf_collections').' '.
975
+            'GROUP BY `tx_dlf_documents`.`uid` '.
976 976
             'LIMIT ?';
977 977
 
978 978
         $values = [
Please login to merge, or discard this patch.
Classes/Plugin/Search.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         if ($result->rowCount() == 1) {
63 63
             $pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
64
-            $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/Search/Suggester.js');
64
+            $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Javascript/Search/Suggester.js');
65 65
         } else {
66 66
             $this->logger->warning('No metadata fields configured for search suggestions');
67 67
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             && $list->metadata['options']['source'] == 'collection'
84 84
         ) {
85 85
             // Get collection's UID.
86
-            return '<input type="hidden" name="' . $this->prefixId . '[collection]" value="' . $list->metadata['options']['select'] . '" />';
86
+            return '<input type="hidden" name="'.$this->prefixId.'[collection]" value="'.$list->metadata['options']['select'].'" />';
87 87
         } elseif (!empty($list->metadata['options']['params']['filterquery'])) {
88 88
             // Get collection's UID from search metadata.
89 89
             foreach ($list->metadata['options']['params']['filterquery'] as $facet) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                     $collectionId = Helper::getUidFromIndexName(trim($facetKeyVal[1], '(")'), 'tx_dlf_collections');
96 96
                 }
97 97
             }
98
-            return '<input type="hidden" name="' . $this->prefixId . '[collection]" value="' . $collectionId . '" />';
98
+            return '<input type="hidden" name="'.$this->prefixId.'[collection]" value="'.$collectionId.'" />';
99 99
         }
100 100
         return '';
101 101
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             $this->loadDocument();
120 120
             // Get document's UID
121 121
             if ($this->doc->ready) {
122
-                return '<input type="hidden" name="' . $this->prefixId . '[id]" value="' . ($this->doc->uid) . '" />';
122
+                return '<input type="hidden" name="'.$this->prefixId.'[id]" value="'.($this->doc->uid).'" />';
123 123
             }
124 124
         } elseif (!empty($list->metadata['options']['params']['filterquery'])) {
125 125
             // Get document's UID from search metadata.
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 }
135 135
             }
136 136
             if (!empty($documentId)) {
137
-                return '<input type="hidden" name="' . $this->prefixId . '[id]" value="' . $documentId . '" />';
137
+                return '<input type="hidden" name="'.$this->prefixId.'[id]" value="'.$documentId.'" />';
138 138
             }
139 139
         }
140 140
         return '';
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
         // Add encrypted fields to search form.
159 159
         if ($name !== false) {
160
-            return '<input type="hidden" name="' . $this->prefixId . '[encrypted]" value="' . $name . '" />';
160
+            return '<input type="hidden" name="'.$this->prefixId.'[encrypted]" value="'.$name.'" />';
161 161
         } else {
162 162
             return '';
163 163
         }
@@ -183,19 +183,19 @@  discard block
 block discarded – undo
183 183
         // Get operator options.
184 184
         $operatorOptions = '';
185 185
         foreach (['AND', 'OR', 'NOT'] as $operator) {
186
-            $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-' . $operator . '" value="' . $operator . '">' . htmlspecialchars($this->pi_getLL($operator, '')) . '</option>';
186
+            $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.htmlspecialchars($this->pi_getLL($operator, '')).'</option>';
187 187
         }
188 188
         // Get field selector options.
189 189
         $fieldSelectorOptions = '';
190 190
         $searchFields = GeneralUtility::trimExplode(',', $this->conf['extendedFields'], true);
191 191
         foreach ($searchFields as $searchField) {
192
-            $fieldSelectorOptions .= '<option class="tx-dlf-search-field-option tx-dlf-search-field-' . $searchField . '" value="' . $searchField . '">' . Helper::translate($searchField, 'tx_dlf_metadata', $this->conf['pages']) . '</option>';
192
+            $fieldSelectorOptions .= '<option class="tx-dlf-search-field-option tx-dlf-search-field-'.$searchField.'" value="'.$searchField.'">'.Helper::translate($searchField, 'tx_dlf_metadata', $this->conf['pages']).'</option>';
193 193
         }
194 194
         for ($i = 0; $i < $this->conf['extendedSlotCount']; $i++) {
195 195
             $markerArray = [
196
-                '###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-' . $i . '" name="' . $this->prefixId . '[extOperator][' . $i . ']">' . $operatorOptions . '</select>',
197
-                '###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-' . $i . '" name="' . $this->prefixId . '[extField][' . $i . ']">' . $fieldSelectorOptions . '</select>',
198
-                '###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-' . $i . '" type="text" name="' . $this->prefixId . '[extQuery][' . $i . ']" />'
196
+                '###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-'.$i.'" name="'.$this->prefixId.'[extOperator]['.$i.']">'.$operatorOptions.'</select>',
197
+                '###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-'.$i.'" name="'.$this->prefixId.'[extField]['.$i.']">'.$fieldSelectorOptions.'</select>',
198
+                '###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-'.$i.'" type="text" name="'.$this->prefixId.'[extQuery]['.$i.']" />'
199 199
             ];
200 200
             $extendedSearch .= $this->templateService->substituteMarkerArray($this->templateService->getSubpart($this->template, '###EXT_SEARCH_ENTRY###'), $markerArray);
201 201
         }
@@ -223,12 +223,12 @@  discard block
 block discarded – undo
223 223
         // Get facets from plugin configuration.
224 224
         $facets = [];
225 225
         foreach (GeneralUtility::trimExplode(',', $this->conf['facets'], true) as $facet) {
226
-            $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->conf['pages']);
226
+            $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->conf['pages']);
227 227
         }
228 228
         // Render facets menu.
229 229
         $TSconfig = [];
230 230
         $TSconfig['special'] = 'userfunction';
231
-        $TSconfig['special.']['userFunc'] = \Kitodo\Dlf\Plugin\Search::class . '->makeFacetsMenuArray';
231
+        $TSconfig['special.']['userFunc'] = \Kitodo\Dlf\Plugin\Search::class.'->makeFacetsMenuArray';
232 232
         $TSconfig['special.']['facets'] = $facets;
233 233
         $TSconfig['special.']['limit'] = max(intval($this->conf['limitFacets']), 1);
234 234
         $TSconfig = Helper::mergeRecursiveWithOverrule($this->conf['facetsConf.'], $TSconfig);
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
         $output = '';
250 250
         // Check for plugin configuration.
251 251
         if (!empty($this->conf['fulltext'])) {
252
-            $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="' . $this->prefixId . '[fulltext]" value="0" ' . ($isFulltextSearch == 0 ? 'checked="checked"' : '') . ' />';
253
-            $output .= ' <label for="tx-dlf-search-fulltext-no">' . htmlspecialchars($this->pi_getLL('label.inMetadata', '')) . '</label>';
254
-            $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="' . $this->prefixId . '[fulltext]" value="1" ' . ($isFulltextSearch == 1 ? 'checked="checked"' : '') . '/>';
255
-            $output .= ' <label for="tx-dlf-search-fulltext-yes">' . htmlspecialchars($this->pi_getLL('label.inFulltext', '')) . '</label>';
252
+            $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="'.$this->prefixId.'[fulltext]" value="0" '.($isFulltextSearch == 0 ? 'checked="checked"' : '').' />';
253
+            $output .= ' <label for="tx-dlf-search-fulltext-no">'.htmlspecialchars($this->pi_getLL('label.inMetadata', '')).'</label>';
254
+            $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="'.$this->prefixId.'[fulltext]" value="1" '.($isFulltextSearch == 1 ? 'checked="checked"' : '').'/>';
255
+            $output .= ' <label for="tx-dlf-search-fulltext-yes">'.htmlspecialchars($this->pi_getLL('label.inFulltext', '')).'</label>';
256 256
         }
257 257
         return $output;
258 258
     }
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
         $output = '';
270 270
         // Check for plugin configuration.
271 271
         if (!empty($this->conf['showLogicalPageField'])) {
272
-            $output .= ' <label for="tx-dlf-search-logical-page">' . htmlspecialchars($this->pi_getLL('label.logicalPage', '')) . ': </label>';
273
-            $output .= ' <input class="tx-dlf-search-logical-page" id="tx-dlf-search-logical-page" type="text" name="' . $this->prefixId . '[logicalPage]" />';
272
+            $output .= ' <label for="tx-dlf-search-logical-page">'.htmlspecialchars($this->pi_getLL('label.logicalPage', '')).': </label>';
273
+            $output .= ' <input class="tx-dlf-search-logical-page" id="tx-dlf-search-logical-page" type="text" name="'.$this->prefixId.'[logicalPage]" />';
274 274
         }
275 275
         return $output;
276 276
     }
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         $entryArray['doNotLinkIt'] = 0;
312 312
         // Check if facet is already selected.
313 313
         $queryColumn = array_column($search['params']['filterquery'], 'query');
314
-        $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn);
314
+        $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn);
315 315
         if ($index !== false) {
316 316
             // Facet is selected, thus remove it from filter.
317 317
             unset($queryColumn[$index]);
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             }
329 329
         } else {
330 330
             // Facet is not selected, thus add it to filter.
331
-            $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")';
331
+            $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")';
332 332
             $entryArray['ITEM_STATE'] = 'NO';
333 333
         }
334 334
         $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(['query' => $search['query'], 'fq' => $queryColumn]);
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
                 '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf),
385 385
                 '###LABEL_QUERY###' => (!empty($search['query']) ? htmlspecialchars($search['query']) : htmlspecialchars($this->pi_getLL('label.query'))),
386 386
                 '###LABEL_SUBMIT###' => htmlspecialchars($this->pi_getLL('label.submit')),
387
-                '###FIELD_QUERY###' => $this->prefixId . '[query]',
387
+                '###FIELD_QUERY###' => $this->prefixId.'[query]',
388 388
                 '###QUERY###' => (!empty($search['query']) ? htmlspecialchars($search['query']) : ''),
389 389
                 '###FULLTEXTSWITCH###' => $this->addFulltextSwitch($list->metadata['fulltextSearch']),
390 390
                 '###FIELD_DOC###' => ($this->conf['searchIn'] == 'document' || $this->conf['searchIn'] == 'all' ? $this->addCurrentDocument() : ''),
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
                 $this->piVars['query'] = empty($matches[1]) ? $this->piVars['query'] : $matches[1];
417 417
                 // Search in fulltext field if applicable. Query must not be empty!
418 418
                 if (!empty($this->piVars['query'])) {
419
-                    $query = 'fulltext:(' . Solr::escapeQuery(trim($this->piVars['query'])) . ')';
419
+                    $query = 'fulltext:('.Solr::escapeQuery(trim($this->piVars['query'])).')';
420 420
                 }
421 421
             } else {
422 422
                 // Retain given search field if valid.
@@ -437,9 +437,9 @@  discard block
 block discarded – undo
437 437
                             && in_array($this->piVars['extField'][$i], $allowedFields)
438 438
                         ) {
439 439
                             if (!empty($query)) {
440
-                                $query .= ' ' . $this->piVars['extOperator'][$i] . ' ';
440
+                                $query .= ' '.$this->piVars['extOperator'][$i].' ';
441 441
                             }
442
-                            $query .= Indexer::getIndexFieldName($this->piVars['extField'][$i], $this->conf['pages']) . ':(' . Solr::escapeQuery($this->piVars['extQuery'][$i]) . ')';
442
+                            $query .= Indexer::getIndexFieldName($this->piVars['extField'][$i], $this->conf['pages']).':('.Solr::escapeQuery($this->piVars['extQuery'][$i]).')';
443 443
                         }
444 444
                     }
445 445
                 }
@@ -460,9 +460,9 @@  discard block
 block discarded – undo
460 460
                     && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->piVars['id'])
461 461
                 ) {
462 462
                     // Search in document and all subordinates (valid for up to three levels of hierarchy).
463
-                    $params['filterquery'][]['query'] = '_query_:"{!join from=uid to=partof}uid:{!join from=uid to=partof}uid:' . $this->piVars['id'] . '"' .
464
-                        ' OR {!join from=uid to=partof}uid:' . $this->piVars['id'] .
465
-                        ' OR uid:' . $this->piVars['id'];
463
+                    $params['filterquery'][]['query'] = '_query_:"{!join from=uid to=partof}uid:{!join from=uid to=partof}uid:'.$this->piVars['id'].'"'.
464
+                        ' OR {!join from=uid to=partof}uid:'.$this->piVars['id'].
465
+                        ' OR uid:'.$this->piVars['id'];
466 466
                     $label .= htmlspecialchars(sprintf($this->pi_getLL('in', ''), Document::getTitle($this->piVars['id'])));
467 467
                 }
468 468
             }
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
                     && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->piVars['collection'])
477 477
                 ) {
478 478
                     $index_name = Helper::getIndexNameFromUid($this->piVars['collection'], 'tx_dlf_collections', $this->conf['pages']);
479
-                    $params['filterquery'][]['query'] = 'collection_faceting:("' . Solr::escapeQuery($index_name) . '")';
479
+                    $params['filterquery'][]['query'] = 'collection_faceting:("'.Solr::escapeQuery($index_name).'")';
480 480
                     $label .= sprintf($this->pi_getLL('in', '', true), Helper::translate($index_name, 'tx_dlf_collections', $this->conf['pages']));
481 481
                 }
482 482
             }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
                     $collIndexNames[] = Solr::escapeQuery(Helper::getIndexNameFromUid(intval($collId), 'tx_dlf_collections', $this->conf['pages']));
489 489
                 }
490 490
                 // Last value is fake and used for distinction in $this->addCurrentCollection()
491
-                $params['filterquery'][]['query'] = 'collection_faceting:("' . implode('" OR "', $collIndexNames) . '" OR "FakeValueForDistinction")';
491
+                $params['filterquery'][]['query'] = 'collection_faceting:("'.implode('" OR "', $collIndexNames).'" OR "FakeValueForDistinction")';
492 492
             }
493 493
             // Set some query parameters.
494 494
             $params['query'] = !empty($query) ? $query : '*';
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
             $linkConf['forceAbsoluteUrl.']['scheme'] = !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http';
539 539
             $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false);
540 540
             // Send headers.
541
-            header('Location: ' . GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
541
+            header('Location: '.GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
542 542
             exit;
543 543
         }
544 544
     }
Please login to merge, or discard this patch.