We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | } |
317 | 317 | } |
318 | - return $entry['label'] ?: $entry['orderlabel']; |
|
318 | + return $entry['label'] ? : $entry['orderlabel']; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | /** |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | * @return void |
347 | 347 | */ |
348 | 348 | private function sortSubMenu(&$menu) { |
349 | - usort($menu[0]['_SUB_MENU'], function ($firstElement, $secondElement) { |
|
349 | + usort($menu[0]['_SUB_MENU'], function($firstElement, $secondElement) { |
|
350 | 350 | if (!empty($firstElement['orderlabel'])) { |
351 | 351 | return $firstElement['orderlabel'] <=> $secondElement['orderlabel']; |
352 | 352 | } |
@@ -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; |