We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | } |
@@ -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'])) { |
@@ -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, ','); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | * @return void |
| 454 | 454 | */ |
| 455 | 455 | private function addAuthorToAutocomplete($author) { |
| 456 | - if ($author != NULL && !(in_array($author, $this->authors))) { |
|
| 456 | + if ($author != null && !(in_array($author, $this->authors))) { |
|
| 457 | 457 | // additional check if actually not more than 1 author is included |
| 458 | 458 | if (strpos($author, ',') !== false) { |
| 459 | 459 | $authors = explode(",", $author); |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | * @return void |
| 490 | 490 | */ |
| 491 | 491 | private function addTitleToAutocomplete($title) { |
| 492 | - if (!(in_array($title, $this->titles)) && $title != NULL) { |
|
| 492 | + if (!(in_array($title, $this->titles)) && $title != null) { |
|
| 493 | 493 | $this->titles[] = $title; |
| 494 | 494 | } |
| 495 | 495 | } |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | if (!empty($entry[0]['children'])) { |
| 509 | 509 | foreach ($entry[0]['children'] as $child) { |
| 510 | 510 | $type = $this->getType($child); |
| 511 | - if (!(in_array($type, $types)) && $type != NULL) { |
|
| 511 | + if (!(in_array($type, $types)) && $type != null) { |
|
| 512 | 512 | $types[$index] = $type; |
| 513 | 513 | $index++; |
| 514 | 514 | } |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | if (!empty($entry[0]['children'])) { |
| 549 | 549 | foreach ($entry[0]['children'] as $child) { |
| 550 | 550 | $software = $this->getSoftware($child); |
| 551 | - if (!(in_array($software, $softwares)) && $software != NULL) { |
|
| 551 | + if (!(in_array($software, $softwares)) && $software != null) { |
|
| 552 | 552 | $softwares[$index] = $software; |
| 553 | 553 | $index++; |
| 554 | 554 | } |