Passed
Pull Request — master (#91)
by Alexander
02:40
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/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/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/Common/MetsDocument.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $fileMimeType = $this->getFileMimeType($id);
170 170
         $fileLocation = $this->getFileLocation($id);
171 171
         if ($fileMimeType === 'application/vnd.kitodo.iiif') {
172
-            $fileLocation = (strrpos($fileLocation, 'info.json') === strlen($fileLocation) - 9) ? $fileLocation : (strrpos($fileLocation, '/') === strlen($fileLocation) ? $fileLocation . 'info.json' : $fileLocation . '/info.json');
172
+            $fileLocation = (strrpos($fileLocation, 'info.json') === strlen($fileLocation) - 9) ? $fileLocation : (strrpos($fileLocation, '/') === strlen($fileLocation) ? $fileLocation.'info.json' : $fileLocation.'/info.json');
173 173
             $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
174 174
             IiifHelper::setUrlReader(IiifUrlReader::getInstance());
175 175
             IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
                 return $service->getImageUrl();
180 180
             }
181 181
         } elseif ($fileMimeType === 'application/vnd.netfpx') {
182
-            $baseURL = $fileLocation . (strpos($fileLocation, '?') === false ? '?' : '');
182
+            $baseURL = $fileLocation.(strpos($fileLocation, '?') === false ? '?' : '');
183 183
             // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server'
184
-            return $baseURL . '&CVT=jpeg';
184
+            return $baseURL.'&CVT=jpeg';
185 185
         }
186 186
         return $fileLocation;
187 187
     }
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function getFileLocation($id)
194 194
     {
195
-        $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]');
195
+        $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]');
196 196
         if (
197 197
             !empty($id)
198 198
             && !empty($location)
199 199
         ) {
200 200
             return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href;
201 201
         } else {
202
-            $this->logger->warning('There is no file node with @ID "' . $id . '"');
202
+            $this->logger->warning('There is no file node with @ID "'.$id.'"');
203 203
             return '';
204 204
         }
205 205
     }
@@ -210,14 +210,14 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function getFileMimeType($id)
212 212
     {
213
-        $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE');
213
+        $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE');
214 214
         if (
215 215
             !empty($id)
216 216
             && !empty($mimetype)
217 217
         ) {
218 218
             return (string) $mimetype[0];
219 219
         } else {
220
-            $this->logger->warning('There is no file node with @ID "' . $id . '" or no MIME type specified');
220
+            $this->logger->warning('There is no file node with @ID "'.$id.'" or no MIME type specified');
221 221
             return '';
222 222
         }
223 223
     }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             return $this->logicalUnits[$id];
239 239
         } elseif (!empty($id)) {
240 240
             // Get specified logical unit.
241
-            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]');
241
+            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]');
242 242
         } else {
243 243
             // Get all logical units at top level.
244 244
             $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div');
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
             // Retain current PID.
379 379
             $cPid = ($this->cPid ? $this->cPid : $this->pid);
380 380
         } elseif (!$cPid) {
381
-            $this->logger->warning('Invalid PID ' . $cPid . ' for metadata definitions');
381
+            $this->logger->warning('Invalid PID '.$cPid.' for metadata definitions');
382 382
             return [];
383 383
         }
384 384
         // Get metadata from parsed metadata array if available.
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         if (!empty($this->logicalUnits[$id])) {
420 420
             $dmdIds = $this->logicalUnits[$id]['dmdId'];
421 421
         } else {
422
-            $dmdIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@DMDID');
422
+            $dmdIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@DMDID');
423 423
             $dmdIds = (string) $dmdIds[0];
424 424
         }
