@@ -116,12 +116,10 @@ |
||
| 116 | 116 | { |
| 117 | 117 | return new ExpressionFunction( |
| 118 | 118 | 'getDocumentType', |
| 119 | - function() |
|
| 120 | - { |
|
| 119 | + function() { |
|
| 121 | 120 | // Not implemented, we only use the evaluator |
| 122 | 121 | }, |
| 123 | - function($arguments, $cPid) |
|
| 124 | - { |
|
| 122 | + function($arguments, $cPid) { |
|
| 125 | 123 | /** @var RequestWrapper $requestWrapper */ |
| 126 | 124 | $requestWrapper = $arguments['request']; |
| 127 | 125 | $queryParams = $requestWrapper->getQueryParams(); |
@@ -18,15 +18,13 @@ |
||
| 18 | 18 | use TYPO3\CMS\Core\Pagination\PaginatorInterface; |
| 19 | 19 | |
| 20 | 20 | |
| 21 | -final class PageGridPagination implements PaginationInterface |
|
| 22 | -{ |
|
| 21 | +final class PageGridPagination implements PaginationInterface { |
|
| 23 | 22 | /** |
| 24 | 23 | * @var PageGridPaginator |
| 25 | 24 | */ |
| 26 | 25 | protected $paginator; |
| 27 | 26 | |
| 28 | - public function __construct(PaginatorInterface $paginator) |
|
| 29 | - { |
|
| 27 | + public function __construct(PaginatorInterface $paginator) { |
|
| 30 | 28 | // @phpstan-ignore-next-line |
| 31 | 29 | $this->paginator = $paginator; |
| 32 | 30 | } |
@@ -16,8 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | use TYPO3\CMS\Core\Pagination\AbstractPaginator; |
| 18 | 18 | |
| 19 | -final class PageGridPaginator extends AbstractPaginator |
|
| 20 | -{ |
|
| 19 | +final class PageGridPaginator extends AbstractPaginator { |
|
| 21 | 20 | /** |
| 22 | 21 | * @var array |
| 23 | 22 | */ |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class OaiPmhController extends AbstractController |
|
| 30 | -{ |
|
| 29 | +class OaiPmhController extends AbstractController { |
|
| 31 | 30 | /** |
| 32 | 31 | * @access protected |
| 33 | 32 | * @var TokenRepository |
@@ -41,8 +40,7 @@ discard block |
||
| 41 | 40 | * |
| 42 | 41 | * @return void |
| 43 | 42 | */ |
| 44 | - public function injectTokenRepository(TokenRepository $tokenRepository) |
|
| 45 | - { |
|
| 43 | + public function injectTokenRepository(TokenRepository $tokenRepository) { |
|
| 46 | 44 | $this->tokenRepository = $tokenRepository; |
| 47 | 45 | } |
| 48 | 46 | |
@@ -59,8 +57,7 @@ discard block |
||
| 59 | 57 | * |
| 60 | 58 | * @return void |
| 61 | 59 | */ |
| 62 | - public function injectCollectionRepository(CollectionRepository $collectionRepository) |
|
| 63 | - { |
|
| 60 | + public function injectCollectionRepository(CollectionRepository $collectionRepository) { |
|
| 64 | 61 | $this->collectionRepository = $collectionRepository; |
| 65 | 62 | } |
| 66 | 63 | |
@@ -77,8 +74,7 @@ discard block |
||
| 77 | 74 | * |
| 78 | 75 | * @return void |
| 79 | 76 | */ |
| 80 | - public function injectLibraryRepository(LibraryRepository $libraryRepository) |
|
| 81 | - { |
|
| 77 | + public function injectLibraryRepository(LibraryRepository $libraryRepository) { |
|
| 82 | 78 | $this->libraryRepository = $libraryRepository; |
| 83 | 79 | } |
| 84 | 80 | |
@@ -89,8 +85,7 @@ discard block |
||
| 89 | 85 | * |
| 90 | 86 | * @return void |
| 91 | 87 | */ |
| 92 | - public function initializeAction() |
|
| 93 | - { |
|
| 88 | + public function initializeAction() { |
|
| 94 | 89 | $this->request->setFormat('xml'); |
| 95 | 90 | } |
| 96 | 91 | |
@@ -135,8 +130,7 @@ discard block |
||
| 135 | 130 | * |
| 136 | 131 | * @return void |
| 137 | 132 | */ |
| 138 | - protected function deleteExpiredTokens() |
|
| 139 | - { |
|
| 133 | + protected function deleteExpiredTokens() { |
|
| 140 | 134 | // Delete expired resumption tokens. |
| 141 | 135 | $this->tokenRepository->deleteExpiredTokens($this->settings['expired']); |
| 142 | 136 | } |
@@ -148,8 +142,7 @@ discard block |
||
| 148 | 142 | * |
| 149 | 143 | * @return void |
| 150 | 144 | */ |
| 151 | - protected function getUrlParams() |
|
| 152 | - { |
|
| 145 | + protected function getUrlParams() { |
|
| 153 | 146 | $allowedParams = [ |
| 154 | 147 | 'verb', |
| 155 | 148 | 'identifier', |
@@ -179,8 +172,7 @@ discard block |
||
| 179 | 172 | * |
| 180 | 173 | * @return array The mapped metadata array |
| 181 | 174 | */ |
| 182 | - private function getDublinCoreData(array $record) |
|
| 183 | - { |
|
| 175 | + private function getDublinCoreData(array $record) { |
|
| 184 | 176 | $metadata = []; |
| 185 | 177 | |
| 186 | 178 | $metadata[] = ['dc:identifier' => $record['record_id']]; |
@@ -222,8 +214,7 @@ discard block |
||
| 222 | 214 | * |
| 223 | 215 | * @return void |
| 224 | 216 | */ |
| 225 | - private function addDublinCoreData(&$metadata, $key, $value) |
|
| 226 | - { |
|
| 217 | + private function addDublinCoreData(&$metadata, $key, $value) { |
|
| 227 | 218 | if (!empty($value)) { |
| 228 | 219 | $metadata[] = [$key => $value]; |
| 229 | 220 | } |
@@ -239,8 +230,7 @@ discard block |
||
| 239 | 230 | * |
| 240 | 231 | * @return string The fetched METS XML |
| 241 | 232 | */ |
| 242 | - protected function getMetsData(array $record) |
|
| 243 | - { |
|
| 233 | + protected function getMetsData(array $record) { |
|
| 244 | 234 | $mets = null; |
| 245 | 235 | // Load METS file. |
| 246 | 236 | $xml = new \DOMDocument(); |
@@ -265,8 +255,7 @@ discard block |
||
| 265 | 255 | * |
| 266 | 256 | * @return void |
| 267 | 257 | */ |
| 268 | - public function mainAction() |
|
| 269 | - { |
|
| 258 | + public function mainAction() { |
|
| 270 | 259 | // Get allowed GET and POST variables. |
| 271 | 260 | $this->getUrlParams(); |
| 272 | 261 | |
@@ -333,8 +322,7 @@ discard block |
||
| 333 | 322 | * |
| 334 | 323 | * @return void |
| 335 | 324 | */ |
| 336 | - protected function verbGetRecord() |
|
| 337 | - { |
|
| 325 | + protected function verbGetRecord() { |
|
| 338 | 326 | if (count($this->parameters) !== 3 || empty($this->parameters['metadataPrefix']) || empty($this->parameters['identifier'])) { |
| 339 | 327 | $this->error = 'badArgument'; |
| 340 | 328 | return; |
@@ -386,8 +374,7 @@ discard block |
||
| 386 | 374 | * |
| 387 | 375 | * @return void |
| 388 | 376 | */ |
| 389 | - protected function verbIdentify() |
|
| 390 | - { |
|
| 377 | + protected function verbIdentify() { |
|
| 391 | 378 | $library = $this->libraryRepository->findByUid($this->settings['library']); |
| 392 | 379 | |
| 393 | 380 | $oaiIdentifyInfo = []; |
@@ -436,8 +423,7 @@ discard block |
||
| 436 | 423 | * |
| 437 | 424 | * @return void |
| 438 | 425 | */ |
| 439 | - protected function verbListIdentifiers() |
|
| 440 | - { |
|
| 426 | + protected function verbListIdentifiers() { |
|
| 441 | 427 | // If we have a resumption token we can continue our work |
| 442 | 428 | if (!empty($this->parameters['resumptionToken'])) { |
| 443 | 429 | // "resumptionToken" is an exclusive argument. |
@@ -491,8 +477,7 @@ discard block |
||
| 491 | 477 | * |
| 492 | 478 | * @return void |
| 493 | 479 | */ |
| 494 | - protected function verbListMetadataFormats() |
|
| 495 | - { |
|
| 480 | + protected function verbListMetadataFormats() { |
|
| 496 | 481 | $resArray = []; |
| 497 | 482 | // check for the optional "identifier" parameter |
| 498 | 483 | if (isset($this->parameters['identifier'])) { |
@@ -524,8 +509,7 @@ discard block |
||
| 524 | 509 | * |
| 525 | 510 | * @return void |
| 526 | 511 | */ |
| 527 | - protected function verbListRecords() |
|
| 528 | - { |
|
| 512 | + protected function verbListRecords() { |
|
| 529 | 513 | // Check for invalid arguments. |
| 530 | 514 | if (!empty($this->parameters['resumptionToken'])) { |
| 531 | 515 | // "resumptionToken" is an exclusive argument. |
@@ -580,8 +564,7 @@ discard block |
||
| 580 | 564 | * |
| 581 | 565 | * @return void |
| 582 | 566 | */ |
| 583 | - protected function verbListSets() |
|
| 584 | - { |
|
| 567 | + protected function verbListSets() { |
|
| 585 | 568 | // It is required to set a oai_name inside the collection record to be shown in oai-pmh plugin. |
| 586 | 569 | $this->settings['hideEmptyOaiNames'] = true; |
| 587 | 570 | |
@@ -727,8 +710,7 @@ discard block |
||
| 727 | 710 | * |
| 728 | 711 | * @return array|false |
| 729 | 712 | */ |
| 730 | - private function getDate(string $dateType) |
|
| 731 | - { |
|
| 713 | + private function getDate(string $dateType) { |
|
| 732 | 714 | return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ?: strptime($this->parameters[$dateType], '%Y-%m-%d'); |
| 733 | 715 | } |
| 734 | 716 | |
@@ -783,8 +765,7 @@ discard block |
||
| 783 | 765 | * |
| 784 | 766 | * @return array of enriched records |
| 785 | 767 | */ |
| 786 | - protected function generateOutputForDocumentList(array $documentListSet) |
|
| 787 | - { |
|
| 768 | + protected function generateOutputForDocumentList(array $documentListSet) { |
|
| 788 | 769 | $documentsToProcess = array_splice($documentListSet['elements'], 0, (int) $this->settings['limit']); |
| 789 | 770 | if (empty($documentsToProcess)) { |
| 790 | 771 | $this->error = 'noRecordsMatch'; |
@@ -837,8 +818,7 @@ discard block |
||
| 837 | 818 | * |
| 838 | 819 | * @return void |
| 839 | 820 | */ |
| 840 | - protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) |
|
| 841 | - { |
|
| 821 | + protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) { |
|
| 842 | 822 | // The cursor specifies how many elements have already been returned in previous requests |
| 843 | 823 | // See http://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl |
| 844 | 824 | $currentCursor = $documentListSet['metadata']['cursor']; |
@@ -21,8 +21,7 @@ |
||
| 21 | 21 | * |
| 22 | 22 | * @access public |
| 23 | 23 | */ |
| 24 | -class StatisticsController extends AbstractController |
|
| 25 | -{ |
|
| 24 | +class StatisticsController extends AbstractController { |
|
| 26 | 25 | /** |
| 27 | 26 | * The main method of the plugin |
| 28 | 27 | * |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class AudioplayerController extends AbstractController |
|
| 28 | -{ |
|
| 27 | +class AudioplayerController extends AbstractController { |
|
| 29 | 28 | /** |
| 30 | 29 | * Holds the current audio file's URL, MIME type and optional label |
| 31 | 30 | * |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class ListViewController extends AbstractController |
|
| 28 | -{ |
|
| 27 | +class ListViewController extends AbstractController { |
|
| 29 | 28 | /** |
| 30 | 29 | * @access protected |
| 31 | 30 | * @var CollectionRepository |
@@ -22,8 +22,7 @@ |
||
| 22 | 22 | * |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class NavigationController extends AbstractController |
|
| 26 | -{ |
|
| 25 | +class NavigationController extends AbstractController { |
|
| 27 | 26 | /** |
| 28 | 27 | * Method to get the page select values and use them with cHash |
| 29 | 28 | * |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | * |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class PageGridController extends AbstractController |
|
| 27 | -{ |
|
| 26 | +class PageGridController extends AbstractController { |
|
| 28 | 27 | /** |
| 29 | 28 | * The main method of the plugin |
| 30 | 29 | * |