@@ -98,7 +98,7 @@ |
||
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(); |
@@ -157,7 +157,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -134,7 +134,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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'], |
@@ -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 | } |
@@ -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)) { |