Passed
Pull Request — master (#110)
by
unknown
03:26
created
Classes/Hooks/Form/FieldInformation/SolrCoreStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                     $uptimeInSeconds = floor($response->getUptime() / 1000);
56 56
                     $dateTimeFrom = new \DateTime('@0');
57 57
                     $dateTimeTo = new \DateTime("@$uptimeInSeconds");
58
-                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a ' . Helper::getLanguageService()->getLL('flash.days') . ', %H:%I:%S');
58
+                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a '.Helper::getLanguageService()->getLL('flash.days').', %H:%I:%S');
59 59
                     $numDocuments = $response->getNumberOfDocuments();
60 60
                     $startTime = $response->getStartTime() ? strftime('%c', $response->getStartTime()->getTimestamp()) : 'N/A';
61 61
                     $lastModified = $response->getLastModified() ? strftime('%c', $response->getLastModified()->getTimestamp()) : 'N/A';
Please login to merge, or discard this patch.
Classes/Hooks/DataHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
                     ) {
140 140
                         // Get current configuration.
141 141
                         $result = $queryBuilder
142
-                            ->select($table . '.is_listed AS is_listed')
142
+                            ->select($table.'.is_listed AS is_listed')
143 143
                             ->from($table)
144 144
                             ->where(
145
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
145
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
146 146
                                 Helper::whereExpression($table)
147 147
                             )
148 148
                             ->setMaxResults(1)
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
                     ) {
165 165
                         // Get current configuration.
166 166
                         $result = $queryBuilder
167
-                            ->select($table . '.index_autocomplete AS index_autocomplete')
167
+                            ->select($table.'.index_autocomplete AS index_autocomplete')
168 168
                             ->from($table)
169 169
                             ->where(
170
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
170
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
171 171
                                 Helper::whereExpression($table)
172 172
                             )
173 173
                             ->setMaxResults(1)
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                                 if ($solr->ready) {
243 243
                                     // Delete Solr document.
244 244
                                     $updateQuery = $solr->service->createUpdate();
245
-                                    $updateQuery->addDeleteQuery('uid:' . $id);
245
+                                    $updateQuery->addDeleteQuery('uid:'.$id);
246 246
                                     $updateQuery->addCommit();
247 247
                                     $solr->service->update($updateQuery);
248 248
                                 }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                                     $document->setDoc($doc);
255 255
                                     Indexer::add($document);
256 256
                                 } else {
257
-                                    $this->logger->error('Failed to re-index document with UID ' . $id);
257
+                                    $this->logger->error('Failed to re-index document with UID '.$id);
258 258
                                 }
259 259
                             }
260 260
                         }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                         if ($solr->ready) {
322 322
                             // Delete Solr document.
323 323
                             $updateQuery = $solr->service->createUpdate();
324
-                            $updateQuery->addDeleteQuery('uid:' . $id);
324
+                            $updateQuery->addDeleteQuery('uid:'.$id);
325 325
                             $updateQuery->addCommit();
326 326
                             $solr->service->update($updateQuery);
327 327
                             if ($command == 'delete') {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                             $document->setDoc($doc);
337 337
                             Indexer::add($document);
338 338
                         } else {
339
-                            $this->logger->error('Failed to re-index document with UID ' . $id);
339
+                            $this->logger->error('Failed to re-index document with UID '.$id);
340 340
                         }
341 341
                         break;
342 342
                 }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                             // Nothing to do here.
388 388
                         }
389 389
                     }
390
-                    $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr');
390
+                    $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr');
391 391
                 }
392 392
             }
393 393
         }
Please login to merge, or discard this patch.
Classes/Hooks/ItemsProcFunc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,8 +126,8 @@
 block discarded – undo
126 126
             ->select(...explode(',', $fields))
127 127
             ->from($table)