425 425
         if (!empty($dmdIds)) {
@@ -445,11 +445,11 @@  discard block
 block discarded – undo
445 445
                     ) {
446 446
                         $obj->extractMetadata($this->dmdSec[$dmdId]['xml'], $metadata);
447 447
                     } else {
448
-                        $this->logger->warning('Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->dmdSec[$dmdId]['type'] . '"');
448
+                        $this->logger->warning('Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->dmdSec[$dmdId]['type'].'"');
449 449
                     }
450 450
                 }
451 451
             } else {
452
-                $this->logger->notice('Unsupported metadata format "' . $this->dmdSec[$dmdId]['type'] . '" in dmdSec with @ID "' . $dmdId . '"');
452
+                $this->logger->notice('Unsupported metadata format "'.$this->dmdSec[$dmdId]['type'].'" in dmdSec with @ID "'.$dmdId.'"');
453 453
                 // Continue searching for supported metadata with next @DMDID.
454 454
                 continue;
455 455
             }
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
             if (!empty($this->logicalUnits[$id])) {
458 458
                 $metadata['type'] = [$this->logicalUnits[$id]['type']];
459 459
             } else {
460
-                $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE');
460
+                $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE');
461 461
                 if (!empty($struct)) {
462 462
                     $metadata['type'] = [(string) $struct[0]];
463 463
                 }
@@ -574,13 +574,13 @@  discard block
 block discarded – undo
574 574
                             $values instanceof \DOMNodeList
575 575
                             && $values->length > 0
576 576
                         ) {
577
-                            $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue);
577
+                            $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue);
578 578
                         } elseif (!($values instanceof \DOMNodeList)) {
579
-                            $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values);
579
+                            $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values);
580 580
                         }
581 581
                     }
582
-                    if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) {
583
-                        $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0];
582
+                    if (empty($metadata[$resArray['index_name'].'_sorting'][0])) {
583
+                        $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];
584 584
                     }
585 585
                 }
586 586
             }
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
         if ($hasSupportedMetadata) {
643 643
             return $metadata;
644 644
         } else {
645
-            $this->logger->warning('No supported metadata found for logical structure with @ID "' . $id . '"');
645
+            $this->logger->warning('No supported metadata found for logical structure with @ID "'.$id.'"');
646 646
             return [];
647 647
         }
648 648
     }
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
      */
673 673
     public function getStructureDepth($logId)
674 674
     {
675
-        $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*');
675
+        $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*');
676 676
         if (!empty($ancestors)) {
677 677
             return count($ancestors);
678 678
         } else {
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
             // Register namespaces.
695 695
             $this->registerNamespaces($this->mets);
696 696
         } else {
697
-            $this->logger->error('No METS part found in document with UID ' . $this->uid);
697
+            $this->logger->error('No METS part found in document with UID '.$this->uid);
698 698
         }
699 699
     }
700 700
 
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
                 return true;
723 723
             }
724 724
         }
725
-        $this->logger->error('Could not load XML file from "' . $location . '"');
725
+        $this->logger->error('Could not load XML file from "'.$location.'"');
726 726
         return false;
727 727
     }
728 728
 
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
     {
747 747
         $partof = 0;
748 748
         // Get the closest ancestor of the current document which has a MPTR child.
749
-        $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $this->_getToplevelId() . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
749
+        $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->_getToplevelId().'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
750 750
         if (!empty($parentMptr)) {
751 751
             $parentLocation = (string) $parentMptr[0]->attributes('http://www.w3.org/1999/xlink')->href;
752 752
             if ($parentLocation != $this->location) {
@@ -813,15 +813,15 @@  discard block
 block discarded – undo
813 813
             $dmdIds = $this->mets->xpath('./mets:dmdSec/@ID');
814 814
             if (!empty($dmdIds)) {
815 815
                 foreach ($dmdIds as $dmdId) {
816
-                    if ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) {
816
+                    if ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) {
817 817
                         if (!empty($this->formats[(string) $type[0]])) {
818 818
                             $type = (string) $type[0];
819
-                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']);
819
+                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']);
820 820
                         }
821
-                    } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) {
821
+                    } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) {
822 822
                         if (!empty($this->formats[(string) $type[0]])) {
823 823
                             $type = (string) $type[0];
824
-                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']);
824
+                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']);
825 825
                         }
826 826
                     }
827 827
                     if (!empty($xml)) {
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
             // Retain current PID.
1007 1007
             $cPid = ($this->cPid ? $this->cPid : $this->pid);
1008 1008
             if (!$cPid) {
1009
-                $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions');
1009
+                $this->logger->error('Invalid PID '.$cPid.' for structure definitions');
1010 1010
                 $this->thumbnailLoaded = true;
1011 1011
                 return $this->thumbnail;
1012 1012
             }
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
                 if (!empty($resArray['thumbnail'])) {
1044 1044
                     $strctType = Helper::getIndexNameFromUid($resArray['thumbnail'], 'tx_dlf_structures', $cPid);
1045 1045
                     // Check if this document has a structure element of the desired type.
1046
-                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID');
1046
+                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID');
1047 1047
                     if (!empty($strctIds)) {
1048 1048
                         $strctId = (string) $strctIds[0];
1049 1049
                     }
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
                     }
1067 1067
                 }
1068 1068
             } else {
1069
-                $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database');
1069
+                $this->logger->error('No structure of type "'.$metadata['type'][0].'" found in database');
1070 1070
             }
1071 1071
             $this->thumbnailLoaded = true;
1072 1072
         }
