Passed
Pull Request — master (#123)
by
unknown
04:33
created
Classes/Task/SuggestBuildAdditionalFieldProvider.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 */
Please login to merge, or discard this patch.
Classes/Task/SuggestBuildTask.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Classes/Command/SuggestBuildCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Classes/Controller/OaiPmhController.php 1 patch
Braces   +20 added lines, -40 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.
Classes/Validation/XmlSchemesValidator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,14 +24,12 @@
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class XmlSchemesValidator extends AbstractDlfValidator
28
-{
27
+class XmlSchemesValidator extends AbstractDlfValidator {
29 28
     use LibXmlTrait;
30 29
 
31 30
     private array $schemes;
32 31
 
33
-    public function __construct(array $configuration)
34
-    {
32
+    public function __construct(array $configuration) {
35 33
         parent::__construct(\DOMDocument::class);
36 34
         $this->schemes = $configuration;
37 35
     }
Please login to merge, or discard this patch.
Classes/Validation/DOMDocumentValidationStack.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,10 +22,8 @@
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class DOMDocumentValidationStack extends AbstractDlfValidationStack
26
-{
27
-    public function __construct(array $configuration)
28
-    {
25
+class DOMDocumentValidationStack extends AbstractDlfValidationStack {
26
+    public function __construct(array $configuration) {
29 27
         parent::__construct(\DOMDocument::class);
30 28
         $this->addValidators($configuration);
31 29
     }
Please login to merge, or discard this patch.
Classes/Validation/AbstractDlfValidator.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  *
30 30
  * @access public
31 31
  */
32
-abstract class AbstractDlfValidator extends AbstractValidator
33
-{
32
+abstract class AbstractDlfValidator extends AbstractValidator {
34 33
     use LoggerAwareTrait;
35 34
 
36 35
     protected string $valueClassName;
@@ -38,15 +37,13 @@  discard block
 block discarded – undo
38 37
     /**
39 38
      * @param $valueClassName string The class name of the value
40 39
      */
41
-    public function __construct(string $valueClassName)
42
-    {
40
+    public function __construct(string $valueClassName) {
43 41
         parent::__construct();
44 42
         $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class);
45 43
         $this->valueClassName = $valueClassName;
46 44
     }
47 45
 
48
-    public function validate($value)
49
-    {
46
+    public function validate($value) {
50 47
         if (!$value instanceof $this->valueClassName) {
51 48
             $this->logger->debug('Value must be an instance of ' . $this->valueClassName . '.');
52 49
             throw new InvalidArgumentException('Type of value is not valid.', 1723126505626);
Please login to merge, or discard this patch.
Classes/Validation/LibXmlTrait.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
  * LICENSE.txt file that was distributed with this source code.
15 15
  */
16 16
 
17
-trait LibXmlTrait
18
-{
17
+trait LibXmlTrait {
19 18
     /**
20 19
      * Add the errors from the libxml error buffer as validation error.
21 20
      *
Please login to merge, or discard this patch.
Classes/Validation/AbstractDlfValidationStack.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  *
27 27
  * @access public
28 28
  */
29
-abstract class AbstractDlfValidationStack extends AbstractDlfValidator
30
-{
29
+abstract class AbstractDlfValidationStack extends AbstractDlfValidator {
31 30
     use LoggerAwareTrait;
32 31
 
33 32
     const ITEM_KEY_TITLE = "title";
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
 
37 36
     protected array $validatorStack = [];
38 37
 
39
-    public function __construct(string $valueClassName)
40
-    {
38
+    public function __construct(string $valueClassName) {
41 39
         parent::__construct($valueClassName);
42 40
     }
43 41
 
Please login to merge, or discard this patch.