128 128
             ->where(
129
-                $queryBuilder->expr()->eq($table . '.pid', intval($this->storagePid)),
130
-                $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]),
129
+                $queryBuilder->expr()->eq($table.'.pid', intval($this->storagePid)),
130
+                $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]),
131 131
                 $andWhere
132 132
             )
133 133
             ->orderBy($sorting)
Please login to merge, or discard this patch.
Classes/Hooks/ThumbnailCustomElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters']
23 23
         $result = $this->initializeResultArray();
24 24
         if (!empty($this->data['databaseRow']['thumbnail'])) {
25
-            $result['html'] = '<img alt="Thumbnail" title="" src="' . $this->data['databaseRow']['thumbnail'] . '" />';
25
+            $result['html'] = '<img alt="Thumbnail" title="" src="'.$this->data['databaseRow']['thumbnail'].'" />';
26 26
         } else {
27 27
             $result['html'] = '';
28 28
         }
Please login to merge, or discard this patch.
Classes/Domain/Repository/MetadataRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         // order by oai_name
49 49
         $query->setOrderings(
50
-            array('sorting' => QueryInterface::ORDER_ASCENDING)
50
+            array ('sorting' => QueryInterface::ORDER_ASCENDING)
51 51
         );
52 52
 
53 53
         return $query->execute();
Please login to merge, or discard this patch.
Classes/Domain/Repository/CollectionRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         // order by oai_name
100 100
         $query->setOrderings(
101
-            array('oai_name' => QueryInterface::ORDER_ASCENDING)
101
+            array ('oai_name' => QueryInterface::ORDER_ASCENDING)
102 102
         );
103 103
 
104 104
         return $query->execute();
Please login to merge, or discard this patch.
Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 if ($this->document) {
158 158
                     $doc = Doc::getInstance($this->document->getLocation(), ['storagePid' => $pid], true);
159 159
                 } else {
160
-                    $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $pid . '" for document loading');
160
+                    $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$pid.'" for document loading');
161 161
                 }
162 162
             } else if (GeneralUtility::isValidUrl($requestData['id'])) {
163 163
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
                     $this->document->setLocation($requestData['id']);
177 177
                 } else {
178
-                    $this->logger->error('Invalid location given "' . $requestData['id'] . '" for document loading');
178
+                    $this->logger->error('Invalid location given "'.$requestData['id'].'" for document loading');
179 179
                 }
180 180
             }
181 181
 
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
                 if ($this->document !== null && $doc !== null) {
193 193
                     $this->document->setDoc($doc);
194 194
                 } else {
195
-                    $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"');
195
+                    $this->logger->error('Failed to load document with record ID "'.$requestData['recordId'].'"');
196 196
                 }
197 197
             }
198 198
         } else {
199
-            $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $pid . '" for document loading');
199
+            $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$pid.'" for document loading');
200 200
         }
201 201
     }
202 202
 }
Please login to merge, or discard this patch.
Classes/Common/Solr.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         // Get next available core name if none given.
136 136
         if (empty($core)) {
137
-            $core = 'dlfCore' . self::getNextCoreNumber();
137
+            $core = 'dlfCore'.self::getNextCoreNumber();
138 138
         }
139 139
         // Get Solr service instance.
140 140
         $solr = self::getInstance($core);
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
                 ->execute();
231 231
 
232 232
             while ($resArray = $result->fetch()) {
233
-                $fields[] = $resArray['index_name'] . '_' . ($resArray['index_tokenized'] ? 't' : 'u') . ($resArray['index_stored'] ? 's' : 'u') . 'i';
233
+                $fields[] = $resArray['index_name'].'_'.($resArray['index_tokenized'] ? 't' : 'u').($resArray['index_stored'] ? 's' : 'u').'i';
234 234
             }
235 235
 
236 236
             // Check if queried field is valid.
237 237
             $splitQuery = explode(':', $query, 2);