Please login to merge, or discard this patch.
Classes/Common/IiifManifest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -694,16 +694,16 @@  discard block
 block discarded – undo
694 694
                     && ($values = $iiifResource->jsonPath($resArray['xpath_sorting']) != null)
695 695
                 ) {
696 696
                     if (is_string($values)) {
697
-                        $metadata[$resArray['index_name'] . '_sorting'][0] = [trim((string) $values)];
697
+                        $metadata[$resArray['index_name'].'_sorting'][0] = [trim((string) $values)];
698 698
                     } elseif ($values instanceof JSONPath && is_array($values->data()) && count($values->data()) > 1) {
699 699
                         $metadata[$resArray['index_name']] = [];
700 700
                         foreach ($values->data() as $value) {
701
-                            $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $value);
701
+                            $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $value);
702 702
                         }
703 703
                     }
704 704
                 }
705
-                if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) {
706
-                    $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0];
705
+                if (empty($metadata[$resArray['index_name'].'_sorting'][0])) {
706
+                    $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];
707 707
                 }
708 708
             }
709 709
         }
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
                     }
832 832
                 }
833 833
             } else {
834
-                $this->logger->warning('Invalid structure resource @id "' . $id . '"');
834
+                $this->logger->warning('Invalid structure resource @id "'.$id.'"');
835 835
                 return $rawText;
836 836
             }
837 837
             $this->rawTextArray[$id] = $rawText;
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
                 }
881 881
             }
882 882
         }
883
-        $this->logger->error('Could not load IIIF manifest from "' . $location . '"');
883
+        $this->logger->error('Could not load IIIF manifest from "'.$location.'"');
884 884
         return false;
885 885
     }
886 886
 
Please login to merge, or discard this patch.
Classes/Plugin/PageView.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
             $(document).ready(function() {
79 79
                 if (dlfUtils.exists(dlfViewer)) {
80 80
                     tx_dlf_viewer = new dlfViewer({
81
-                        controls: ["' . implode('", "', $this->controls) . '"],
82
-                        div: "' . $this->conf['elementId'] . '",
83
-                        images: ' . json_encode($this->images) . ',
84
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
85
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
86
-                        useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0) . '
81
+                        controls: ["' . implode('", "', $this->controls).'"],
82
+                        div: "' . $this->conf['elementId'].'",
83
+                        images: ' . json_encode($this->images).',
84
+                        fulltexts: ' . json_encode($this->fulltexts).',
85
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
86
+                        useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0).'
87 87
                     });
88 88
                 }
89 89
             });
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
         $markerArray = [];
106 106
         if ($this->piVars['id']) {
107 107
             if ($this->conf['crop']) {
108
-                $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="' . htmlspecialchars($this->pi_getLL('editMode', '')) . '">' . htmlspecialchars($this->pi_getLL('editMode', '')) . '</a>';
109
-                $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="' . htmlspecialchars($this->pi_getLL('editRemove', '')) . '">' . htmlspecialchars($this->pi_getLL('editRemove', '')) . '</a>';
108
+                $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="'.htmlspecialchars($this->pi_getLL('editMode', '')).'">'.htmlspecialchars($this->pi_getLL('editMode', '')).'</a>';
109
+                $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="'.htmlspecialchars($this->pi_getLL('editRemove', '')).'">'.htmlspecialchars($this->pi_getLL('editRemove', '')).'</a>';
110 110
             } else {
111 111
                 $markerArray['###EDITBUTTON###'] = '';
112 112
                 $markerArray['###EDITREMOVE###'] = '';
113 113
             }
114 114
             if ($this->conf['magnifier']) {
115
-                $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="' . htmlspecialchars($this->pi_getLL('magnifier', '')) . '">' . htmlspecialchars($this->pi_getLL('magnifier', '')) . '</a>';
115
+                $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="'.htmlspecialchars($this->pi_getLL('magnifier', '')).'">'.htmlspecialchars($this->pi_getLL('magnifier', '')).'</a>';
116 116
             } else {
117 117
                 $markerArray['###MAGNIFIER###'] = '';
118 118
             }
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
                 'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', true, false),
