@@ -168,7 +168,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -569,14 +569,14 @@ discard block |
||
569 | 569 | if ($fileContent !== false) { |
570 | 570 | $textFormat = $this->getTextFormat($fileContent); |
571 | 571 | } else { |
572 | - $this->logger->warning('Couldn\'t load full text file for structure node @ID "' . $id . '"'); |
|
572 | + $this->logger->warning('Couldn\'t load full text file for structure node @ID "'.$id.'"'); |
|
573 | 573 | return $fullText; |
574 | 574 | } |
575 | 575 | break; |
576 | 576 | } |
577 | 577 | } |
578 | 578 | } else { |
579 | - $this->logger->warning('Invalid structure node @ID "' . $id . '"'); |
|
579 | + $this->logger->warning('Invalid structure node @ID "'.$id.'"'); |
|
580 | 580 | return $fullText; |
581 | 581 | } |
582 | 582 | // Is this text format supported? |
@@ -595,12 +595,12 @@ discard block |
||
595 | 595 | $textMiniOcr = $obj->getTextAsMiniOcr($ocrTextXml); |
596 | 596 | $this->rawTextArray[$id] = $textMiniOcr; |
597 | 597 | } else { |
598 | - $this->logger->warning('Invalid class/method "' . $class . '->getRawText()" for text format "' . $textFormat . '"'); |
|
598 | + $this->logger->warning('Invalid class/method "'.$class.'->getRawText()" for text format "'.$textFormat.'"'); |
|
599 | 599 | } |
600 | 600 | } |
601 | 601 | $fullText = $textMiniOcr; |
602 | 602 | } else { |
603 | - $this->logger->warning('Unsupported text format "' . $textFormat . '" in physical node with @ID "' . $id . '"'); |
|
603 | + $this->logger->warning('Unsupported text format "'.$textFormat.'" in physical node with @ID "'.$id.'"'); |
|
604 | 604 | } |
605 | 605 | return $fullText; |
606 | 606 | } |
@@ -674,10 +674,10 @@ discard block |
||
674 | 674 | $title = self::getTitle($partof, true); |
675 | 675 | } |
676 | 676 | } else { |
677 | - Helper::log('No document with UID ' . $uid . ' found or document not accessible', LOG_SEVERITY_WARNING); |
|
677 | + Helper::log('No document with UID '.$uid.' found or document not accessible', LOG_SEVERITY_WARNING); |
|
678 | 678 | } |
679 | 679 | } else { |
680 | - Helper::log('Invalid UID ' . $uid . ' for document', LOG_SEVERITY_ERROR); |
|
680 | + Helper::log('Invalid UID '.$uid.' for document', LOG_SEVERITY_ERROR); |
|
681 | 681 | } |
682 | 682 | return $title; |
683 | 683 | } |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | // the actual loading is format specific |
809 | 809 | return $this->loadLocation($location); |
810 | 810 | } else { |
811 | - $this->logger->error('Invalid file location "' . $location . '" for document loading'); |
|
811 | + $this->logger->error('Invalid file location "'.$location.'" for document loading'); |
|
812 | 812 | } |
813 | 813 | return false; |
814 | 814 | } |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | // Set metadata definitions' PID. |
950 | 950 | $cPid = ($this->cPid ? $this->cPid : $this->pid); |
951 | 951 | if (!$cPid) { |
952 | - $this->logger->error('Invalid PID ' . $cPid . ' for metadata definitions'); |
|
952 | + $this->logger->error('Invalid PID '.$cPid.' for metadata definitions'); |
|
953 | 953 | return []; |
954 | 954 | } |
955 | 955 | if ( |
@@ -1184,12 +1184,12 @@ discard block |
||
1184 | 1184 | */ |
1185 | 1185 | public function __get($var) |
1186 | 1186 | { |
1187 | - $method = '_get' . ucfirst($var); |
|
1187 | + $method = '_get'.ucfirst($var); |
|
1188 | 1188 | if ( |
1189 | 1189 | !property_exists($this, $var) |
1190 | 1190 | || !method_exists($this, $method) |
1191 | 1191 | ) { |
1192 | - $this->logger->warning('There is no getter function for property "' . $var . '"'); |
|
1192 | + $this->logger->warning('There is no getter function for property "'.$var.'"'); |
|
1193 | 1193 | return; |
1194 | 1194 | } else { |
1195 | 1195 | return $this->$method(); |
@@ -1222,12 +1222,12 @@ discard block |
||
1222 | 1222 | */ |
1223 | 1223 | public function __set($var, $value) |
1224 | 1224 | { |
1225 | - $method = '_set' . ucfirst($var); |
|
1225 | + $method = '_set'.ucfirst($var); |
|
1226 | 1226 | if ( |
1227 | 1227 | !property_exists($this, $var) |
1228 | 1228 | || !method_exists($this, $method) |
1229 | 1229 | ) { |
1230 | - $this->logger->warning('There is no setter function for property "' . $var . '"'); |
|
1230 | + $this->logger->warning('There is no setter function for property "'.$var.'"'); |
|
1231 | 1231 | } else { |
1232 | 1232 | $this->$method($value); |
1233 | 1233 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | if (!preg_match('/[0-9]{8}-[0-9]{1}/i', $id)) { |
143 | 143 | return false; |
144 | 144 | } elseif ($checksum == 10) { |
145 | - return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); |
|
145 | + return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD'); |
|
146 | 146 | } elseif (substr($id, -1, 1) != $checksum) { |
147 | 147 | return false; |
148 | 148 | } |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv); |
308 | 308 | // Merge initialisation vector and encrypted data. |
309 | 309 | if ($encrypted !== false) { |
310 | - $encrypted = base64_encode($iv . $encrypted); |
|
310 | + $encrypted = base64_encode($iv.$encrypted); |
|
311 | 311 | } |
312 | 312 | return $encrypted; |
313 | 313 | } |
@@ -361,8 +361,8 @@ discard block |
||
361 | 361 | public static function getHookObjects($scriptRelPath) |
362 | 362 | { |
363 | 363 | $hookObjects = []; |
364 | - if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'])) { |
|
365 | - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) { |
|
364 | + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) { |
|
365 | + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) { |
|
366 | 366 | $hookObjects[] = GeneralUtility::makeInstance($classRef); |
367 | 367 | } |
368 | 368 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | !$uid |
389 | 389 | || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores']) |
390 | 390 | ) { |
391 | - self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR); |
|
391 | + self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR); |
|
392 | 392 | return ''; |
393 | 393 | } |
394 | 394 | |
@@ -399,15 +399,15 @@ discard block |
||
399 | 399 | // Should we check for a specific PID, too? |
400 | 400 | if ($pid !== -1) { |
401 | 401 | $pid = max(intval($pid), 0); |
402 | - $where = $queryBuilder->expr()->eq($table . '.pid', $pid); |
|
402 | + $where = $queryBuilder->expr()->eq($table.'.pid', $pid); |
|
403 | 403 | } |
404 | 404 | |
405 | 405 | // Get index_name from database. |
406 | 406 | $result = $queryBuilder |
407 | - ->select($table . '.index_name AS index_name') |
|
407 | + ->select($table.'.index_name AS index_name') |
|
408 | 408 | ->from($table) |
409 | 409 | ->where( |
410 | - $queryBuilder->expr()->eq($table . '.uid', $uid), |
|
410 | + $queryBuilder->expr()->eq($table.'.uid', $uid), |
|
411 | 411 | $where, |
412 | 412 | self::whereExpression($table) |
413 | 413 | ) |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | if ($resArray = $result->fetch()) { |
418 | 418 | return $resArray['index_name']; |
419 | 419 | } else { |
420 | - self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
420 | + self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
421 | 421 | return ''; |
422 | 422 | } |
423 | 423 | } |
@@ -436,9 +436,9 @@ discard block |
||
436 | 436 | // Analyze code and set appropriate ISO table. |
437 | 437 | $isoCode = strtolower(trim($code)); |
438 | 438 | if (preg_match('/^[a-z]{3}$/', $isoCode)) { |
439 | - $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'Resources/Private/Data/iso-639-2b.xml'; |
|
439 | + $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'Resources/Private/Data/iso-639-2b.xml'; |
|
440 | 440 | } elseif (preg_match('/^[a-z]{2}$/', $isoCode)) { |
441 | - $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'Resources/Private/Data/iso-639-1.xml'; |
|
441 | + $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'Resources/Private/Data/iso-639-1.xml'; |
|
442 | 442 | } else { |
443 | 443 | // No ISO code, return unchanged. |
444 | 444 | return $code; |
@@ -456,13 +456,13 @@ discard block |
||
456 | 456 | $lang = $languageService->getLLL($isoCode, $iso639); |
457 | 457 | } |
458 | 458 | } else { |
459 | - self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR); |
|
459 | + self::log('Unexpected TYPO3_MODE "'.\TYPO3_MODE.'"', LOG_SEVERITY_ERROR); |
|
460 | 460 | return $code; |
461 | 461 | } |
462 | 462 | if (!empty($lang)) { |
463 | 463 | return $lang; |
464 | 464 | } else { |
465 | - self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
465 | + self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
466 | 466 | return $code; |
467 | 467 | } |
468 | 468 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | '-' => 39, |
558 | 558 | ':' => 17, |
559 | 559 | ]; |
560 | - $urn = strtolower($base . $id); |
|
560 | + $urn = strtolower($base.$id); |
|
561 | 561 | if (preg_match('/[^a-z0-9:-]/', $urn)) { |
562 | 562 | self::log('Invalid chars in given parameters', LOG_SEVERITY_WARNING); |
563 | 563 | return ''; |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | $checksum += ($i + 1) * intval(substr($digits, $i, 1)); |
572 | 572 | } |
573 | 573 | $checksum = substr(intval($checksum / intval(substr($digits, -1, 1))), -1, 1); |
574 | - return $base . $id . $checksum; |
|
574 | + return $base.$id.$checksum; |
|
575 | 575 | } |
576 | 576 | |
577 | 577 | /** |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | // Sanitize input. |
666 | 666 | $pid = max(intval($pid), 0); |
667 | 667 | if (!$pid) { |
668 | - self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING); |
|
668 | + self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING); |
|
669 | 669 | return $index_name; |
670 | 670 | } |
671 | 671 | /** @var \TYPO3\CMS\Frontend\Page\PageRepository $pageRepository */ |
@@ -687,13 +687,13 @@ discard block |
||
687 | 687 | // First fetch the uid of the received index_name |
688 | 688 | $result = $queryBuilder |
689 | 689 | ->select( |
690 | - $table . '.uid AS uid', |
|
691 | - $table . '.l18n_parent AS l18n_parent' |
|
690 | + $table.'.uid AS uid', |
|
691 | + $table.'.l18n_parent AS l18n_parent' |
|
692 | 692 | ) |
693 | 693 | ->from($table) |
694 | 694 | ->where( |
695 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
696 | - $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($index_name)), |
|
695 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
696 | + $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($index_name)), |
|
697 | 697 | self::whereExpression($table, true) |
698 | 698 | ) |
699 | 699 | ->setMaxResults(1) |
@@ -706,12 +706,12 @@ discard block |
||
706 | 706 | $resArray = $allResults[0]; |
707 | 707 | |
708 | 708 | $result = $queryBuilder |
709 | - ->select($table . '.index_name AS index_name') |
|
709 | + ->select($table.'.index_name AS index_name') |
|
710 | 710 | ->from($table) |
711 | 711 | ->where( |
712 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
713 | - $queryBuilder->expr()->eq($table . '.uid', $resArray['l18n_parent']), |
|
714 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($languageAspect->getContentId())), |
|
712 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
713 | + $queryBuilder->expr()->eq($table.'.uid', $resArray['l18n_parent']), |
|
714 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', intval($languageAspect->getContentId())), |
|
715 | 715 | self::whereExpression($table, true) |
716 | 716 | ) |
717 | 717 | ->setMaxResults(1) |
@@ -729,14 +729,14 @@ discard block |
||
729 | 729 | if (empty($labels[$table][$pid][$languageAspect->getContentId()][$index_name])) { |
730 | 730 | // Check if this table is allowed for translation. |
731 | 731 | if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'])) { |
732 | - $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]); |
|
732 | + $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]); |
|
733 | 733 | if ($languageAspect->getContentId() > 0) { |
734 | 734 | $additionalWhere = $queryBuilder->expr()->andX( |
735 | 735 | $queryBuilder->expr()->orX( |
736 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
737 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($languageAspect->getContentId())) |
|
736 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
737 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', intval($languageAspect->getContentId())) |
|
738 | 738 | ), |
739 | - $queryBuilder->expr()->eq($table . '.l18n_parent', 0) |
|
739 | + $queryBuilder->expr()->eq($table.'.l18n_parent', 0) |
|
740 | 740 | ); |
741 | 741 | } |
742 | 742 | |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | ->select('*') |
746 | 746 | ->from($table) |
747 | 747 | ->where( |
748 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
748 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
749 | 749 | $additionalWhere, |
750 | 750 | self::whereExpression($table, true) |
751 | 751 | ) |
@@ -763,10 +763,10 @@ discard block |
||
763 | 763 | } |
764 | 764 | } |
765 | 765 | } else { |
766 | - self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
766 | + self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
767 | 767 | } |
768 | 768 | } else { |
769 | - self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
769 | + self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
770 | 770 | } |
771 | 771 | } |
772 | 772 | |
@@ -808,9 +808,9 @@ discard block |
||
808 | 808 | return GeneralUtility::makeInstance(ConnectionPool::class) |
809 | 809 | ->getQueryBuilderForTable($table) |
810 | 810 | ->expr() |
811 | - ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
811 | + ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
812 | 812 | } else { |
813 | - self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR); |
|
813 | + self::log('Unexpected TYPO3_MODE "'.\TYPO3_MODE.'"', LOG_SEVERITY_ERROR); |
|
814 | 814 | return '1=-1'; |
815 | 815 | } |
816 | 816 | } |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | */ |
850 | 850 | public static function polyfillExtbaseClassesForTYPO3v9() |
851 | 851 | { |
852 | - $classes = require __DIR__ . '/../../Configuration/Extbase/Persistence/Classes.php'; |
|
852 | + $classes = require __DIR__.'/../../Configuration/Extbase/Persistence/Classes.php'; |
|
853 | 853 | |
854 | 854 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
855 | 855 | $configurationManager = $objectManager->get(ConfigurationManager::class); |
@@ -274,7 +274,7 @@ |
||
274 | 274 | |
275 | 275 | if ($doc !== null) { |
276 | 276 | // Get the closest ancestor of the current document which has a MPTR child. |
277 | - $parentMptr = $doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $doc->toplevelId . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
277 | + $parentMptr = $doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$doc->toplevelId.'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
278 | 278 | if (!empty($parentMptr)) { |
279 | 279 | $parentLocation = (string) $parentMptr[0]->attributes('http://www.w3.org/1999/xlink')->href; |
280 | 280 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $this->initializeRepositories($input->getOption('pid')); |
97 | 97 | |
98 | 98 | if ($this->storagePid == 0) { |
99 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
99 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
100 | 100 | exit(1); |
101 | 101 | } |
102 | 102 | |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
112 | 112 | $output_solrCores = []; |
113 | 113 | foreach ($allSolrCores as $index_name => $uid) { |
114 | - $output_solrCores[] = $uid . ' : ' . $index_name; |
|
114 | + $output_solrCores[] = $uid.' : '.$index_name; |
|
115 | 115 | } |
116 | 116 | if (empty($output_solrCores)) { |
117 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
117 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
118 | 118 | exit(1); |
119 | 119 | } else { |
120 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n"); |
|
120 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n"); |
|
121 | 121 | exit(1); |
122 | 122 | } |
123 | 123 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $document = $this->documentRepository->findByUid($input->getOption('doc')); |
158 | 158 | |
159 | 159 | if ($document === null) { |
160 | - $io->error('ERROR: Document with UID "' . $input->getOption('doc') . '" could not be found on PID ' . $this->storagePid . ' .'); |
|
160 | + $io->error('ERROR: Document with UID "'.$input->getOption('doc').'" could not be found on PID '.$this->storagePid.' .'); |
|
161 | 161 | exit(1); |
162 | 162 | } else { |
163 | 163 | $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true); |
@@ -182,17 +182,17 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | if ($doc === null) { |
185 | - $io->error('ERROR: Document "' . $input->getOption('doc') . '" could not be loaded.'); |
|
185 | + $io->error('ERROR: Document "'.$input->getOption('doc').'" could not be loaded.'); |
|
186 | 186 | exit(1); |
187 | 187 | } |
188 | 188 | |
189 | 189 | $document->setSolrcore($solrCoreUid); |
190 | 190 | |
191 | 191 | if ($dryRun) { |
192 | - $io->section('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
192 | + $io->section('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
193 | 193 | } else { |
194 | 194 | if ($io->isVerbose()) { |
195 | - $io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
195 | + $io->section('Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
196 | 196 | } |
197 | 197 | $document->setDoc($doc); |
198 | 198 | // save to database |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $this->initializeRepositories($input->getOption('pid')); |
101 | 101 | |
102 | 102 | if ($this->storagePid == 0) { |
103 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
103 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
104 | 104 | exit(1); |
105 | 105 | } |
106 | 106 | |
@@ -115,13 +115,13 @@ discard block |
||
115 | 115 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
116 | 116 | $output_solrCores = []; |
117 | 117 | foreach ($allSolrCores as $index_name => $uid) { |
118 | - $output_solrCores[] = $uid . ' : ' . $index_name; |
|
118 | + $output_solrCores[] = $uid.' : '.$index_name; |
|
119 | 119 | } |
120 | 120 | if (empty($output_solrCores)) { |
121 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
121 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
122 | 122 | exit(1); |
123 | 123 | } else { |
124 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n"); |
|
124 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n"); |
|
125 | 125 | exit(1); |
126 | 126 | } |
127 | 127 | } |
@@ -163,15 +163,15 @@ discard block |
||
163 | 163 | $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true); |
164 | 164 | |
165 | 165 | if ($doc === null) { |
166 | - $io->warning('WARNING: Document "' . $document->getLocation() . '" could not be loaded. Skip to next document.'); |
|
166 | + $io->warning('WARNING: Document "'.$document->getLocation().'" could not be loaded. Skip to next document.'); |
|
167 | 167 | continue; |
168 | 168 | } |
169 | 169 | |
170 | 170 | if ($dryRun) { |
171 | - $io->writeln('DRY RUN: Would index ' . ($id + 1) . '/' . count($documents) . ' with UID "' . $document->getUid() . '" ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
171 | + $io->writeln('DRY RUN: Would index '.($id + 1).'/'.count($documents).' with UID "'.$document->getUid().'" ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
172 | 172 | } else { |
173 | 173 | if ($io->isVerbose()) { |
174 | - $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . ($id + 1) . '/' . count($documents) . ' with UID "' . $document->getUid() . '" ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
174 | + $io->writeln(date('Y-m-d H:i:s').' Indexing '.($id + 1).'/'.count($documents).' with UID "'.$document->getUid().'" ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
175 | 175 | } |
176 | 176 | $document->setDoc($doc); |
177 | 177 | // save to database |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $this->initializeRepositories($input->getOption('pid')); |
111 | 111 | |
112 | 112 | if ($this->storagePid == 0) { |
113 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
113 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
114 | 114 | exit(1); |
115 | 115 | } |
116 | 116 | |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
129 | 129 | $output_solrCores = []; |
130 | 130 | foreach ($allSolrCores as $index_name => $uid) { |
131 | - $output_solrCores[] = $uid . ' : ' . $index_name; |
|
131 | + $output_solrCores[] = $uid.' : '.$index_name; |
|
132 | 132 | } |
133 | 133 | if (empty($output_solrCores)) { |
134 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
134 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
135 | 135 | exit(1); |
136 | 136 | } else { |
137 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n"); |
|
137 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n"); |
|
138 | 138 | exit(1); |
139 | 139 | } |
140 | 140 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | exit(1); |
155 | 155 | } |
156 | 156 | if (!GeneralUtility::isValidUrl($baseUrl)) { |
157 | - $io->error('ERROR: No valid OAI Base URL set for library with given UID ("' . $input->getOption('lib') . '").'); |
|
157 | + $io->error('ERROR: No valid OAI Base URL set for library with given UID ("'.$input->getOption('lib').'").'); |
|
158 | 158 | exit(1); |
159 | 159 | } else { |
160 | 160 | try { |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | } |
196 | 196 | } |
197 | 197 | if (empty($set)) { |
198 | - $io->error('ERROR: OAI interface does not provide a set with given setSpec ("' . $input->getOption('set') . '").'); |
|
198 | + $io->error('ERROR: OAI interface does not provide a set with given setSpec ("'.$input->getOption('set').'").'); |
|
199 | 199 | exit(1); |
200 | 200 | } |
201 | 201 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | // Process all identifiers. |
211 | - $baseLocation = $baseUrl . (parse_url($baseUrl, PHP_URL_QUERY) ? '&' : '?'); |
|
211 | + $baseLocation = $baseUrl.(parse_url($baseUrl, PHP_URL_QUERY) ? '&' : '?'); |
|
212 | 212 | foreach ($identifiers as $identifier) { |
213 | 213 | // Build OAI GetRecord URL... |
214 | 214 | $params = [ |
@@ -216,13 +216,13 @@ discard block |
||
216 | 216 | 'metadataPrefix' => 'mets', |
217 | 217 | 'identifier' => (string) $identifier->identifier |
218 | 218 | ]; |
219 | - $docLocation = $baseLocation . http_build_query($params); |
|
219 | + $docLocation = $baseLocation.http_build_query($params); |
|
220 | 220 | // ...index the document... |
221 | 221 | $document = null; |
222 | 222 | $doc = Doc::getInstance($docLocation, ['storagePid' => $this->storagePid], true); |
223 | 223 | |
224 | 224 | if ($doc === null) { |
225 | - $io->warning('WARNING: Document "' . $docLocation . '" could not be loaded. Skip to next document.'); |
|
225 | + $io->warning('WARNING: Document "'.$docLocation.'" could not be loaded. Skip to next document.'); |
|
226 | 226 | continue; |
227 | 227 | } |
228 | 228 | |
@@ -239,10 +239,10 @@ discard block |
||
239 | 239 | $document->setSolrcore($solrCoreUid); |
240 | 240 | |
241 | 241 | if ($dryRun) { |
242 | - $io->writeln('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
242 | + $io->writeln('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
243 | 243 | } else { |
244 | 244 | if ($io->isVerbose()) { |
245 | - $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
245 | + $io->writeln(date('Y-m-d H:i:s').' Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
246 | 246 | } |
247 | 247 | $document->setDoc($doc); |
248 | 248 | // save to database |
@@ -267,6 +267,6 @@ discard block |
||
267 | 267 | */ |
268 | 268 | protected function handleOaiError(BaseoaipmhException $exception, SymfonyStyle $io) |
269 | 269 | { |
270 | - $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:' . "\n " . $exception->getMessage()); |
|
270 | + $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:'."\n ".$exception->getMessage()); |
|
271 | 271 | } |
272 | 272 | } |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getDescription(): string |
56 | 56 | { |
57 | - return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to' . |
|
58 | - ' make use of the Extbase naming scheme. Therefore it updates the field values' . |
|
57 | + return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to'. |
|
58 | + ' make use of the Extbase naming scheme. Therefore it updates the field values'. |
|
59 | 59 | ' "pi_flexform" within the tt_content table'; |
60 | 60 | } |
61 | 61 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | foreach ($fields as $field) { |
171 | 171 | // change the index attribute if it doesn't start with 'settings.' yet |
172 | 172 | if (strpos($field['index'], 'settings.') === false) { |
173 | - $field['index'] = 'settings.' . $field['index']; |
|
173 | + $field['index'] = 'settings.'.$field['index']; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 |
@@ -172,9 +172,9 @@ discard block |
||
172 | 172 | $queryBuilder->createNamedParameter('', \PDO::PARAM_STR) |
173 | 173 | ), |
174 | 174 | $queryBuilder->expr()->comparison( |
175 | - 'CAST(CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS DECIMAL) AS CHAR)', |
|
175 | + 'CAST(CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS DECIMAL) AS CHAR)', |
|
176 | 176 | ExpressionBuilder::NEQ, |
177 | - 'CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS CHAR)' |
|
177 | + 'CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS CHAR)' |
|
178 | 178 | ) |
179 | 179 | ) |
180 | 180 | ->orderBy('uid') |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | } catch (DBALException $e) { |
189 | 189 | throw new \RuntimeException( |
190 | - 'Database query failed. Error was: ' . $e->getPrevious()->getMessage(), |
|
190 | + 'Database query failed. Error was: '.$e->getPrevious()->getMessage(), |
|
191 | 191 | 1511950673 |
192 | 192 | ); |
193 | 193 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); |
247 | 247 | |
248 | 248 | $fileUid = null; |
249 | - $sourcePath = Environment::getPublicPath() . '/' . $fieldItem; |
|
249 | + $sourcePath = Environment::getPublicPath().'/'.$fieldItem; |
|
250 | 250 | |
251 | 251 | // maybe the file was already moved, so check if the original file still exists |
252 | 252 | if (file_exists($sourcePath)) { |