We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -20,7 +20,9 @@ discard block |
||
| 20 | 20 | $this->limit = count($solrSearch); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function getSource() {} |
|
| 23 | + public function getSource() |
|
| 24 | + { |
|
| 25 | +} |
|
| 24 | 26 | |
| 25 | 27 | public function execute($returnRawQueryResult = false) |
| 26 | 28 | { |
@@ -35,7 +37,9 @@ discard block |
||
| 35 | 37 | return $result; |
| 36 | 38 | } |
| 37 | 39 | |
| 38 | - public function setOrderings(array $orderings) {} |
|
| 40 | + public function setOrderings(array $orderings) |
|
| 41 | + { |
|
| 42 | +} |
|
| 39 | 43 | |
| 40 | 44 | public function setLimit($limit) |
| 41 | 45 | { |
@@ -49,28 +53,60 @@ discard block |
||
| 49 | 53 | return $this; |
| 50 | 54 | } |
| 51 | 55 | |
| 52 | - public function matching($constraint) {} |
|
| 53 | - public function logicalAnd($constraint1) {} |
|
| 54 | - public function logicalOr($constraint1) {} |
|
| 55 | - public function logicalNot(ConstraintInterface $constraint) {} |
|
| 56 | - public function equals($propertyName, $operand, $caseSensitive = true) {} |
|
| 57 | - public function like($propertyName, $operand) {} |
|
| 58 | - public function contains($propertyName, $operand) {} |
|
| 59 | - public function in($propertyName, $operand) {} |
|
| 60 | - public function lessThan($propertyName, $operand) {} |
|
| 61 | - public function lessThanOrEqual($propertyName, $operand) {} |
|
| 62 | - public function greaterThan($propertyName, $operand) {} |
|
| 63 | - public function greaterThanOrEqual($propertyName, $operand) {} |
|
| 64 | - public function getType() {} |
|
| 65 | - public function setQuerySettings(QuerySettingsInterface $querySettings) {} |
|
| 66 | - public function getQuerySettings() {} |
|
| 56 | + public function matching($constraint) |
|
| 57 | + { |
|
| 58 | +} |
|
| 59 | + public function logicalAnd($constraint1) |
|
| 60 | + { |
|
| 61 | +} |
|
| 62 | + public function logicalOr($constraint1) |
|
| 63 | + { |
|
| 64 | +} |
|
| 65 | + public function logicalNot(ConstraintInterface $constraint) |
|
| 66 | + { |
|
| 67 | +} |
|
| 68 | + public function equals($propertyName, $operand, $caseSensitive = true) |
|
| 69 | + { |
|
| 70 | +} |
|
| 71 | + public function like($propertyName, $operand) |
|
| 72 | + { |
|
| 73 | +} |
|
| 74 | + public function contains($propertyName, $operand) |
|
| 75 | + { |
|
| 76 | +} |
|
| 77 | + public function in($propertyName, $operand) |
|
| 78 | + { |
|
| 79 | +} |
|
| 80 | + public function lessThan($propertyName, $operand) |
|
| 81 | + { |
|
| 82 | +} |
|
| 83 | + public function lessThanOrEqual($propertyName, $operand) |
|
| 84 | + { |
|
| 85 | +} |
|
| 86 | + public function greaterThan($propertyName, $operand) |
|
| 87 | + { |
|
| 88 | +} |
|
| 89 | + public function greaterThanOrEqual($propertyName, $operand) |
|
| 90 | + { |
|
| 91 | +} |
|
| 92 | + public function getType() |
|
| 93 | + { |
|
| 94 | +} |
|
| 95 | + public function setQuerySettings(QuerySettingsInterface $querySettings) |
|
| 96 | + { |
|
| 97 | +} |
|
| 98 | + public function getQuerySettings() |
|
| 99 | + { |
|
| 100 | +} |
|
| 67 | 101 | |
| 68 | 102 | public function count() |
| 69 | 103 | { |
| 70 | 104 | // TODO? |
| 71 | 105 | } |
| 72 | 106 | |
| 73 | - public function getOrderings() {} |
|
| 107 | + public function getOrderings() |
|
| 108 | + { |
|
| 109 | +} |
|
| 74 | 110 | |
| 75 | 111 | public function getLimit() |
| 76 | 112 | { |
@@ -82,8 +118,16 @@ discard block |
||
| 82 | 118 | return $this->offset; |
| 83 | 119 | } |
| 84 | 120 | |
| 85 | - public function getConstraint() {} |
|
| 86 | - public function isEmpty($propertyName) {} |
|
| 87 | - public function setSource(SourceInterface $source) {} |
|
| 88 | - public function getStatement() {} |
|
| 121 | + public function getConstraint() |
|
| 122 | + { |
|
| 123 | +} |
|
| 124 | + public function isEmpty($propertyName) |
|
| 125 | + { |
|
| 126 | +} |
|
| 127 | + public function setSource(SourceInterface $source) |
|
| 128 | + { |
|
| 129 | +} |
|
| 130 | + public function getStatement() |
|
| 131 | + { |
|
| 132 | +} |
|
| 89 | 133 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | foreach ($year['children'] as $month) { |
| 130 | 130 | foreach ($month['children'] as $day) { |
| 131 | 131 | foreach ($day['children'] as $issue) { |
| 132 | - $title = $issue['label'] ?: $issue['orderlabel']; |
|
| 132 | + $title = $issue['label'] ? : $issue['orderlabel']; |
|
| 133 | 133 | if (strtotime($title) !== false) { |
| 134 | 134 | $title = strftime('%x', strtotime($title)); |
| 135 | 135 | } |
@@ -220,8 +220,8 @@ discard block |
||
| 220 | 220 | $this->view->assign('calendarData', $calendarData); |
| 221 | 221 | $this->view->assign('documentId', $this->document->getUid()); |
| 222 | 222 | $this->view->assign('yearLinkTitle', $yearLinkTitle); |
| 223 | - $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getDoc()->tableOfContents[0]['points']); |
|
| 224 | - $this->view->assign('allYearDocTitle', $this->document->getDoc()->getTitle($this->document->getPartof()) ?: $this->document->getDoc()->tableOfContents[0]['label']); |
|
| 223 | + $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getDoc()->tableOfContents[0]['points']); |
|
| 224 | + $this->view->assign('allYearDocTitle', $this->document->getDoc()->getTitle($this->document->getPartof()) ? : $this->document->getDoc()->tableOfContents[0]['label']); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | |
| 258 | 258 | if (empty($yearLabel)) { |
| 259 | 259 | // if neither order nor orderlabel is set, use the id... |
| 260 | - $yearLabel = (string)$id; |
|
| 260 | + $yearLabel = (string) $id; |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | $years[] = [ |
@@ -58,7 +58,8 @@ |
||
| 58 | 58 | * |
| 59 | 59 | * @return void |
| 60 | 60 | */ |
| 61 | - public function getTyposcriptConfigFromPluginSiteRoot($params) { |
|
| 61 | + public function getTyposcriptConfigFromPluginSiteRoot($params) |
|
| 62 | + { |
|
| 62 | 63 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 63 | 64 | $pid = $params['flexParentDatabaseRow']['pid']; |
| 64 | 65 | $rootline = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($pid); |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | return $this->isLicenceFound($entry); |
| 404 | 404 | } else if (!empty($this->requestData['type'])) { |
| 405 | 405 | return $this->isTypeFound($entry); |
| 406 | - } else if (!empty($this->requestData['type'])) { |
|
| 406 | + } else if (!empty($this->requestData['type'])) { |
|
| 407 | 407 | return $this->isSoftwareFound($entry); |
| 408 | 408 | } else { |
| 409 | 409 | // no parameters so entry is matching |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | private function getSoftware($entry) { |
| 572 | 572 | $software = $entry['software']; |
| 573 | 573 | if (!empty($software)) { |
| 574 | - return strtok($software, ',');; |
|
| 574 | + return strtok($software, ','); ; |
|
| 575 | 575 | } |
| 576 | 576 | return $software; |
| 577 | 577 | } |
@@ -386,7 +386,8 @@ discard block |
||
| 386 | 386 | * |
| 387 | 387 | * @return bool true if found, false otherwise |
| 388 | 388 | */ |
| 389 | - private function isFound($entry) { |
|
| 389 | + private function isFound($entry) |
|
| 390 | + { |
|
| 390 | 391 | if (!empty($this->requestData['title'] && !empty($this->requestData['type']) && !empty($this->requestData['author']))) { |
| 391 | 392 | return $this->isTitleFound($entry) && $this->isTypeFound($entry) && $this->isAuthorFound($entry); |
| 392 | 393 | } else if (!empty($this->requestData['title']) && !empty($this->requestData['author'])) { |
@@ -403,7 +404,7 @@ discard block |
||
| 403 | 404 | return $this->isLicenceFound($entry); |
| 404 | 405 | } else if (!empty($this->requestData['type'])) { |
| 405 | 406 | return $this->isTypeFound($entry); |
| 406 | - } else if (!empty($this->requestData['type'])) { |
|
| 407 | + } else if (!empty($this->requestData['type'])) { |
|
| 407 | 408 | return $this->isSoftwareFound($entry); |
| 408 | 409 | } else { |
| 409 | 410 | // no parameters so entry is matching |
@@ -418,7 +419,8 @@ discard block |
||
| 418 | 419 | * |
| 419 | 420 | * @return bool true if found, false otherwise |
| 420 | 421 | */ |
| 421 | - private function isAuthorFound($entry) { |
|
| 422 | + private function isAuthorFound($entry) |
|
| 423 | + { |
|
| 422 | 424 | $value = strtolower($entry['author']); |
| 423 | 425 | $author = strtolower($this->requestData['author']); |
| 424 | 426 | return str_contains($value, $author); |
@@ -431,7 +433,8 @@ discard block |
||
| 431 | 433 | * |
| 432 | 434 | * @return bool true if found, false otherwise |
| 433 | 435 | */ |
| 434 | - private function isTitleFound($entry) { |
|
| 436 | + private function isTitleFound($entry) |
|
| 437 | + { |
|
| 435 | 438 | $value = strtolower($entry['label']); |
| 436 | 439 | $title = strtolower($this->requestData['title']); |
| 437 | 440 | return str_contains($value, $title); |
@@ -444,7 +447,8 @@ discard block |
||
| 444 | 447 | * |
| 445 | 448 | * @return bool true if found, false otherwise |
| 446 | 449 | */ |
| 447 | - private function isTypeFound($entry) { |
|
| 450 | + private function isTypeFound($entry) |
|
| 451 | + { |
|
| 448 | 452 | return str_contains($entry['identifier'], $this->requestData['types']); |
| 449 | 453 | } |
| 450 | 454 | |
@@ -455,7 +459,8 @@ discard block |
||
| 455 | 459 | * |
| 456 | 460 | * @return void |
| 457 | 461 | */ |
| 458 | - private function addAuthorToAutocomplete($author) { |
|
| 462 | + private function addAuthorToAutocomplete($author) |
|
| 463 | + { |
|
| 459 | 464 | if ($author != NULL && !(in_array($author, $this->authors))) { |
| 460 | 465 | // additional check if actually not more than 1 author is included |
| 461 | 466 | if (strpos($author, ',') !== false) { |
@@ -476,8 +481,10 @@ discard block |
||
| 476 | 481 | * |
| 477 | 482 | * @return void |
| 478 | 483 | */ |
| 479 | - private function sortAuthors() { |
|
| 480 | - usort($this->authors, function($firstAuthor, $secondAuthor) { |
|
| 484 | + private function sortAuthors() |
|
| 485 | + { |
|
| 486 | + usort($this->authors, function($firstAuthor, $secondAuthor) |
|
| 487 | + { |
|
| 481 | 488 | $firstAuthor = substr(strrchr($firstAuthor, ' '), 1); |
| 482 | 489 | $secondAuthor = substr(strrchr($secondAuthor, ' '), 1); |
| 483 | 490 | return strcmp($firstAuthor, $secondAuthor); |
@@ -491,7 +498,8 @@ discard block |
||
| 491 | 498 | * |
| 492 | 499 | * @return void |
| 493 | 500 | */ |
| 494 | - private function addTitleToAutocomplete($title) { |
|
| 501 | + private function addTitleToAutocomplete($title) |
|
| 502 | + { |
|
| 495 | 503 | if (!(in_array($title, $this->titles)) && $title != NULL) { |
| 496 | 504 | $this->titles[] = $title; |
| 497 | 505 | } |
@@ -504,7 +512,8 @@ discard block |
||
| 504 | 512 | * |
| 505 | 513 | * @return array of object types |
| 506 | 514 | */ |
| 507 | - private function getTypes($entry) { |
|
| 515 | + private function getTypes($entry) |
|
| 516 | + { |
|
| 508 | 517 | $types = []; |
| 509 | 518 | $index = 0; |
| 510 | 519 | |
@@ -528,7 +537,8 @@ discard block |
||
| 528 | 537 | * |
| 529 | 538 | * @return string type name without number |
| 530 | 539 | */ |
| 531 | - private function getType($entry) { |
|
| 540 | + private function getType($entry) |
|
| 541 | + { |
|
| 532 | 542 | $type = $entry['identifier']; |
| 533 | 543 | if (!empty($type)) { |
| 534 | 544 | $temp = strtok($type, ','); |
@@ -544,7 +554,8 @@ discard block |
||
| 544 | 554 | * |
| 545 | 555 | * @return array of object softwares |
| 546 | 556 | */ |
| 547 | - private function getSoftwares($entry) { |
|
| 557 | + private function getSoftwares($entry) |
|
| 558 | + { |
|
| 548 | 559 | $softwares = []; |
| 549 | 560 | $index = 0; |
| 550 | 561 | |
@@ -568,7 +579,8 @@ discard block |
||
| 568 | 579 | * |
| 569 | 580 | * @return string software name split by commas |
| 570 | 581 | */ |
| 571 | - private function getSoftware($entry) { |
|
| 582 | + private function getSoftware($entry) |
|
| 583 | + { |
|
| 572 | 584 | $software = $entry['software']; |
| 573 | 585 | if (!empty($software)) { |
| 574 | 586 | return strtok($software, ',');; |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | $entryArray['doNotLinkIt'] = 1; |
| 341 | 341 | $entryArray['ITEM_STATE'] = 'HEADER'; |
| 342 | 342 | |
| 343 | - if ($entry['children'] == NULL) { |
|
| 343 | + if ($entry['children'] == null) { |
|
| 344 | 344 | $entryArray['description'] = $entry['description']; |
| 345 | 345 | $entryArray['identifier'] = $entry['identifier']; |
| 346 | 346 | $id = str_replace("LOG", "PHYS", $entry['id']); |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | * @return void |
| 457 | 457 | */ |
| 458 | 458 | private function addAuthorToAutocomplete($author) { |
| 459 | - if ($author != NULL && !(in_array($author, $this->authors))) { |
|
| 459 | + if ($author != null && !(in_array($author, $this->authors))) { |
|
| 460 | 460 | // additional check if actually not more than 1 author is included |
| 461 | 461 | if (strpos($author, ',') !== false) { |
| 462 | 462 | $authors = explode(",", $author); |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | * @return void |
| 493 | 493 | */ |
| 494 | 494 | private function addTitleToAutocomplete($title) { |
| 495 | - if (!(in_array($title, $this->titles)) && $title != NULL) { |
|
| 495 | + if (!(in_array($title, $this->titles)) && $title != null) { |
|
| 496 | 496 | $this->titles[] = $title; |
| 497 | 497 | } |
| 498 | 498 | } |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | if (!empty($entry[0]['children'])) { |
| 512 | 512 | foreach ($entry[0]['children'] as $child) { |
| 513 | 513 | $type = $this->getType($child); |
| 514 | - if (!(in_array($type, $types)) && $type != NULL) { |
|
| 514 | + if (!(in_array($type, $types)) && $type != null) { |
|
| 515 | 515 | $types[$index] = $type; |
| 516 | 516 | $index++; |
| 517 | 517 | } |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | if (!empty($entry[0]['children'])) { |
| 552 | 552 | foreach ($entry[0]['children'] as $child) { |
| 553 | 553 | $software = $this->getSoftware($child); |
| 554 | - if (!(in_array($software, $softwares)) && $software != NULL) { |
|
| 554 | + if (!(in_array($software, $softwares)) && $software != null) { |
|
| 555 | 555 | $softwares[$index] = $software; |
| 556 | 556 | $index++; |
| 557 | 557 | } |