We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | public static function paragraphs(array $paragraphs) |
| 48 | 48 | { |
| 49 | - $paragraphs = array_values(array_filter($paragraphs, function ($entry) { |
|
| 49 | + $paragraphs = array_values(array_filter($paragraphs, function($entry) { |
|
| 50 | 50 | return !empty($entry); |
| 51 | 51 | })); |
| 52 | 52 | |
@@ -670,7 +670,7 @@ |
||
| 670 | 670 | } |
| 671 | 671 | } |
| 672 | 672 | |
| 673 | - return array_filter($allMdIds, function ($element) { |
|
| 673 | + return array_filter($allMdIds, function($element) { |
|
| 674 | 674 | return !empty($element); |
| 675 | 675 | }); |
| 676 | 676 | } |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | RST); |
| 205 | 205 | |
| 206 | 206 | // Sort tables alphabetically |
| 207 | - usort($tables, function ($lhs, $rhs) { |
|
| 207 | + usort($tables, function($lhs, $rhs) { |
|
| 208 | 208 | return $lhs->name <=> $rhs->name; |
| 209 | 209 | }); |
| 210 | 210 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | 'description' => 'Description', |
| 232 | 232 | ]]; |
| 233 | 233 | |
| 234 | - $rows = array_map(function ($column) use ($page) { |
|
| 234 | + $rows = array_map(function($column) use ($page) { |
|
| 235 | 235 | return [ |
| 236 | 236 | 'field' => ( |
| 237 | 237 | $page->format($column->name, ['bold' => $column->isPrimary]) |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration(); |
| 72 | 72 | |
| 73 | 73 | if ($this->disableJsonWrappedResponse) { |
| 74 | - $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) { |
|
| 74 | + $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) { |
|
| 75 | 75 | return $ext !== 'Resources/Core/Functional/Extensions/json_response'; |
| 76 | 76 | }); |
| 77 | 77 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $jsonDocuments = json_decode(file_get_contents($path), true); |
| 153 | 153 | |
| 154 | 154 | $updateQuery = $solr->service->createUpdate(); |
| 155 | - $documents = array_map(function ($jsonDoc) use ($updateQuery) { |
|
| 155 | + $documents = array_map(function($jsonDoc) use ($updateQuery) { |
|
| 156 | 156 | $document = $updateQuery->createDocument(); |
| 157 | 157 | foreach ($jsonDoc as $key => $value) { |
| 158 | 158 | $document->setField($key, $value); |
@@ -48,6 +48,6 @@ |
||
| 48 | 48 | $metadata['video_duration'] = [$videoDuration]; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $metadata['duration'] = $metadata['video_duration'] ?: $metadata['audio_duration'] ?: []; |
|
| 51 | + $metadata['duration'] = $metadata['video_duration'] ? : $metadata['audio_duration'] ? : []; |
|
| 52 | 52 | } |
| 53 | 53 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | return ''; |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | - $makeCacheKey = function ($pid, $uid) { |
|
| 403 | + $makeCacheKey = function($pid, $uid) { |
|
| 404 | 404 | return $pid . '.' . $uid; |
| 405 | 405 | }; |
| 406 | 406 | |
@@ -925,7 +925,7 @@ discard block |
||
| 925 | 925 | self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING); |
| 926 | 926 | return false; |
| 927 | 927 | } |
| 928 | - $content = $response->getBody()->getContents(); |
|
| 928 | + $content = $response->getBody()->getContents(); |
|
| 929 | 929 | |
| 930 | 930 | return $content; |
| 931 | 931 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | $settingsParts = explode("/", $model); |
| 50 | 50 | $fileName = end($settingsParts); |
| 51 | - $path = substr($model, 0, strrpos($model, $fileName)); |
|
| 51 | + $path = substr($model, 0, strrpos($model, $fileName)); |
|
| 52 | 52 | $modelSettings = $path . "metadata/" . $fileName . "_viewer"; |
| 53 | 53 | |
| 54 | 54 | if (!empty($modelConverted)) { |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | // extract collection(s) from collection parameter |
| 76 | 76 | $collection = null; |
| 77 | 77 | if ($this->searchParams['collection']) { |
| 78 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 78 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 79 | 79 | $collection[] = $this->collectionRepository->findByUid($collectionEntry); |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -108,13 +108,13 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | // sanitize date search input |
| 111 | - if(empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
|
| 111 | + if (empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
|
| 112 | 112 | $this->searchParams['dateFrom'] = '*'; |
| 113 | 113 | } |
| 114 | - if(empty($this->searchParams['dateTo']) && !empty($this->searchParams['dateFrom'])) { |
|
| 114 | + if (empty($this->searchParams['dateTo']) && !empty($this->searchParams['dateFrom'])) { |
|
| 115 | 115 | $this->searchParams['dateTo'] = 'NOW'; |
| 116 | 116 | } |
| 117 | - if($this->searchParams['dateFrom'] > $this->searchParams['dateTo']) { |
|
| 117 | + if ($this->searchParams['dateFrom'] > $this->searchParams['dateTo']) { |
|
| 118 | 118 | $tmpDate = $this->searchParams['dateFrom']; |
| 119 | 119 | $this->searchParams['dateFrom'] = $this->searchParams['dateTo']; |
| 120 | 120 | $this->searchParams['dateTo'] = $tmpDate; |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | // extract collections from collection parameter |
| 260 | 260 | $collection = null; |
| 261 | 261 | if ($this->searchParams['collection']) { |
| 262 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 262 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 263 | 263 | $collection[] = $this->collectionRepository->findByUid($collectionEntry); |
| 264 | 264 | } |
| 265 | 265 | |
@@ -269,8 +269,8 @@ discard block |
||
| 269 | 269 | $virtualCollectionsQueryString = ''; |
| 270 | 270 | foreach ($collection as $collectionEntry) { |
| 271 | 271 | // check for virtual collections query string |
| 272 | - if($collectionEntry->getIndexSearch()) { |
|
| 273 | - $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR ('. $collectionEntry->getIndexSearch() . ')' ; |
|
| 272 | + if ($collectionEntry->getIndexSearch()) { |
|
| 273 | + $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR (' . $collectionEntry->getIndexSearch() . ')'; |
|
| 274 | 274 | } |
| 275 | 275 | else { |
| 276 | 276 | $collectionsQueryString .= empty($collectionsQueryString) ? '"' . $collectionEntry->getIndexName() . '"' : ' OR "' . $collectionEntry->getIndexName() . '"'; |
@@ -278,8 +278,8 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | // distinguish between simple collection browsing and actual searching within the collection(s) |
| 281 | - if(!empty($collectionsQueryString)) { |
|
| 282 | - if(empty($searchParams['query'])) { |
|
| 281 | + if (!empty($collectionsQueryString)) { |
|
| 282 | + if (empty($searchParams['query'])) { |
|
| 283 | 283 | $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . ') AND toplevel:true AND partof:0)'; |
| 284 | 284 | } else { |
| 285 | 285 | $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . '))'; |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | // virtual collections might query documents that are neither toplevel:true nor partof:0 and need to be searched separatly |
| 290 | - if(!empty($virtualCollectionsQueryString)) { |
|
| 290 | + if (!empty($virtualCollectionsQueryString)) { |
|
| 291 | 291 | $virtualCollectionsQueryString = '(' . $virtualCollectionsQueryString . ')'; |
| 292 | 292 | } |
| 293 | 293 | |