We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -205,7 +205,8 @@ |
||
| 205 | 205 | * |
| 206 | 206 | * @return void |
| 207 | 207 | */ |
| 208 | - private function addDcData(&$metadata, $key, $value) { |
|
| 208 | + private function addDcData(&$metadata, $key, $value) |
|
| 209 | + { |
|
| 209 | 210 | if (!empty($value)) { |
| 210 | 211 | $metadata[] = [$key => $value]; |
| 211 | 212 | } |
@@ -278,7 +278,7 @@ |
||
| 278 | 278 | |
| 279 | 279 | if ($this->solrCoreRepository->findOneByPid($this->pid) === null) { |
| 280 | 280 | $newRecord = GeneralUtility::makeInstance(SolrCore::class); |
| 281 | - $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')'); |
|
| 281 | + $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels) . ' (PID ' . $this->pid . ')'); |
|
| 282 | 282 | $indexName = Solr::createCore(''); |
| 283 | 283 | if (!empty($indexName)) { |
| 284 | 284 | $newRecord->setIndexName($indexName); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $solrDoc->setField('title', $metadata['title'][0], self::$fields['fieldboost']['title']); |
| 338 | 338 | $solrDoc->setField('volume', $metadata['volume'][0], self::$fields['fieldboost']['volume']); |
| 339 | 339 | // verify date formatting |
| 340 | - if(strtotime($metadata['date'][0])) { |
|
| 340 | + if (strtotime($metadata['date'][0])) { |
|
| 341 | 341 | // do not alter dates YYYY or YYYY-MM or YYYY-MM-DD |
| 342 | 342 | if ( |
| 343 | 343 | preg_match("/^[\d]{4}$/", $metadata['date'][0]) |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | ) { |
| 347 | 347 | $solrDoc->setField('date', $metadata['date'][0]); |
| 348 | 348 | // change date YYYYMMDD to YYYY-MM-DD |
| 349 | - } elseif (preg_match("/^[\d]{8}$/", $metadata['date'][0])){ |
|
| 349 | + } elseif (preg_match("/^[\d]{8}$/", $metadata['date'][0])) { |
|
| 350 | 350 | $solrDoc->setField('date', date("Y-m-d", strtotime($metadata['date'][0]))); |
| 351 | 351 | // convert any datetime to proper ISO extended datetime format and timezone for SOLR |
| 352 | 352 | } elseif (preg_match("/^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*$/", $metadata['date'][0])) { |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | !empty($data) |
| 484 | 484 | && substr($index_name, -8) == '_sorting' |
| 485 | 485 | ) { |
| 486 | - $solrDoc->setField($index_name , $doc->metadataArray[$doc->toplevelId][$index_name]); |
|
| 486 | + $solrDoc->setField($index_name, $doc->metadataArray[$doc->toplevelId][$index_name]); |
|
| 487 | 487 | } |
| 488 | 488 | } |
| 489 | 489 | } |
@@ -346,7 +346,7 @@ |
||
| 346 | 346 | ) { |
| 347 | 347 | $solrDoc->setField('date', $metadata['date'][0]); |
| 348 | 348 | // change date YYYYMMDD to YYYY-MM-DD |
| 349 | - } elseif (preg_match("/^[\d]{8}$/", $metadata['date'][0])){ |
|
| 349 | + } elseif (preg_match("/^[\d]{8}$/", $metadata['date'][0])) { |
|
| 350 | 350 | $solrDoc->setField('date', date("Y-m-d", strtotime($metadata['date'][0]))); |
| 351 | 351 | // convert any datetime to proper ISO extended datetime format and timezone for SOLR |
| 352 | 352 | } elseif (preg_match("/^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*$/", $metadata['date'][0])) { |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | $listRequestData = GeneralUtility::_GPmerged('tx_dlf_listview'); |
| 103 | 103 | |
| 104 | 104 | if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) { |
| 105 | - $this->searchParams = array_merge($this->searchParams ?: [], $listRequestData['searchParameter']); |
|
| 105 | + $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']); |
|
| 106 | 106 | $listViewSearch = true; |
| 107 | 107 | $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $this->searchParams); |
| 108 | 108 | } |
@@ -365,8 +365,8 @@ |
||
| 365 | 365 | $searchResult['snippet'] = $doc['snippet']; |
| 366 | 366 | $searchResult['highlight'] = $doc['highlight']; |
| 367 | 367 | $searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end |
| 368 | - preg_replace('/;+/', ';', // replace any multiple of ; with a single ; |
|
| 369 | - preg_replace('/[{~\d*}{\s+}{^=*\d+.*\d*}`~!@#$%\^&*()_|+-=?;:\'",.<>\{\}\[\]\\\]/', ';', $this->searchParams['query']))); // replace search operators and special characters with ; |
|
| 368 | + preg_replace('/;+/', ';', // replace any multiple of ; with a single ; |
|
| 369 | + preg_replace('/[{~\d*}{\s+}{^=*\d+.*\d*}`~!@#$%\^&*()_|+-=?;:\'",.<>\{\}\[\]\\\]/', ';', $this->searchParams['query']))); // replace search operators and special characters with ; |
|
| 370 | 370 | } |
| 371 | 371 | $documents[$doc['uid']]['searchResults'][] = $searchResult; |
| 372 | 372 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | // Add filter query for date search |
| 248 | 248 | if (!empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
| 249 | 249 | // combine dateFrom and dateTo into range search |
| 250 | - $params['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}'. $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
| 250 | + $params['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}' . $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | // Add filter query for faceting. |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | foreach ($this->collection as $collectionEntry) { |
| 280 | 280 | // check for virtual collections query string |
| 281 | 281 | if ($collectionEntry->getIndexSearch()) { |
| 282 | - $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR ('. $collectionEntry->getIndexSearch() . ')' ; |
|
| 282 | + $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR (' . $collectionEntry->getIndexSearch() . ')'; |
|
| 283 | 283 | } else { |
| 284 | 284 | $collectionsQueryString .= empty($collectionsQueryString) ? '"' . $collectionEntry->getIndexName() . '"' : ' OR "' . $collectionEntry->getIndexName() . '"'; |
| 285 | 285 | } |
@@ -399,8 +399,8 @@ discard block |
||
| 399 | 399 | if ($this->searchParams['fulltext'] == '1') { |
| 400 | 400 | $searchResult['snippet'] = $doc['snippet']; |
| 401 | 401 | $searchResult['highlight'] = $doc['highlight']; |
| 402 | - $searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end |
|
| 403 | - preg_replace('/;+/', ';', // replace any multiple of ; with a single ; |
|
| 402 | + $searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end |
|
| 403 | + preg_replace('/;+/', ';', // replace any multiple of ; with a single ; |
|
| 404 | 404 | preg_replace('/[{~\d*}{\s+}{^=*\d+.*\d*}`~!@#$%\^&*()_|+-=?;:\'",.<>\{\}\[\]\\\]/', ';', $this->searchParams['query']))); // replace search operators and special characters with ; |
| 405 | 405 | } |
| 406 | 406 | $documents[$doc['uid']]['searchResults'][] = $searchResult; |
@@ -478,8 +478,8 @@ discard block |
||
| 478 | 478 | |
| 479 | 479 | foreach ($result['documents'] as $doc) { |
| 480 | 480 | // translate language code if applicable |
| 481 | - if($doc['metadata']['language']) { |
|
| 482 | - foreach($doc['metadata']['language'] as $indexName => $language) { |
|
| 481 | + if ($doc['metadata']['language']) { |
|
| 482 | + foreach ($doc['metadata']['language'] as $indexName => $language) { |
|
| 483 | 483 | $doc['metadata']['language'][$indexName] = Helper::getLanguageName($doc['metadata']['language'][$indexName]); |
| 484 | 484 | } |
| 485 | 485 | } |
@@ -776,7 +776,8 @@ |
||
| 776 | 776 | * |
| 777 | 777 | * @return array The Apache Solr Documents that were fetched |
| 778 | 778 | */ |
| 779 | - private function getDocument(Document $record, array $highlighting, array $fields, $parameters) { |
|
| 779 | + private function getDocument(Document $record, array $highlighting, array $fields, $parameters) |
|
| 780 | + { |
|
| 780 | 781 | $resultDocument = new ResultDocument($record, $highlighting, $fields); |
| 781 | 782 | |
| 782 | 783 | $document = [ |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | foreach ($year['children'] as $month) { |
| 126 | 126 | foreach ($month['children'] as $day) { |
| 127 | 127 | foreach ($day['children'] as $issue) { |
| 128 | - $title = $issue['label'] ?: $issue['orderlabel']; |
|
| 128 | + $title = $issue['label'] ? : $issue['orderlabel']; |
|
| 129 | 129 | if (strtotime($title) !== false) { |
| 130 | 130 | $title = strftime('%x', strtotime($title)); |
| 131 | 131 | } |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | $this->view->assign('calendarData', $calendarData); |
| 217 | 217 | $this->view->assign('documentId', $this->document->getUid()); |
| 218 | 218 | $this->view->assign('yearLinkTitle', $yearLinkTitle); |
| 219 | - $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
| 220 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 219 | + $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
| 220 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | /** |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | if (empty($yearLabel)) { |
| 255 | 255 | // if neither order nor orderlabel is set, use the id... |
| 256 | - $yearLabel = (string)$id; |
|
| 256 | + $yearLabel = (string) $id; |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | $years[] = [ |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | if (is_int($key)) { |
| 293 | 293 | $yearFilled[] = $yearArray[$key]; |
| 294 | 294 | } else { |
| 295 | - $yearFilled[] = ['title' => $min+$i, 'documentId' => '']; |
|
| 295 | + $yearFilled[] = ['title' => $min + $i, 'documentId' => '']; |
|
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | 298 | $yearArray = $yearFilled; |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | // field for which highlighting is going to be performed, |
| 153 | 153 | // is required if you want to have OCR highlighting |
| 154 | 154 | $solrRequest->addParam('hl.ocr.fl', $this->fields['fulltext']); |
| 155 | - // return the coordinates of highlighted search as absolute coordinates |
|
| 155 | + // return the coordinates of highlighted search as absolute coordinates |
|
| 156 | 156 | $solrRequest->addParam('hl.ocr.absoluteHighlights', 'on'); |
| 157 | 157 | // max amount of snippets for a single page |
| 158 | 158 | $solrRequest->addParam('hl.snippets', 40); |
@@ -31,12 +31,12 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * @var string constant for API hostname |
| 33 | 33 | **/ |
| 34 | - const HOSTNAME = 'orcid.org'; |
|
| 34 | + const HOSTNAME = 'orcid.org'; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @var string constant for API version |
| 38 | 38 | **/ |
| 39 | - const VERSION = '3.0'; |
|
| 39 | + const VERSION = '3.0'; |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * @access protected |
@@ -55,7 +55,9 @@ discard block |
||
| 55 | 55 | $this->limit = count($solrSearch); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - public function getSource() {} |
|
| 58 | + public function getSource() |
|
| 59 | + { |
|
| 60 | +} |
|
| 59 | 61 | |
| 60 | 62 | /** |
| 61 | 63 | * Executes SOLR search query. |
@@ -79,7 +81,9 @@ discard block |
||
| 79 | 81 | return $result; |
| 80 | 82 | } |
| 81 | 83 | |
| 82 | - public function setOrderings(array $orderings) {} |
|
| 84 | + public function setOrderings(array $orderings) |
|
| 85 | + { |
|
| 86 | +} |
|
| 83 | 87 | |
| 84 | 88 | /** |
| 85 | 89 | * Sets limit for SOLR search query. |
@@ -111,28 +115,60 @@ discard block |
||
| 111 | 115 | return $this; |
| 112 | 116 | } |
| 113 | 117 | |
| 114 | - public function matching($constraint) {} |
|
| 115 | - public function logicalAnd($constraint1) {} |
|
| 116 | - public function logicalOr($constraint1) {} |
|
| 117 | - public function logicalNot(ConstraintInterface $constraint) {} |
|
| 118 | - public function equals($propertyName, $operand, $caseSensitive = true) {} |
|
| 119 | - public function like($propertyName, $operand) {} |
|
| 120 | - public function contains($propertyName, $operand) {} |
|
| 121 | - public function in($propertyName, $operand) {} |
|
| 122 | - public function lessThan($propertyName, $operand) {} |
|
| 123 | - public function lessThanOrEqual($propertyName, $operand) {} |
|
| 124 | - public function greaterThan($propertyName, $operand) {} |
|
| 125 | - public function greaterThanOrEqual($propertyName, $operand) {} |
|
| 126 | - public function getType() {} |
|
| 127 | - public function setQuerySettings(QuerySettingsInterface $querySettings) {} |
|
| 128 | - public function getQuerySettings() {} |
|
| 118 | + public function matching($constraint) |
|
| 119 | + { |
|
| 120 | +} |
|
| 121 | + public function logicalAnd($constraint1) |
|
| 122 | + { |
|
| 123 | +} |
|
| 124 | + public function logicalOr($constraint1) |
|
| 125 | + { |
|
| 126 | +} |
|
| 127 | + public function logicalNot(ConstraintInterface $constraint) |
|
| 128 | + { |
|
| 129 | +} |
|
| 130 | + public function equals($propertyName, $operand, $caseSensitive = true) |
|
| 131 | + { |
|
| 132 | +} |
|
| 133 | + public function like($propertyName, $operand) |
|
| 134 | + { |
|
| 135 | +} |
|
| 136 | + public function contains($propertyName, $operand) |
|
| 137 | + { |
|
| 138 | +} |
|
| 139 | + public function in($propertyName, $operand) |
|
| 140 | + { |
|
| 141 | +} |
|
| 142 | + public function lessThan($propertyName, $operand) |
|
| 143 | + { |
|
| 144 | +} |
|
| 145 | + public function lessThanOrEqual($propertyName, $operand) |
|
| 146 | + { |
|
| 147 | +} |
|
| 148 | + public function greaterThan($propertyName, $operand) |
|
| 149 | + { |
|
| 150 | +} |
|
| 151 | + public function greaterThanOrEqual($propertyName, $operand) |
|
| 152 | + { |
|
| 153 | +} |
|
| 154 | + public function getType() |
|
| 155 | + { |
|
| 156 | +} |
|
| 157 | + public function setQuerySettings(QuerySettingsInterface $querySettings) |
|
| 158 | + { |
|
| 159 | +} |
|
| 160 | + public function getQuerySettings() |
|
| 161 | + { |
|
| 162 | +} |
|
| 129 | 163 | |
| 130 | 164 | public function count() |
| 131 | 165 | { |
| 132 | 166 | // TODO? |
| 133 | 167 | } |
| 134 | 168 | |
| 135 | - public function getOrderings() {} |
|
| 169 | + public function getOrderings() |
|
| 170 | + { |
|
| 171 | +} |
|
| 136 | 172 | |
| 137 | 173 | /** |
| 138 | 174 | * Gets limit for SOLR search query. |
@@ -158,8 +194,16 @@ discard block |
||
| 158 | 194 | return $this->offset; |
| 159 | 195 | } |
| 160 | 196 | |
| 161 | - public function getConstraint() {} |
|
| 162 | - public function isEmpty($propertyName) {} |
|
| 163 | - public function setSource(SourceInterface $source) {} |
|
| 164 | - public function getStatement() {} |
|
| 197 | + public function getConstraint() |
|
| 198 | + { |
|
| 199 | +} |
|
| 200 | + public function isEmpty($propertyName) |
|
| 201 | + { |
|
| 202 | +} |
|
| 203 | + public function setSource(SourceInterface $source) |
|
| 204 | + { |
|
| 205 | +} |
|
| 206 | + public function getStatement() |
|
| 207 | + { |
|
| 208 | +} |
|
| 165 | 209 | } |
@@ -38,15 +38,15 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | private int $offset; |
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * Constructs SolrSearchQuery instance. |
|
| 43 | - * |
|
| 44 | - * @access public |
|
| 45 | - * |
|
| 46 | - * @param SolrSearch $solrSearch |
|
| 47 | - * |
|
| 48 | - * @return void |
|
| 49 | - */ |
|
| 41 | + /** |
|
| 42 | + * Constructs SolrSearchQuery instance. |
|
| 43 | + * |
|
| 44 | + * @access public |
|
| 45 | + * |
|
| 46 | + * @param SolrSearch $solrSearch |
|
| 47 | + * |
|
| 48 | + * @return void |
|
| 49 | + */ |
|
| 50 | 50 | public function __construct($solrSearch) |
| 51 | 51 | { |
| 52 | 52 | $this->solrSearch = $solrSearch; |