148 148
                 'title' => $label
149 149
             ];
150
-            $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">';
151
-            $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . htmlspecialchars($this->piVars['page']) . '">';
152
-            $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . htmlspecialchars($this->piVars['page']) . '">';
150
+            $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">';
151
+            $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.htmlspecialchars($this->piVars['page']).'">';
152
+            $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.htmlspecialchars($this->piVars['page']).'">';
153 153
             $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">';
154 154
             $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">';
155 155
             $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">';
156 156
             $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">';
157 157
             $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">';
158
-            $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>';
158
+            $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>';
159 159
             $output .= '</form>';
160 160
             $output .= '<script>';
161 161
             $output .= '$(document).ready(function() { $("#submitBasketForm").click(function() { $("#addToBasketForm").submit(); }); });';
@@ -191,18 +191,18 @@  discard block
 block discarded – undo
191 191
                         'parameter' => $GLOBALS['TSFE']->id,
192 192
                         'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
193 193
                         'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
194
-                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($image['url']),
194
+                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($image['url']),
195 195
                     ];
196 196
                     $image['url'] = $this->cObj->typoLink_URL($linkConf);
197 197
                 }
198 198
                 $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpImages]);
199 199
                 break;
200 200
             } else {
201
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
201
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
202 202
             }
203 203
         }
204 204
         if (empty($image)) {
205
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->conf['fileGrpImages'] . '"');
205
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->conf['fileGrpImages'].'"');
206 206
         }
207 207
         return $image;
208 208
     }
@@ -230,18 +230,18 @@  discard block
 block discarded – undo
230 230
                         'parameter' => $GLOBALS['TSFE']->id,
231 231
                         'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
232 232
                         'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
233
-                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($fulltext['url']),
233
+                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($fulltext['url']),
234 234
                     ];
235 235
                     $fulltext['url'] = $this->cObj->typoLink_URL($linkConf);
236 236
                 }
237 237
                 $fulltext['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpFulltext]);
238 238
                 break;
239 239
             } else {
240
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
240
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
241 241
             }
242 242
         }
243 243
         if (empty($fulltext)) {
244
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->conf['fileGrpFulltext'] . '"');
244
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->conf['fileGrpFulltext'].'"');
245 245
         }
246 246
         return $fulltext;
247 247
     }
Please login to merge, or discard this patch.
Classes/Hooks/UserFunc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
     public function displayThumbnail(&$params)
57 57
     {
58 58
         // Simulate TCA field type "passthrough".
59
-        $output = '<input type="hidden" name="' . $params['itemFormElName'] . '" value="' . $params['itemFormElValue'] . '" />';
59
+        $output = '<input type="hidden" name="'.$params['itemFormElName'].'" value="'.$params['itemFormElValue'].'" />';
60 60
         if (!empty($params['itemFormElValue'])) {
61
-            $output .= '<img alt="Thumbnail" title="' . $params['itemFormElValue'] . '" src="' . $params['itemFormElValue'] . '" />';
61
+            $output .= '<img alt="Thumbnail" title="'.$params['itemFormElValue'].'" src="'.$params['itemFormElValue'].'" />';
62 62
         }
63 63
         return $output;
64 64
     }
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,14 +114,14 @@
 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
                     'extTarget' => '_blank',
119 119
                     'additionalParams' => '',
120 120
                 ];
121
-                $imageLink = $this->cObj->typoLink($label . $mimetypeLabel, $linkConf);
121
+                $imageLink = $this->cObj->typoLink($label.$mimetypeLabel, $linkConf);
122 122
                 break;
123 123
             } else {
124
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
124
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
125 125
             }
126 126
         }
127 127
         return $imageLink;
Please login to merge, or discard this patch.