We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -364,7 +364,8 @@ discard block |
||
| 364 | 364 | * |
| 365 | 365 | * @return bool true if found, false otherwise |
| 366 | 366 | */ |
| 367 | - private function isFound($entry) { |
|
| 367 | + private function isFound($entry) |
|
| 368 | + { |
|
| 368 | 369 | if (!empty($this->requestData['title'] && !empty($this->requestData['types']) && !empty($this->requestData['author']))) { |
| 369 | 370 | return $this->isTitleFound($entry) && $this->isTypeFound($entry) && $this->isAuthorFound($entry); |
| 370 | 371 | } else if (!empty($this->requestData['title']) && !empty($this->requestData['author'])) { |
@@ -392,7 +393,8 @@ discard block |
||
| 392 | 393 | * |
| 393 | 394 | * @return bool true if found, false otherwise |
| 394 | 395 | */ |
| 395 | - private function isAuthorFound($entry) { |
|
| 396 | + private function isAuthorFound($entry) |
|
| 397 | + { |
|
| 396 | 398 | $value = strtolower($entry['author']); |
| 397 | 399 | $author = strtolower($this->requestData['author']); |
| 398 | 400 | return str_contains($value, $author); |
@@ -405,7 +407,8 @@ discard block |
||
| 405 | 407 | * |
| 406 | 408 | * @return bool true if found, false otherwise |
| 407 | 409 | */ |
| 408 | - private function isTitleFound($entry) { |
|
| 410 | + private function isTitleFound($entry) |
|
| 411 | + { |
|
| 409 | 412 | $value = strtolower($entry['label']); |
| 410 | 413 | $title = strtolower($this->requestData['title']); |
| 411 | 414 | return str_contains($value, $title); |
@@ -418,7 +421,8 @@ discard block |
||
| 418 | 421 | * |
| 419 | 422 | * @return bool true if found, false otherwise |
| 420 | 423 | */ |
| 421 | - private function isTypeFound($entry) { |
|
| 424 | + private function isTypeFound($entry) |
|
| 425 | + { |
|
| 422 | 426 | return str_contains($entry['identifier'], $this->requestData['types']); |
| 423 | 427 | } |
| 424 | 428 | |
@@ -429,7 +433,8 @@ discard block |
||
| 429 | 433 | * |
| 430 | 434 | * @return void |
| 431 | 435 | */ |
| 432 | - private function addAuthorToAutocomplete($author) { |
|
| 436 | + private function addAuthorToAutocomplete($author) |
|
| 437 | + { |
|
| 433 | 438 | if ($author != NULL && !(in_array($author, $this->authors))) { |
| 434 | 439 | // additional check if actually not more than 1 author is included |
| 435 | 440 | if (strpos($author, ',') !== false) { |
@@ -452,7 +457,8 @@ discard block |
||
| 452 | 457 | * |
| 453 | 458 | * @return void |
| 454 | 459 | */ |
| 455 | - private function addTitleToAutocomplete($title) { |
|
| 460 | + private function addTitleToAutocomplete($title) |
|
| 461 | + { |
|
| 456 | 462 | if (!(in_array($title, $this->titles)) && $title != NULL) { |
| 457 | 463 | $this->titles[] = $title; |
| 458 | 464 | } |
@@ -465,7 +471,8 @@ discard block |
||
| 465 | 471 | * |
| 466 | 472 | * @return array of object types |
| 467 | 473 | */ |
| 468 | - private function getTypes($entry) { |
|
| 474 | + private function getTypes($entry) |
|
| 475 | + { |
|
| 469 | 476 | $types = []; |
| 470 | 477 | $index = 0; |
| 471 | 478 | |
@@ -489,7 +496,8 @@ discard block |
||
| 489 | 496 | * |
| 490 | 497 | * @return string type name without number |
| 491 | 498 | */ |
| 492 | - private function getType($entry) { |
|
| 499 | + private function getType($entry) |
|
| 500 | + { |
|
| 493 | 501 | $type = $entry['identifier']; |
| 494 | 502 | if (!empty($type)) { |
| 495 | 503 | return strtok($type, ','); |
@@ -412,7 +412,8 @@ discard block |
||
| 412 | 412 | return $details; |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | - private function getLogicalStructureFor3D($details) { |
|
| 415 | + private function getLogicalStructureFor3D($details) |
|
| 416 | + { |
|
| 416 | 417 | // add description and identifier for 3D objects |
| 417 | 418 | if ($details['type'] == 'collection' || $details['type'] == 'object') { |
| 418 | 419 | $metadata = $this->getMetadata($details['id']); |
@@ -710,7 +711,8 @@ discard block |
||
| 710 | 711 | } |
| 711 | 712 | } |
| 712 | 713 | |
| 713 | - return array_filter($allMdIds, function ($element) { |
|
| 714 | + return array_filter($allMdIds, function ($element) |
|
| 715 | + { |
|
| 714 | 716 | return !empty($element); |
| 715 | 717 | }); |
| 716 | 718 | } |