We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | $uid = max(intval($uid), 0); |
| 394 | 394 | if ( |
| 395 | 395 | !$uid |
| 396 | - || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_metadatasubentries','tx_dlf_structures', 'tx_dlf_solrcores']) |
|
| 396 | + || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_metadatasubentries', 'tx_dlf_structures', 'tx_dlf_solrcores']) |
|
| 397 | 397 | ) { |
| 398 | 398 | self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR); |
| 399 | 399 | return ''; |
@@ -915,7 +915,7 @@ discard block |
||
| 915 | 915 | self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING); |
| 916 | 916 | return false; |
| 917 | 917 | } |
| 918 | - $content = $response->getBody()->getContents(); |
|
| 918 | + $content = $response->getBody()->getContents(); |
|
| 919 | 919 | |
| 920 | 920 | return $content; |
| 921 | 921 | } |
@@ -617,11 +617,11 @@ discard block |
||
| 617 | 617 | { |
| 618 | 618 | $metadata[$resArray['index_name']][] = $subentries; |
| 619 | 619 | } else { |
| 620 | - $metadata[$resArray['index_name']][] = trim((string)$value->nodeValue); |
|
| 620 | + $metadata[$resArray['index_name']][] = trim((string) $value->nodeValue); |
|
| 621 | 621 | } |
| 622 | 622 | } |
| 623 | 623 | } elseif (!($values instanceof \DOMNodeList)) { |
| 624 | - $metadata[$resArray['index_name']] = [trim((string)$values->nodeValue)]; |
|
| 624 | + $metadata[$resArray['index_name']] = [trim((string) $values->nodeValue)]; |
|
| 625 | 625 | } |
| 626 | 626 | } |
| 627 | 627 | // Set default value if applicable. |
@@ -645,9 +645,9 @@ discard block |
||
| 645 | 645 | $values instanceof \DOMNodeList |
| 646 | 646 | && $values->length > 0 |
| 647 | 647 | ) { |
| 648 | - $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string)$values->item(0)->nodeValue); |
|
| 648 | + $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
| 649 | 649 | } elseif (!($values instanceof \DOMNodeList)) { |
| 650 | - $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string)$values); |
|
| 650 | + $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values); |
|
| 651 | 651 | } |
| 652 | 652 | } |
| 653 | 653 | if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) { |
@@ -688,10 +688,10 @@ discard block |
||
| 688 | 688 | ) { |
| 689 | 689 | $theseSubentries[$subentry['index_name']] = []; |
| 690 | 690 | foreach ($values as $value) { |
| 691 | - $theseSubentries[$subentry['index_name']][] = trim((string)$value->nodeValue); |
|
| 691 | + $theseSubentries[$subentry['index_name']][] = trim((string) $value->nodeValue); |
|
| 692 | 692 | } |
| 693 | 693 | } elseif (!($values instanceof \DOMNodeList)) { |
| 694 | - $theseSubentries[$subentry['index_name']] = [trim((string)$values->nodeValue)]; |
|
| 694 | + $theseSubentries[$subentry['index_name']] = [trim((string) $values->nodeValue)]; |
|
| 695 | 695 | } |
| 696 | 696 | } |
| 697 | 697 | // Set default value if applicable. |
@@ -613,8 +613,7 @@ discard block |
||
| 613 | 613 | ) { |
| 614 | 614 | $metadata[$resArray['index_name']] = []; |
| 615 | 615 | foreach ($values as $value) { |
| 616 | - if ($subentries = $this->getSubentries($allSubentries, $resArray['index_name'], $value)) |
|
| 617 | - { |
|
| 616 | + if ($subentries = $this->getSubentries($allSubentries, $resArray['index_name'], $value)) { |
|
| 618 | 617 | $metadata[$resArray['index_name']][] = $subentries; |
| 619 | 618 | } else { |
| 620 | 619 | $metadata[$resArray['index_name']][] = trim((string)$value->nodeValue); |
@@ -674,10 +673,8 @@ discard block |
||
| 674 | 673 | $domXPath = new \DOMXPath($parentNode->ownerDocument); |
| 675 | 674 | $this->registerNamespaces($domXPath); |
| 676 | 675 | $theseSubentries = []; |
| 677 | - foreach ($allSubentries as $subentry) |
|
| 678 | - { |
|
| 679 | - if ($subentry['parent_index_name'] == $parentIndex) |
|
| 680 | - { |
|
| 676 | + foreach ($allSubentries as $subentry) { |
|
| 677 | + if ($subentry['parent_index_name'] == $parentIndex) { |
|
| 681 | 678 | if ( |
| 682 | 679 | !empty($subentry['xpath']) |
| 683 | 680 | && ($values = $domXPath->evaluate($subentry['xpath'], $parentNode)) |
@@ -703,8 +700,7 @@ discard block |
||
| 703 | 700 | } |
| 704 | 701 | } |
| 705 | 702 | } |
| 706 | - if (empty($theseSubentries)) |
|
| 707 | - { |
|
| 703 | + if (empty($theseSubentries)) { |
|
| 708 | 704 | return false; |
| 709 | 705 | } |
| 710 | 706 | return $theseSubentries; |