We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $entryArray['doNotLinkIt'] = 1; |
| 319 | 319 | $entryArray['ITEM_STATE'] = 'HEADER'; |
| 320 | 320 | |
| 321 | - if ($entry['children'] == NULL) { |
|
| 321 | + if ($entry['children'] == null) { |
|
| 322 | 322 | $entryArray['description'] = $entry['description']; |
| 323 | 323 | $entryArray['identifier'] = $entry['identifier']; |
| 324 | 324 | $id = str_replace("LOG", "PHYS", $entry['id']); |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | * @return void |
| 431 | 431 | */ |
| 432 | 432 | private function addAuthorToAutocomplete($author) { |
| 433 | - if ($author != NULL && !(in_array($author, $this->authors))) { |
|
| 433 | + if ($author != null && !(in_array($author, $this->authors))) { |
|
| 434 | 434 | // additional check if actually not more than 1 author is included |
| 435 | 435 | if (strpos($author, ',') !== false) { |
| 436 | 436 | $authors = explode(",", $author); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | * @return void |
| 454 | 454 | */ |
| 455 | 455 | private function addTitleToAutocomplete($title) { |
| 456 | - if (!(in_array($title, $this->titles)) && $title != NULL) { |
|
| 456 | + if (!(in_array($title, $this->titles)) && $title != null) { |
|
| 457 | 457 | $this->titles[] = $title; |
| 458 | 458 | } |
| 459 | 459 | } |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | if (!empty($entry[0]['children'])) { |
| 473 | 473 | foreach ($entry[0]['children'] as $child) { |
| 474 | 474 | $type = $this->getType($child); |
| 475 | - if (!(in_array($type, $types)) && $type != NULL) { |
|
| 475 | + if (!(in_array($type, $types)) && $type != null) { |
|
| 476 | 476 | $types[$index] = $type; |
| 477 | 477 | $index++; |
| 478 | 478 | } |
@@ -385,7 +385,8 @@ discard block |
||
| 385 | 385 | * |
| 386 | 386 | * @return bool true if found, false otherwise |
| 387 | 387 | */ |
| 388 | - private function isFound($entry) { |
|
| 388 | + private function isFound($entry) |
|
| 389 | + { |
|
| 389 | 390 | if (!empty($this->requestData['title'] && !empty($this->requestData['types']) && !empty($this->requestData['author']))) { |
| 390 | 391 | return $this->isTitleFound($entry) && $this->isTypeFound($entry) && $this->isAuthorFound($entry); |
| 391 | 392 | } else if (!empty($this->requestData['title']) && !empty($this->requestData['author'])) { |
@@ -413,7 +414,8 @@ discard block |
||
| 413 | 414 | * |
| 414 | 415 | * @return bool true if found, false otherwise |
| 415 | 416 | */ |
| 416 | - private function isAuthorFound($entry) { |
|
| 417 | + private function isAuthorFound($entry) |
|
| 418 | + { |
|
| 417 | 419 | $value = strtolower($entry['author']); |
| 418 | 420 | $author = strtolower($this->requestData['author']); |
| 419 | 421 | return str_contains($value, $author); |
@@ -426,7 +428,8 @@ discard block |
||
| 426 | 428 | * |
| 427 | 429 | * @return bool true if found, false otherwise |
| 428 | 430 | */ |
| 429 | - private function isTitleFound($entry) { |
|
| 431 | + private function isTitleFound($entry) |
|
| 432 | + { |
|
| 430 | 433 | $value = strtolower($entry['label']); |
| 431 | 434 | $title = strtolower($this->requestData['title']); |
| 432 | 435 | return str_contains($value, $title); |
@@ -439,7 +442,8 @@ discard block |
||
| 439 | 442 | * |
| 440 | 443 | * @return bool true if found, false otherwise |
| 441 | 444 | */ |
| 442 | - private function isTypeFound($entry) { |
|
| 445 | + private function isTypeFound($entry) |
|
| 446 | + { |
|
| 443 | 447 | return str_contains($entry['identifier'], $this->requestData['types']); |
| 444 | 448 | } |
| 445 | 449 | |
@@ -450,7 +454,8 @@ discard block |
||
| 450 | 454 | * |
| 451 | 455 | * @return void |
| 452 | 456 | */ |
| 453 | - private function addAuthorToAutocomplete($author) { |
|
| 457 | + private function addAuthorToAutocomplete($author) |
|
| 458 | + { |
|
| 454 | 459 | if ($author != NULL && !(in_array($author, $this->authors))) { |
| 455 | 460 | // additional check if actually not more than 1 author is included |
| 456 | 461 | if (strpos($author, ',') !== false) { |
@@ -471,8 +476,10 @@ discard block |
||
| 471 | 476 | * |
| 472 | 477 | * @return void |
| 473 | 478 | */ |
| 474 | - private function sortAuthors() { |
|
| 475 | - usort($this->authors, function($a, $b) { |
|
| 479 | + private function sortAuthors() |
|
| 480 | + { |
|
| 481 | + usort($this->authors, function($a, $b) |
|
| 482 | + { |
|
| 476 | 483 | $a = substr(strrchr($a, ' '), 1); |
| 477 | 484 | $b = substr(strrchr($b, ' '), 1); |
| 478 | 485 | return strcmp($a, $b); |
@@ -486,7 +493,8 @@ discard block |
||
| 486 | 493 | * |
| 487 | 494 | * @return void |
| 488 | 495 | */ |
| 489 | - private function addTitleToAutocomplete($title) { |
|
| 496 | + private function addTitleToAutocomplete($title) |
|
| 497 | + { |
|
| 490 | 498 | if (!(in_array($title, $this->titles)) && $title != NULL) { |
| 491 | 499 | $this->titles[] = $title; |
| 492 | 500 | } |
@@ -499,7 +507,8 @@ discard block |
||
| 499 | 507 | * |
| 500 | 508 | * @return array of object types |
| 501 | 509 | */ |
| 502 | - private function getTypes($entry) { |
|
| 510 | + private function getTypes($entry) |
|
| 511 | + { |
|
| 503 | 512 | $types = []; |
| 504 | 513 | $index = 0; |
| 505 | 514 | |
@@ -523,7 +532,8 @@ discard block |
||
| 523 | 532 | * |
| 524 | 533 | * @return string type name without number |
| 525 | 534 | */ |
| 526 | - private function getType($entry) { |
|
| 535 | + private function getType($entry) |
|
| 536 | + { |
|
| 527 | 537 | $type = $entry['identifier']; |
| 528 | 538 | if (!empty($type)) { |
| 529 | 539 | 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 | } |