238 238
             if (in_array($splitQuery[0], $fields)) {
239
-                $query = $splitQuery[0] . ':(' . self::escapeQuery(trim($splitQuery[1], '()')) . ')';
239
+                $query = $splitQuery[0].':('.self::escapeQuery(trim($splitQuery[1], '()')).')';
240 240
             } else {
241 241
                 $query = self::escapeQuery($query);
242 242
             }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     {
342 342
         $number = max(intval($number), 0);
343 343
         // Check if core already exists.
344
-        $solr = self::getInstance('dlfCore' . $number);
344
+        $solr = self::getInstance('dlfCore'.$number);
345 345
         if (!$solr->ready) {
346 346
             return $number;
347 347
         } else {
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
         $parameters['start'] = 0;
404 404
         $parameters['rows'] = $this->limit;
405 405
         // Calculate cache identifier.
406
-        $cacheIdentifier = Helper::digest($this->core . print_r(array_merge($this->params, $parameters), true));
406
+        $cacheIdentifier = Helper::digest($this->core.print_r(array_merge($this->params, $parameters), true));
407 407
         $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('tx_dlf_solr');
408 408
         $resultSet = [];
409 409
         if (($entry = $cache->get($cacheIdentifier)) === false) {
@@ -534,12 +534,12 @@  discard block
 block discarded – undo
534 534
      */
535 535
     public function __get($var)
536 536
     {
537
-        $method = '_get' . ucfirst($var);
537
+        $method = '_get'.ucfirst($var);
538 538
         if (
539 539
             !property_exists($this, $var)
540 540
             || !method_exists($this, $method)
541 541
         ) {
542
-            $this->logger->warning('There is no getter function for property "' . $var . '"');
542
+            $this->logger->warning('There is no getter function for property "'.$var.'"');
543 543
             return;
544 544
         } else {
545 545
             return $this->$method();
@@ -572,12 +572,12 @@  discard block
 block discarded – undo
572 572
      */
573 573
     public function __set($var, $value)
574 574
     {
575
-        $method = '_set' . ucfirst($var);
575
+        $method = '_set'.ucfirst($var);
576 576
         if (
577 577
             !property_exists($this, $var)
578 578
             || !method_exists($this, $method)
579 579
         ) {
580
-            $this->logger->warning('There is no setter function for property "' . $var . '"');
580
+            $this->logger->warning('There is no setter function for property "'.$var.'"');
581 581
         } else {
582 582
             $this->$method($value);
583 583
         }
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
                     'scheme' => $this->config['scheme'],
615 615
                     'host' => $this->config['host'],
616 616
                     'port' => $this->config['port'],
617
-                    'path' => '/' . $this->config['path'],
617
+                    'path' => '/'.$this->config['path'],
618 618
                     'core' => $core,
619 619
                     'username' => $this->config['username'],
620 620
                     'password' => $this->config['password'],
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
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $fileMimeType = $this->getFileMimeType($id);
169 169
         $fileLocation = $this->getFileLocation($id);
170 170
         if ($fileMimeType === 'application/vnd.kitodo.iiif') {
171
-            $fileLocation = (strrpos($fileLocation, 'info.json') === strlen($fileLocation) - 9) ? $fileLocation : (strrpos($fileLocation, '/') === strlen($fileLocation) ? $fileLocation . 'info.json' : $fileLocation . '/info.json');
171
+            $fileLocation = (strrpos($fileLocation, 'info.json') === strlen($fileLocation) - 9) ? $fileLocation : (strrpos($fileLocation, '/') === strlen($fileLocation) ? $fileLocation.'info.json' : $fileLocation.'/info.json');
172 172
             $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
173 173
             IiifHelper::setUrlReader(IiifUrlReader::getInstance());
174 174
             IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
                 return $service->getImageUrl();
179 179
             }
180 180
         } elseif ($fileMimeType === 'application/vnd.netfpx') {
181
-            $baseURL = $fileLocation . (strpos($fileLocation, '?') === false ? '?' : '');
181
+            $baseURL = $fileLocation.(strpos($fileLocation, '?') === false ? '?' : '');
182 182
             // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server'
183
-            return $baseURL . '&CVT=jpeg';
183
+            return $baseURL.'&CVT=jpeg';
184 184
         }
185 185
         return $fileLocation;
186 186
     }
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function getFileLocation($id)
193 193
     {
194
-        $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]');
194
+        $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]');
195 195
         if (
196 196
             !empty($id)
197 197
             && !empty($location)
198 198
         ) {
199 199
             return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href;
200 200
         } else {
201
-            $this->logger->warning('There is no file node with @ID "' . $id . '"');
201
+            $this->logger->warning('There is no file node with @ID "'.$id.'"');
202 202
             return '';
203 203
         }
204 204
     }
@@ -209,14 +209,14 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function getFileMimeType($id)
211 211
     {
212
-        $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE');
212
+        $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE');
213 213
         if (
214 214
             !empty($id)
215 215
             && !empty($mimetype)
216 216
         ) {
217 217
             return (string) $mimetype[0];
218 218
         } else {
219
-            $this->logger->warning('There is no file node with @ID "' . $id . '" or no MIME type specified');
219
+            $this->logger->warning('There is no file node with @ID "'.$id.'" or no MIME type specified');
220 220
             return '';
221 221
         }
222 222
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             return $this->logicalUnits[$id];
238 238
         } elseif (!empty($id)) {
239 239
             // Get specified logical unit.
240
-            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]');
240
+            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]');
241 241
         } else {
242 242
             // Get all logical units at top level.
243 243
             $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div');
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
             // Retain current PID.
378 378
             $cPid = ($this->cPid ? $this->cPid : $this->pid);
379 379
         } elseif (!$cPid) {
380
-            $this->logger->warning('Invalid PID ' . $cPid . ' for metadata definitions');
380
+            $this->logger->warning('Invalid PID '.$cPid.' for metadata definitions');
381 381
             return [];
382 382
         }
