We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | - return $entry['label'] ?: $entry['orderlabel']; |
|
| 322 | + return $entry['label'] ? : $entry['orderlabel']; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | /** |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | */ |
| 353 | 353 | private function sortSubMenu(array &$menu): void |
| 354 | 354 | { |
| 355 | - usort($menu[0]['_SUB_MENU'], function ($firstElement, $secondElement) { |
|
| 355 | + usort($menu[0]['_SUB_MENU'], function($firstElement, $secondElement) { |
|
| 356 | 356 | if (!empty($firstElement['orderlabel'])) { |
| 357 | 357 | return $firstElement['orderlabel'] <=> $secondElement['orderlabel']; |
| 358 | 358 | } |
@@ -352,7 +352,8 @@ |
||
| 352 | 352 | */ |
| 353 | 353 | private function sortSubMenu(array &$menu): void |
| 354 | 354 | { |
| 355 | - usort($menu[0]['_SUB_MENU'], function ($firstElement, $secondElement) { |
|
| 355 | + usort($menu[0]['_SUB_MENU'], function ($firstElement, $secondElement) |
|
| 356 | + { |
|
| 356 | 357 | if (!empty($firstElement['orderlabel'])) { |
| 357 | 358 | return $firstElement['orderlabel'] <=> $secondElement['orderlabel']; |
| 358 | 359 | } |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | $simplePagination = new SimplePagination($solrPaginator); |
| 103 | 103 | |
| 104 | 104 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
| 105 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
| 105 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | $this->view->assign('viewData', $this->viewData); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $listRequestData = GeneralUtility::_GPmerged('tx_dlf_listview'); |
| 118 | 118 | |
| 119 | 119 | if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) { |
| 120 | - $this->searchParams = array_merge($this->searchParams ?: [], $listRequestData['searchParameter']); |
|
| 120 | + $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']); |
|
| 121 | 121 | $listViewSearch = true; |
| 122 | 122 | $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $this->searchParams); |
| 123 | 123 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $simplePagination = new SimplePagination($solrPaginator); |
| 179 | 179 | |
| 180 | 180 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
| 181 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
| 181 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $this->view->assign('documents', !empty($solrResults) ? $solrResults : []); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // extract collection(s) from collection parameter |
| 83 | 83 | $collections = []; |
| 84 | 84 | if ($this->searchParams['collection']) { |
| 85 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 85 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 86 | 86 | $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry); |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $simplePagination = new SimplePagination($solrPaginator); |
| 114 | 114 | |
| 115 | 115 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
| 116 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
| 116 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $this->view->assign('viewData', $this->viewData); |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | $this->view->assign('calendarData', $calendarData); |
| 135 | 135 | $this->view->assign('documentId', $this->document->getUid()); |
| 136 | 136 | $this->view->assign('yearLinkTitle', $yearLinkTitle); |
| 137 | - $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
| 138 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 137 | + $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
| 138 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | $this->view->assign('documentId', $this->document->getUid()); |
| 223 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 223 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | foreach ($year['children'] as $month) { |
| 490 | 490 | foreach ($month['children'] as $day) { |
| 491 | 491 | foreach ($day['children'] as $issue) { |
| 492 | - $title = $issue['label'] ?: $issue['orderlabel']; |
|
| 492 | + $title = $issue['label'] ? : $issue['orderlabel']; |
|
| 493 | 493 | if (strtotime($title) !== false) { |
| 494 | 494 | $title = strftime('%x', strtotime($title)); |
| 495 | 495 | } |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | $this->parseMetadata($i, $name, $value, $metadata); |
| 174 | 174 | |
| 175 | 175 | if (is_array($metadata[$i][$name])) { |
| 176 | - $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function ($metadataValue) { |
|
| 176 | + $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function($metadataValue) { |
|
| 177 | 177 | return !empty($metadataValue); |
| 178 | 178 | })); |
| 179 | 179 | } |
@@ -173,7 +173,8 @@ |
||
| 173 | 173 | $this->parseMetadata($i, $name, $value, $metadata); |
| 174 | 174 | |
| 175 | 175 | if (is_array($metadata[$i][$name])) { |
| 176 | - $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function ($metadataValue) { |
|
| 176 | + $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function ($metadataValue) |
|
| 177 | + { |
|
| 177 | 178 | return !empty($metadataValue); |
| 178 | 179 | })); |
| 179 | 180 | } |
@@ -729,7 +729,7 @@ |
||
| 729 | 729 | */ |
| 730 | 730 | private function getDate(string $dateType) |
| 731 | 731 | { |
| 732 | - return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ?: strptime($this->parameters[$dateType], '%Y-%m-%d'); |
|
| 732 | + return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ? : strptime($this->parameters[$dateType], '%Y-%m-%d'); |
|
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | /** |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $metadata['video_duration'] = [$videoDuration]; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - $metadata['duration'] = $metadata['video_duration'] ?: $metadata['audio_duration'] ?: []; |
|
| 56 | + $metadata['duration'] = $metadata['video_duration'] ? : $metadata['audio_duration'] ? : []; |
|
| 57 | 57 | |
| 58 | 58 | if ($useExternalApis) { |
| 59 | 59 | // TODO? |
@@ -736,7 +736,7 @@ |
||
| 736 | 736 | |
| 737 | 737 | return array_filter( |
| 738 | 738 | $allMdIds, |
| 739 | - function ($element) { |
|
| 739 | + function($element) { |
|
| 740 | 740 | return !empty($element); |
| 741 | 741 | } |
| 742 | 742 | ); |
@@ -736,7 +736,8 @@ |
||
| 736 | 736 | |
| 737 | 737 | return array_filter( |
| 738 | 738 | $allMdIds, |
| 739 | - function ($element) { |
|
| 739 | + function ($element) |
|
| 740 | + { |
|
| 740 | 741 | return !empty($element); |
| 741 | 742 | } |
| 742 | 743 | ); |