We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -334,7 +334,7 @@ |
||
334 | 334 | * |
335 | 335 | * @return void |
336 | 336 | */ |
337 | - private function addCollections(Document &$document, array $collections): void |
|
337 | + private function addCollections(Document & $document, array $collections): void |
|
338 | 338 | { |
339 | 339 | foreach ($collections as $collection) { |
340 | 340 | $documentCollection = $this->collectionRepository->findOneByIndexName($collection); |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } |
348 | 348 | } |
349 | 349 | } |
350 | - return $label ?: $orderLabel; |
|
350 | + return $label ? : $orderLabel; |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | { |
383 | 383 | usort( |
384 | 384 | $menu[0]['_SUB_MENU'], |
385 | - function ($firstElement, $secondElement) { |
|
385 | + function($firstElement, $secondElement) { |
|
386 | 386 | if (!empty($firstElement['orderlabel'])) { |
387 | 387 | return $firstElement['orderlabel'] <=> $secondElement['orderlabel']; |
388 | 388 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) { |
125 | - $this->searchParams = array_merge($this->searchParams ?: [], $listRequestData['searchParameter']); |
|
125 | + $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']); |
|
126 | 126 | $listViewSearch = true; |
127 | 127 | $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $this->searchParams); |
128 | 128 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $simplePagination = new SimplePagination($solrPaginator); |
191 | 191 | |
192 | 192 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
193 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
193 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | $this->view->assign('documents', !empty($solrResults) ? $solrResults : []); |
@@ -354,7 +354,7 @@ |
||
354 | 354 | $solrDoc->setField('title', $metadata['title'][0]); |
355 | 355 | $solrDoc->setField('volume', $metadata['volume'][0]); |
356 | 356 | // verify date formatting |
357 | - if(strtotime($metadata['date'][0])) { |
|
357 | + if (strtotime($metadata['date'][0])) { |
|
358 | 358 | $solrDoc->setField('date', self::getFormattedDate($metadata['date'][0])); |
359 | 359 | } |
360 | 360 | $solrDoc->setField('record_id', $metadata['record_id'][0]); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct($apiUrl) |
26 | 26 | { |
27 | - $this->apiUrl = trim($apiUrl, "/ "); |
|
27 | + $this->apiUrl = trim($apiUrl, "/ "); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | // Add filter query for date search |
415 | 415 | if (!empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
416 | 416 | // combine dateFrom and dateTo into range search |
417 | - $params['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}'. $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
417 | + $params['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}' . $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | // Add filter query for faceting. |
@@ -532,8 +532,8 @@ discard block |
||
532 | 532 | if ($this->searchParams['fulltext'] == '1') { |
533 | 533 | $searchResult['snippet'] = $doc['snippet']; |
534 | 534 | $searchResult['highlight'] = $doc['highlight']; |
535 | - $searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end |
|
536 | - preg_replace('/;+/', ';', // replace any multiple of ; with a single ; |
|
535 | + $searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end |
|
536 | + preg_replace('/;+/', ';', // replace any multiple of ; with a single ; |
|
537 | 537 | preg_replace('/[{~\d*}{\s+}{^=*\d+.*\d*}`~!@#$%\^&*()_|+-=?;:\'",.<>\{\}\[\]\\\]/', ';', $this->searchParams['query']))); // replace search operators and special characters with ; |
538 | 538 | } |
539 | 539 | $documents[$doc['uid']]['searchResults'][] = $searchResult; |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | private function translateLanguageCode(&$doc): void |
862 | 862 | { |
863 | 863 | if (is_array($doc['metadata']) && array_key_exists('language', $doc['metadata'])) { |
864 | - foreach($doc['metadata']['language'] as $indexName => $language) { |
|
864 | + foreach ($doc['metadata']['language'] as $indexName => $language) { |
|
865 | 865 | $doc['metadata']['language'][$indexName] = Helper::getLanguageName($language); |
866 | 866 | } |
867 | 867 | } |
@@ -291,8 +291,8 @@ discard block |
||
291 | 291 | $mets = $this->mets |
292 | 292 | ->xpath( |
293 | 293 | './mets:structMap[@TYPE="PHYSICAL"]' . |
294 | - '//mets:div[@ID="' . $pageId . '"]' . |
|
295 | - '/mets:fptr[@FILEID="' . $fileId . '"]' . |
|
294 | + '//mets:div[@ID="' . $pageId . '"]' . |
|
295 | + '/mets:fptr[@FILEID="' . $fileId . '"]' . |
|
296 | 296 | '/mets:area/@BEGIN' |
297 | 297 | ); |
298 | 298 | return empty($mets) ? '' : $mets[0]->__toString(); |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $cPid = max($cPid, 0); |
547 | 547 | if ($cPid == 0 && ($this->cPid || $this->pid)) { |
548 | 548 | // Retain current PID. |
549 | - $cPid = $this->cPid ?: $this->pid; |
|
549 | + $cPid = $this->cPid ? : $this->pid; |
|
550 | 550 | } |
551 | 551 | return $cPid; |
552 | 552 | } |
@@ -1108,7 +1108,7 @@ discard block |
||
1108 | 1108 | |
1109 | 1109 | return array_filter( |
1110 | 1110 | $allMdIds, |
1111 | - function ($element) { |
|
1111 | + function($element) { |
|
1112 | 1112 | return !empty($element); |
1113 | 1113 | } |
1114 | 1114 | ); |
@@ -1512,7 +1512,7 @@ discard block |
||
1512 | 1512 | // Get track info with begin and extent time for later assignment with musical |
1513 | 1513 | if ((string) $elementNode['TYPE'] === 'track') { |
1514 | 1514 | foreach ($elementNode->children('http://www.loc.gov/METS/')->fptr as $fptr) { |
1515 | - if (isset($fptr->area) && ((string) $fptr->area->attributes()->BETYPE === 'TIME')) { |
|
1515 | + if (isset($fptr->area) && ((string) $fptr->area->attributes()->BETYPE === 'TIME')) { |
|
1516 | 1516 | // Check if file has valid @USE attribute. |
1517 | 1517 | if (!empty($fileUse[(string) $fptr->area->attributes()->FILEID])) { |
1518 | 1518 | $this->physicalStructureInfo[$elements[(int) $elementNode['ORDER']]]['tracks'][$fileUse[(string) $fptr->area->attributes()->FILEID]] = [ |
@@ -1566,7 +1566,7 @@ discard block |
||
1566 | 1566 | || $forceReload |
1567 | 1567 | ) { |
1568 | 1568 | // Retain current PID. |
1569 | - $cPid = $this->cPid ?: $this->pid; |
|
1569 | + $cPid = $this->cPid ? : $this->pid; |
|
1570 | 1570 | if (!$cPid) { |
1571 | 1571 | $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions'); |
1572 | 1572 | $this->thumbnailLoaded = true; |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | return ''; |
434 | 434 | } |
435 | 435 | |
436 | - $makeCacheKey = function ($pid, $uid) { |
|
436 | + $makeCacheKey = function($pid, $uid) { |
|
437 | 437 | return $pid . '.' . $uid; |
438 | 438 | }; |
439 | 439 | |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | $mimeTypeCollection = GeneralUtility::makeInstance(MimeTypeCollection::class); |
964 | 964 | $mimeTypes = array_filter( |
965 | 965 | $mimeTypeCollection->getMimeTypes(), |
966 | - function ($mimeType) use ($categories) { |
|
966 | + function($mimeType) use ($categories) { |
|
967 | 967 | foreach ($categories as $category) { |
968 | 968 | if (strpos($mimeType, $category . '/') === 0) { |
969 | 969 | return true; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $query = $solr->service->createApi( |
91 | 91 | [ |
92 | 92 | 'version' => Request::API_V1, |
93 | - 'handler' => $affectedSolrCore['index_name'].'/schema', |
|
93 | + 'handler' => $affectedSolrCore['index_name'] . '/schema', |
|
94 | 94 | 'method' => Request::METHOD_POST, |
95 | 95 | 'rawdata' => json_encode( |
96 | 96 | [ |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $query = $solr->service->createApi( |
176 | 176 | [ |
177 | 177 | 'version' => Request::API_V1, |
178 | - 'handler' => $solrCore['index_name'].'/config/schemaFactory', |
|
178 | + 'handler' => $solrCore['index_name'] . '/config/schemaFactory', |
|
179 | 179 | 'method' => Request::METHOD_GET |
180 | 180 | ] |
181 | 181 | ); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $query = $solr->service->createApi( |
189 | 189 | [ |
190 | 190 | 'version' => Request::API_V1, |
191 | - 'handler' => $solrCore['index_name'].'/schema/fields/autocomplete', |
|
191 | + 'handler' => $solrCore['index_name'] . '/schema/fields/autocomplete', |
|
192 | 192 | 'method' => Request::METHOD_GET |
193 | 193 | ] |
194 | 194 | ); |