383 383
         // Get metadata from parsed metadata array if available.
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         if (!empty($this->logicalUnits[$id])) {
419 419
             $dmdIds = $this->logicalUnits[$id]['dmdId'];
420 420
         } else {
421
-            $dmdIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@DMDID');
421
+            $dmdIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@DMDID');
422 422
             $dmdIds = (string) $dmdIds[0];
423 423
         }
424 424
         if (!empty($dmdIds)) {
@@ -444,11 +444,11 @@  discard block
 block discarded – undo
444 444
                     ) {
445 445
                         $obj->extractMetadata($this->dmdSec[$dmdId]['xml'], $metadata);
446 446
                     } else {
447
-                        $this->logger->warning('Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->dmdSec[$dmdId]['type'] . '"');
447
+                        $this->logger->warning('Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->dmdSec[$dmdId]['type'].'"');
448 448
                     }
449 449
                 }
450 450
             } else {
451
-                $this->logger->notice('Unsupported metadata format "' . $this->dmdSec[$dmdId]['type'] . '" in dmdSec with @ID "' . $dmdId . '"');
451
+                $this->logger->notice('Unsupported metadata format "'.$this->dmdSec[$dmdId]['type'].'" in dmdSec with @ID "'.$dmdId.'"');
452 452
                 // Continue searching for supported metadata with next @DMDID.
453 453
                 continue;
454 454
             }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
             if (!empty($this->logicalUnits[$id])) {
457 457
                 $metadata['type'] = [$this->logicalUnits[$id]['type']];
458 458
             } else {
459
-                $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE');
459
+                $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE');
460 460
                 if (!empty($struct)) {
461 461
                     $metadata['type'] = [(string) $struct[0]];
462 462
                 }
@@ -573,13 +573,13 @@  discard block
 block discarded – undo
573 573
                             $values instanceof \DOMNodeList
574 574
                             && $values->length > 0
575 575
                         ) {
576
-                            $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue);
576
+                            $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue);
577 577
                         } elseif (!($values instanceof \DOMNodeList)) {
578
-                            $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values);
578
+                            $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values);
579 579
                         }
