@@ -139,10 +139,10 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -126,8 +126,8 @@ |
||
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) |
@@ -22,7 +22,7 @@ |
||
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 | } |
@@ -47,7 +47,7 @@ |
||
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(); |
@@ -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 |