@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class SuggestBuildAdditionalFieldProvider extends BaseAdditionalFieldProvider |
|
| 29 | -{ |
|
| 28 | +class SuggestBuildAdditionalFieldProvider extends BaseAdditionalFieldProvider { |
|
| 30 | 29 | /** |
| 31 | 30 | * Gets additional fields to render in the form to add/edit a task |
| 32 | 31 | * |
@@ -35,8 +34,7 @@ discard block |
||
| 35 | 34 | * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module |
| 36 | 35 | * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => '')) |
| 37 | 36 | */ |
| 38 | - public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) |
|
| 39 | - { |
|
| 37 | + public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) { |
|
| 40 | 38 | $currentSchedulerModuleAction = $schedulerModule->getCurrentAction(); |
| 41 | 39 | |
| 42 | 40 | /** @var BaseTask $task */ |
@@ -23,10 +23,8 @@ |
||
| 23 | 23 | * |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class SuggestBuildTask extends BaseTask |
|
| 27 | -{ |
|
| 28 | - public function execute() |
|
| 29 | - { |
|
| 26 | +class SuggestBuildTask extends BaseTask { |
|
| 27 | + public function execute() { |
|
| 30 | 28 | $inputArray = []; |
| 31 | 29 | $inputArray['-s'] = $this->solr; |
| 32 | 30 | |
@@ -27,8 +27,7 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @access public |
| 29 | 29 | */ |
| 30 | -class SuggestBuildCommand extends Command |
|
| 31 | -{ |
|
| 30 | +class SuggestBuildCommand extends Command { |
|
| 32 | 31 | |
| 33 | 32 | /** |
| 34 | 33 | * Configure the command by defining the name, options and arguments |
@@ -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 | // check whether any result elements are available |
| 789 | 770 | if (empty($documentListSet) || empty($documentListSet['elements'])) { |
| 790 | 771 | $this->error = 'noRecordsMatch'; |
@@ -839,8 +820,7 @@ discard block |
||
| 839 | 820 | * |
| 840 | 821 | * @return void |
| 841 | 822 | */ |
| 842 | - protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) |
|
| 843 | - { |
|
| 823 | + protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) { |
|
| 844 | 824 | // The cursor specifies how many elements have already been returned in previous requests |
| 845 | 825 | // See http://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl |
| 846 | 826 | $currentCursor = $documentListSet['metadata']['cursor']; |