580 580
                     }
581
-                    if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) {
582
-                        $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0];
581
+                    if (empty($metadata[$resArray['index_name'].'_sorting'][0])) {
582
+                        $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];
583 583
                     }
584 584
                 }
585 585
             }
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
         if ($hasSupportedMetadata) {
596 596
             return $metadata;
597 597
         } else {
598
-            $this->logger->warning('No supported metadata found for logical structure with @ID "' . $id . '"');
598
+            $this->logger->warning('No supported metadata found for logical structure with @ID "'.$id.'"');
599 599
             return [];
600 600
         }
601 601
     }
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
      */
623 623
     public function getStructureDepth($logId)
624 624
     {
625
-        $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*');
625
+        $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*');
626 626
         if (!empty($ancestors)) {
627 627
             return count($ancestors);
628 628
         } else {
@@ -646,9 +646,9 @@  discard block
 block discarded – undo
646 646
             $this->registerNamespaces($this->mets);
647 647
         } else {
648 648
             if (!empty($location)) {
649
-                $this->logger->error('No METS part found in document with location "' . $location . '".');
649
+                $this->logger->error('No METS part found in document with location "'.$location.'".');
650 650
             } else if (!empty($this->recordId)) {
651
-                $this->logger->error('No METS part found in document with recordId "' . $this->recordId . '".');
651
+                $this->logger->error('No METS part found in document with recordId "'.$this->recordId.'".');
652 652
             } else {
653 653
                 $this->logger->error('No METS part found in current document.');
654 654
             }
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
                 return true;
671 671
             }
672 672
         }
673
-        $this->logger->error('Could not load XML file from "' . $location . '"');
673
+        $this->logger->error('Could not load XML file from "'.$location.'"');
674 674
         return false;
675 675
     }
676 676
 
@@ -725,15 +725,15 @@  discard block
 block discarded – undo
725 725
             $dmdIds = $this->mets->xpath('./mets:dmdSec/@ID');
726 726
             if (!empty($dmdIds)) {
727 727
                 foreach ($dmdIds as $dmdId) {
728
-                    if ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) {
728
+                    if ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) {
729 729
                         if (!empty($this->formats[(string) $type[0]])) {
730 730
                             $type = (string) $type[0];
731
-                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']);
731
+                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']);
732 732
                         }
733
-                    } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) {
733
+                    } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) {
734 734
                         if (!empty($this->formats[(string) $type[0]])) {
735 735
                             $type = (string) $type[0];
736
-                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']);
736
+                            $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']);
737 737
                         }
738 738
                     }
739 739
                     if (!empty($xml)) {
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
             // Retain current PID.
919 919
             $cPid = ($this->cPid ? $this->cPid : $this->pid);
920 920
             if (!$cPid) {
921
-                $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions');
921
+                $this->logger->error('Invalid PID '.$cPid.' for structure definitions');
922 922
                 $this->thumbnailLoaded = true;
923 923
                 return $this->thumbnail;
924 924
             }
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
                 if (!empty($resArray['thumbnail'])) {
956 956
                     $strctType = Helper::getIndexNameFromUid($resArray['thumbnail'], 'tx_dlf_structures', $cPid);
957 957
                     // Check if this document has a structure element of the desired type.
958
-                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID');
958
+                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID');
959 959
                     if (!empty($strctIds)) {
960 960
                         $strctId = (string) $strctIds[0];
961 961
                     }
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
                     }
979 979
                 }
980 980
             } else {
981
-                $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database');
981
+                $this->logger->error('No structure of type "'.$metadata['type'][0].'" found in database');
982 982
             }
983 983
             $this->thumbnailLoaded = true;
984 984
         }
Please login to merge, or discard this patch.