Passed
Pull Request — master (#173)
by
unknown
11:53
created
Classes/Controller/DocumentController.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                             // check if new document form has more field items as the existing form
353 353
                             if ($valueFieldCounter < $fieldCounter && !$checkFieldsForAdding) {
354 354
                                 // field added
355
-                                for ($i = count($valueField); $i < $fieldCounter;$i++) {
355
+                                for ($i = count($valueField); $i < $fieldCounter; $i++) {
356 356
                                     $returnArray['added'][] = $docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup][$keyRepeatGroup]->getItems()[$keyField][$i];
357 357
 
358 358
                                 }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
                     if ($valueGroupCounter < count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup])) {
365 365
                         // group added
366 366
                         $counter = count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup]);
367
-                        for ($i = $valueGroupCounter; $i < $counter;$i++) {
367
+                        for ($i = $valueGroupCounter; $i < $counter; $i++) {
368 368
                             $returnArray['added'][] = $docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup][$i];
369 369
                         }
370 370
                     }
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 
540 540
         $newDocument->setState(DocumentWorkflow::STATE_NEW_NONE);
541 541
 
542
-        $copyTitle = LocalizationUtility::translate("manager.workspace.title.copy", "dpf").$document->getTitle();
542
+        $copyTitle = LocalizationUtility::translate("manager.workspace.title.copy", "dpf") . $document->getTitle();
543 543
 
544 544
         $newDocument->setTitle($copyTitle);
545 545
 
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         }
676 676
 
677 677
         $this->editingLockService->lock(
678
-            ($document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid()),
678
+            ($document->getObjectIdentifier() ? $document->getObjectIdentifier() : $document->getUid()),
679 679
             $this->security->getUser()->getUid()
680 680
         );
681 681
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         $documentForm = $documentMapper->getDocumentForm($document);
736 736
 
737 737
         $this->view->assign('suggestMod', true);
738
-        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
738
+        $this->forward('edit', 'DocumentFormBackoffice', NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
739 739
     }
740 740
 
741 741
 
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
 
868 868
             if ($this->documentManager->update($document, $workflowTransition)) {
869 869
 
870
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.success';
870
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.success';
871 871
                 $this->flashMessage($document, $key, AbstractMessage::OK);
872 872
 
873 873
                 if ($this->security->getUser()->getUserRole() === Security::ROLE_LIBRARIAN) {
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 
897 897
                 $this->redirectToDocumentList();
898 898
             } else {
899
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.failure';
899
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.failure';
900 900
                 $this->flashMessage($document, $key, AbstractMessage::ERROR);
901 901
                 $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
902 902
             }
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
             if ($exception instanceof DPFExceptionInterface) {
908 908
                 $key = $exception->messageLanguageKey();
909 909
             } else {
910
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.failure';
910
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.failure';
911 911
             }
912 912
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
913 913
             $this->redirectToDocumentList();
Please login to merge, or discard this patch.
Braces   +17 added lines, -34 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
 /**
35 35
  * DocumentController
36 36
  */
37
-class DocumentController extends AbstractController
38
-{
37
+class DocumentController extends AbstractController {
39 38
 
40 39
     /**
41 40
      * documentRepository
@@ -134,8 +133,7 @@  discard block
 block discarded – undo
134 133
     /**
135 134
      * DocumentController constructor.
136 135
      */
137
-    public function __construct()
138
-    {
136
+    public function __construct() {
139 137
         parent::__construct();
140 138
 
141 139
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -150,8 +148,7 @@  discard block
 block discarded – undo
150 148
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
151 149
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
152 150
      */
153
-    public function logoutAction()
154
-    {
151
+    public function logoutAction() {
155 152
         $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
156 153
         $uri = $cObj->typolink_URL([
157 154
             'parameter' => $this->settings['loginPage'],
@@ -389,8 +386,7 @@  discard block
 block discarded – undo
389 386
      * @param string $reason
390 387
      * @return void
391 388
      */
392
-    public function discardAction(Document $document, $tstamp, $reason = NULL)
393
-    {
389
+    public function discardAction(Document $document, $tstamp, $reason = NULL) {
394 390
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DISCARD, $document)) {
395 391
             if (
396 392
                 $this->editingLockService->isLocked(
@@ -418,8 +414,7 @@  discard block
 block discarded – undo
418 414
      * @param string $reason
419 415
      * @return void
420 416
      */
421
-    public function postponeAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = NULL)
422
-    {
417
+    public function postponeAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = NULL) {
423 418
         if (!$this->authorizationChecker->isGranted(DocumentVoter::POSTPONE, $document)) {
424 419
             if (
425 420
                 $this->editingLockService->isLocked(
@@ -448,8 +443,7 @@  discard block
 block discarded – undo
448 443
      * @param integer $tstamp
449 444
      * @return void
450 445
      */
451
-    public function deleteLocallyAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
452
-    {
446
+    public function deleteLocallyAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
453 447
         if ($document->getObjectIdentifier()) {
454 448
             $voterAttribute = DocumentVoter::DELETE_WORKING_COPY;
455 449
         } else {
@@ -525,8 +519,7 @@  discard block
 block discarded – undo
525 519
      * @param Document $document
526 520
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
527 521
      */
528
-    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document)
529
-    {
522
+    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) {
530 523
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DUPLICATE, $document)) {
531 524
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.accessDenied';
532 525
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -587,8 +580,7 @@  discard block
 block discarded – undo
587 580
      * @param integer $tstamp
588 581
      * @return void
589 582
      */
590
-    public function releasePublishAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
591
-    {
583
+    public function releasePublishAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
592 584
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_PUBLISH, $document)) {
593 585
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.accessDenied';
594 586
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -608,8 +600,7 @@  discard block
 block discarded – undo
608 600
      * @param integer $tstamp
609 601
      * @return void
610 602
      */
611
-    public function releaseActivateAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
612
-    {
603
+    public function releaseActivateAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
613 604
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_ACTIVATE, $document)) {
614 605
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.accessDenied';
615 606
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -627,8 +618,7 @@  discard block
 block discarded – undo
627 618
      * @param \EWW\Dpf\Domain\Model\Document $document
628 619
      * @return void
629 620
      */
630
-    public function registerAction(\EWW\Dpf\Domain\Model\Document $document)
631
-    {
621
+    public function registerAction(\EWW\Dpf\Domain\Model\Document $document) {
632 622
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER, $document)) {
633 623
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
634 624
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -666,8 +656,7 @@  discard block
 block discarded – undo
666 656
      * @param \EWW\Dpf\Domain\Model\Document $document
667 657
      * @return void
668 658
      */
669
-    public function showDetailsAction(Document $document)
670
-    {
659
+    public function showDetailsAction(Document $document) {
671 660
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SHOW_DETAILS, $document)) {
672 661
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_showDetails.accessDenied';
673 662
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -698,8 +687,7 @@  discard block
 block discarded – undo
698 687
     }
699 688
 
700 689
 
701
-    public function cancelListTaskAction()
702
-    {
690
+    public function cancelListTaskAction() {
703 691
         $this->redirectToDocumentList();
704 692
     }
705 693
     
@@ -742,8 +730,7 @@  discard block
 block discarded – undo
742 730
     /**
743 731
      * initializeAction
744 732
      */
745
-    public function initializeAction()
746
-    {
733
+    public function initializeAction() {
747 734
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
748 735
 
749 736
         parent::initializeAction();
@@ -769,8 +756,7 @@  discard block
 block discarded – undo
769 756
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
770 757
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
771 758
      */
772
-    protected function redirectToDocumentList($message = null)
773
-    {
759
+    protected function redirectToDocumentList($message = null) {
774 760
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
775 761
 
776 762
         if ($redirectUri) {
@@ -785,8 +771,7 @@  discard block
 block discarded – undo
785 771
      *
786 772
      * @return mixed
787 773
      */
788
-    protected function getStoragePID()
789
-    {
774
+    protected function getStoragePID() {
790 775
         return $this->settings['persistence']['classes']['EWW\Dpf\Domain\Model\Document']['newRecordStoragePid'];
791 776
     }
792 777
 
@@ -797,8 +782,7 @@  discard block
 block discarded – undo
797 782
      * @param string $severity
798 783
      * @param string $defaultMessage
799 784
      */
800
-    protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity, $defaultMessage = "")
801
-    {
785
+    protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity, $defaultMessage = "") {
802 786
         // Show success or failure of the action in a flash message
803 787
         if ($document) {
804 788
             $args[] = $document->getTitle();
@@ -825,8 +809,7 @@  discard block
 block discarded – undo
825 809
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
826 810
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
827 811
      */
828
-    protected function updateDocument(\EWW\Dpf\Domain\Model\Document $document, $workflowTransition, $reason)
829
-    {
812
+    protected function updateDocument(\EWW\Dpf\Domain\Model\Document $document, $workflowTransition, $reason) {
830 813
         switch ($workflowTransition) {
831 814
             case DocumentWorkflow::TRANSITION_DISCARD:
832 815
                 $messageKeyPart = 'document_discard';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
44 44
      * @inject
45 45
      */
46
-    protected $documentRepository = null;
46
+    protected $documentRepository = NULL;
47 47
 
48 48
     /**
49 49
      * inputOptionListRepository
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @var \EWW\Dpf\Domain\Repository\InputOptionListRepository
52 52
      * @inject
53 53
      */
54
-    protected $inputOptionListRepository = null;
54
+    protected $inputOptionListRepository = NULL;
55 55
 
56 56
     /**
57 57
      * persistence manager
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @var \EWW\Dpf\Services\Document\EditingLockService
68 68
      * @inject
69 69
      */
70
-    protected $editingLockService = null;
70
+    protected $editingLockService = NULL;
71 71
 
72 72
     /**
73 73
      * documentValidator
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @var \EWW\Dpf\Domain\Repository\FileRepository
105 105
      * @inject
106 106
      */
107
-    protected $fileRepository = null;
107
+    protected $fileRepository = NULL;
108 108
 
109 109
 
110 110
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @var \EWW\Dpf\Domain\Repository\FrontendUserRepository
114 114
      * @inject
115 115
      */
116
-    protected $frontendUserRepository = null;
116
+    protected $frontendUserRepository = NULL;
117 117
 
118 118
     /**
119 119
      * documentManager
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      * @var \EWW\Dpf\Services\Document\DocumentManager
122 122
      * @inject
123 123
      */
124
-    protected $documentManager = null;
124
+    protected $documentManager = NULL;
125 125
 
126 126
     /**
127 127
      * bookmarkRepository
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
130 130
      * @inject
131 131
      */
132
-    protected $bookmarkRepository = null;
132
+    protected $bookmarkRepository = NULL;
133 133
 
134 134
     /**
135 135
      * DocumentController constructor.
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      * @param Document $document
196 196
      * @param bool $acceptAll
197 197
      */
198
-    public function acceptSuggestionAction(\EWW\Dpf\Domain\Model\Document $document, bool $acceptAll = true) {
198
+    public function acceptSuggestionAction(\EWW\Dpf\Domain\Model\Document $document, bool $acceptAll = TRUE) {
199 199
 
200 200
         $args = $this->request->getArguments();
201 201
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         if ($acceptAll) {
219 219
             // all changes are confirmed
220 220
             // copy suggest to origin document
221
-            $originDocument->copy($document, true);
221
+            $originDocument->copy($document, TRUE);
222 222
 
223 223
             if ($originDocument->getTransferStatus() == 'RESTORE') {
224 224
                 if ($originDocument->getObjectIdentifier()) {
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             $this->documentRepository->remove($document);
243 243
 
244 244
             // redirect to document
245
-            $this->redirect('showDetails', 'Document', null, ['document' => $originDocument]);
245
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $originDocument]);
246 246
         }
247 247
 
248 248
         $this->redirectToDocumentList();
@@ -293,11 +293,11 @@  discard block
 block discarded – undo
293 293
                 // groups
294 294
                 foreach ($valueRepeatPage->getItems() as $keyGroup => $valueGroup) {
295 295
 
296
-                    $checkFieldsForAdding = false;
296
+                    $checkFieldsForAdding = FALSE;
297 297
                     $valueGroupCounter = count($valueGroup);
298 298
 
299 299
                     if ($valueGroupCounter < count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup])) {
300
-                        $checkFieldsForAdding = true;
300
+                        $checkFieldsForAdding = TRUE;
301 301
                     }
302 302
 
303 303
                     foreach ($valueGroup as $keyRepeatGroup => $valueRepeatGroup) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                                 $valueFieldCounter = count($valueField);
311 311
 
312 312
                                 // check if group or field is not existing
313
-                                $notExisting = false;
313
+                                $notExisting = FALSE;
314 314
                                 try {
315 315
                                     $flag = 'page';
316 316
                                     $value2 = $docForm2->getItems()[$keyPage];
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                                     $value2 = $value2[$keyRepeatGroup]->getItems()[$keyField];
321 321
                                     $flag = 'field';
322 322
                                 } catch (\Throwable $t) {
323
-                                    $notExisting = true;
323
+                                    $notExisting = TRUE;
324 324
                                 }
325 325
 
326 326
                                 $item = NULL;
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_discard.accessDenied';
404 404
             }
405 405
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
406
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
406
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
407 407
             return FALSE;
408 408
         }
409 409
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_postpone.accessDenied';
433 433
             }
434 434
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
435
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
435
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
436 436
             return FALSE;
437 437
         }
438 438
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_deleteLocally.accessDenied';
469 469
             }
470 470
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
471
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
471
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
472 472
             return FALSE;
473 473
         }
474 474
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
         } else {
517 517
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_deleteLocally.failureNewVersion';
518 518
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
519
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
519
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
520 520
         }
521 521
     }
522 522
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DUPLICATE, $document)) {
531 531
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.accessDenied';
532 532
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
533
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
533
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
534 534
             return FALSE;
535 535
         }
536 536
 
@@ -592,11 +592,11 @@  discard block
 block discarded – undo
592 592
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_PUBLISH, $document)) {
593 593
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.accessDenied';
594 594
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
595
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
595
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
596 596
             return FALSE;
597 597
         }
598 598
 
599
-        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_PUBLISH, null);
599
+        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_PUBLISH, NULL);
600 600
 
601 601
     }
602 602
 
@@ -613,11 +613,11 @@  discard block
 block discarded – undo
613 613
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_ACTIVATE, $document)) {
614 614
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.accessDenied';
615 615
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
616
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
616
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
617 617
             return FALSE;
618 618
         }
619 619
 
620
-        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE, null);
620
+        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE, NULL);
621 621
 
622 622
     }
623 623
 
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER, $document)) {
633 633
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
634 634
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
635
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
635
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
636 636
         }
637 637
 
638
-        if (!$this->documentValidator->validate($document, false)) {
638
+        if (!$this->documentValidator->validate($document, FALSE)) {
639 639
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.missingValues';
640 640
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
641
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
641
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
642 642
         }
643 643
 
644 644
         $this->workflow->apply($document, \EWW\Dpf\Domain\Workflow\DocumentWorkflow::TRANSITION_REGISTER);
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 
658 658
         $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.success';
659 659
         $this->flashMessage($document, $key, AbstractMessage::OK);
660
-        $this->redirect('showDetails', 'Document', null, ['document' => $document]);
660
+        $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
661 661
     }
662 662
 
663 663
     /**
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
         }
691 691
 
692 692
         $mapper = $this->objectManager->get(DocumentMapper::class);
693
-        $documentForm = $mapper->getDocumentForm($document, false);
693
+        $documentForm = $mapper->getDocumentForm($document, FALSE);
694 694
 
695 695
         $this->view->assign('documentForm', $documentForm);
696 696
 
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SUGGEST_RESTORE, $document)) {
715 715
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_suggestRestore.accessDenied';
716 716
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
717
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
717
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
718 718
             return FALSE;
719 719
         }
720 720
 
@@ -734,8 +734,8 @@  discard block
 block discarded – undo
734 734
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
735 735
         $documentForm = $documentMapper->getDocumentForm($document);
736 736
 
737
-        $this->view->assign('suggestMod', true);
738
-        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
737
+        $this->view->assign('suggestMod', TRUE);
738
+        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => TRUE]);
739 739
     }
740 740
 
741 741
 
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
770 770
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
771 771
      */
772
-    protected function redirectToDocumentList($message = null)
772
+    protected function redirectToDocumentList($message = NULL)
773 773
     {
774 774
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
775 775
 
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
             $message,
813 813
             '',
814 814
             $severity,
815
-            true
815
+            TRUE
816 816
         );
817 817
     }
818 818
 
Please login to merge, or discard this patch.
Classes/Controller/DocumentFormBackofficeController.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
30 30
 
31
-class DocumentFormBackofficeController extends AbstractDocumentFormController
32
-{
31
+class DocumentFormBackofficeController extends AbstractDocumentFormController {
33 32
     /**
34 33
      * documentTransferManager
35 34
      *
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
     /**
72 71
      * DocumentController constructor.
73 72
      */
74
-    public function __construct()
75
-    {
73
+    public function __construct() {
76 74
         parent::__construct();
77 75
 
78 76
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -113,8 +111,7 @@  discard block
 block discarded – undo
113 111
      */
114 112
     public function editAction(
115 113
         \EWW\Dpf\Domain\Model\DocumentForm $documentForm, bool $suggestMod = false, $activeFileTab = false
116
-    )
117
-    {
114
+    ) {
118 115
         /** @var \EWW\Dpf\Domain\Model\Document $document */
119 116
         $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
120 117
 
@@ -161,8 +158,7 @@  discard block
 block discarded – undo
161 158
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
162 159
      * @param bool $restore
163 160
      */
164
-    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE)
165
-    {
161
+    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE) {
166 162
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
167 163
 
168 164
         $hasFilesFlag = true;
@@ -233,8 +229,7 @@  discard block
 block discarded – undo
233 229
     }
234 230
 
235 231
 
236
-    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm)
237
-    {
232
+    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm) {
238 233
         if ($this->request->getArgument('documentData')['suggestMod']) {
239 234
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
240 235
             $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
@@ -267,8 +262,7 @@  discard block
 block discarded – undo
267 262
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
268 263
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
269 264
      */
270
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null)
271
-    {
265
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null) {
272 266
         try {
273 267
             /** @var \EWW\Dpf\Domain\Model\Document $document */
274 268
             $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -415,8 +409,7 @@  discard block
 block discarded – undo
415 409
         }
416 410
     }
417 411
 
418
-    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm)
419
-    {
412
+    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) {
420 413
         /** @var \EWW\Dpf\Helper\DocumentMapper $documentMapper */
421 414
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
422 415
 
@@ -481,8 +474,7 @@  discard block
 block discarded – undo
481 474
      *
482 475
      * @return void
483 476
      */
484
-    public function cancelEditAction($documentUid = 0)
485
-    {
477
+    public function cancelEditAction($documentUid = 0) {
486 478
         if ($documentUid) {
487 479
             /** @var $document \EWW\Dpf\Domain\Model\Document */
488 480
             $document = $this->documentRepository->findByUid($documentUid);
@@ -501,14 +493,12 @@  discard block
 block discarded – undo
501 493
      *
502 494
      * @return void
503 495
      */
504
-    public function cancelNewAction()
505
-    {
496
+    public function cancelNewAction() {
506 497
         $this->redirect('list');
507 498
     }
508 499
 
509 500
 
510
-    public function initializeAction()
511
-    {
501
+    public function initializeAction() {
512 502
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
513 503
 
514 504
         parent::initializeAction();
@@ -522,8 +512,7 @@  discard block
 block discarded – undo
522 512
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
523 513
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
524 514
      */
525
-    protected function redirectToDocumentList($message = null)
526
-    {
515
+    protected function redirectToDocumentList($message = null) {
527 516
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
528 517
 
529 518
         if ($redirectUri) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @var \EWW\Dpf\Services\Document\EditingLockService
51 51
      * @inject
52 52
      */
53
-    protected $editingLockService = null;
53
+    protected $editingLockService = NULL;
54 54
 
55 55
     /**
56 56
      * documentManager
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @var \EWW\Dpf\Services\Document\DocumentManager
59 59
      * @inject
60 60
      */
61
-    protected $documentManager = null;
61
+    protected $documentManager = NULL;
62 62
 
63 63
     /**
64 64
      * bookmarkRepository
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
67 67
      * @inject
68 68
      */
69
-    protected $bookmarkRepository = null;
69
+    protected $bookmarkRepository = NULL;
70 70
 
71 71
     /**
72 72
      * DocumentController constructor.
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      * @return void
113 113
      */
114 114
     public function editAction(
115
-        \EWW\Dpf\Domain\Model\DocumentForm $documentForm, bool $suggestMod = false, $activeFileTab = false
115
+        \EWW\Dpf\Domain\Model\DocumentForm $documentForm, bool $suggestMod = FALSE, $activeFileTab = FALSE
116 116
     )
117 117
     {
118 118
         /** @var \EWW\Dpf\Domain\Model\Document $document */
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             }
142 142
 
143 143
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
144
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
144
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
145 145
             return FALSE;
146 146
         }
147 147
 
@@ -165,17 +165,17 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
167 167
 
168
-        $hasFilesFlag = true;
168
+        $hasFilesFlag = TRUE;
169 169
 
170 170
         $workingCopy = $this->documentRepository->findByUid($documentForm->getDocumentUid());
171 171
 
172 172
         if ($workingCopy->isTemporary()) {
173
-            $workingCopy->setTemporary(false);
173
+            $workingCopy->setTemporary(FALSE);
174 174
         }
175 175
 
176 176
         if (empty($workingCopy->getFileData())) {
177 177
             // no files are linked to the document
178
-            $hasFilesFlag = false;
178
+            $hasFilesFlag = FALSE;
179 179
         }
180 180
 
181 181
         $newDocument = $this->objectManager->get(Document::class);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $newDocument->setLinkedUid($document->getUid());
196 196
         }
197 197
 
198
-        $newDocument->setSuggestion(true);
198
+        $newDocument->setSuggestion(TRUE);
199 199
         $newDocument->setComment($document->getComment());
200 200
 
201 201
         if ($restore) {
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
             $newDocument->setCreator($this->security->getUser()->getUid());
224 224
             $this->documentRepository->add($newDocument);
225 225
             $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::SUCCESS;
226
-            $this->addFlashMessage("Success", '', $severity,false);
226
+            $this->addFlashMessage("Success", '', $severity,FALSE);
227 227
         } catch (\Throwable $t) {
228 228
             $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR;
229
-            $this->addFlashMessage("Failed", '', $severity,false);
229
+            $this->addFlashMessage("Failed", '', $severity,FALSE);
230 230
         }
231 231
 
232 232
         $this->redirectToDocumentList();
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     {
238 238
         if ($this->request->getArgument('documentData')['suggestMod']) {
239 239
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
240
-            $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
240
+            $this->forward('createSuggestionDocument', NULL, NULL, ['documentForm' => $documentForm, 'restore' => $restore]);
241 241
         }
242 242
 
243 243
         if ($this->request->hasArgument('saveAndUpdate')) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         } elseif ($this->request->hasArgument('saveWorkingCopy')) {
246 246
             $saveMode = 'saveWorkingCopy';
247 247
         } else {
248
-            $saveMode = null;
248
+            $saveMode = NULL;
249 249
         }
250 250
 
251 251
         $this->forward(
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
268 268
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
269 269
      */
270
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null)
270
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = NULL)
271 271
     {
272 272
         try {
273 273
             /** @var \EWW\Dpf\Domain\Model\Document $document */
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 $this->addFlashMessage($message, '', AbstractMessage::ERROR);
289 289
                 $this->redirect(
290 290
                     'showDetails', 'Document',
291
-                    null, ['document' => $document]
291
+                    NULL, ['document' => $document]
292 292
                 );
293 293
             }
294 294
 
@@ -298,13 +298,13 @@  discard block
 block discarded – undo
298 298
             /** @var \EWW\Dpf\Domain\Model\Document $updateDocument */
299 299
             $updateDocument = $documentMapper->getDocument($documentForm);
300 300
 
301
-            $saveWorkingCopy = false;
302
-            $workflowTransition = null;
301
+            $saveWorkingCopy = FALSE;
302
+            $workflowTransition = NULL;
303 303
 
304 304
             // Convert the temporary copy into a local working copy if needed.
305 305
             if ( $updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') {
306
-                $saveWorkingCopy = true;
307
-                $updateDocument->setTemporary(false);
306
+                $saveWorkingCopy = TRUE;
307
+                $updateDocument->setTemporary(FALSE);
308 308
                 $workflowTransition = DocumentWorkflow::TRANSITION_IN_PROGRESS;
309 309
             } elseif ($updateDocument->isTemporaryCopy() && $saveMode == 'saveAndUpdate') {
310 310
                 $workflowTransition = DocumentWorkflow::TRANSITION_REMOTE_UPDATE;
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             if ($workflowTransition && $workflowTransition === DocumentWorkflow::TRANSITION_REMOTE_UPDATE) {
388 388
                 $this->redirectToDocumentList();
389 389
             } else {
390
-                $this->redirect('showDetails', 'Document', null, ['document' => $updateDocument]);
390
+                $this->redirect('showDetails', 'Document', NULL, ['document' => $updateDocument]);
391 391
             }
392 392
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
393 393
             // A redirect always throws this exception, but in this case, however,
@@ -410,8 +410,8 @@  discard block
 block discarded – undo
410 410
 
411 411
             $exceptionMsg[] = LocalizationUtility::translate($key, 'dpf');
412 412
 
413
-            $this->addFlashMessage(implode(" ", $exceptionMsg), '', $severity, true);
414
-            $this->redirect('showDetails', 'Document', null, ['document' => $updateDocument]);
413
+            $this->addFlashMessage(implode(" ", $exceptionMsg), '', $severity, TRUE);
414
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $updateDocument]);
415 415
         }
416 416
     }
417 417
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
             $args[] = $document->getTitle();
429 429
             $message = LocalizationUtility::translate($key, 'dpf', $args);
430 430
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
431
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
431
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
432 432
             return FALSE;
433 433
         }
434 434
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
                 $message,
443 443
                 '',
444 444
                 $severity,
445
-                true
445
+                TRUE
446 446
             );
447 447
 
448 448
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
                 implode(" ", $message),
465 465
                 '',
466 466
                 $severity,
467
-                true
467
+                TRUE
468 468
             );
469 469
         }
470 470
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             /** @var $document \EWW\Dpf\Domain\Model\Document */
488 488
             $document = $this->documentRepository->findByUid($documentUid);
489 489
 
490
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
490
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
491 491
         } else {
492 492
             $this->redirectToDocumentList();
493 493
         }
@@ -522,14 +522,14 @@  discard block
 block discarded – undo
522 522
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
523 523
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
524 524
      */
525
-    protected function redirectToDocumentList($message = null)
525
+    protected function redirectToDocumentList($message = NULL)
526 526
     {
527 527
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
528 528
 
529 529
         if ($redirectUri) {
530 530
             $this->redirectToUri($redirectUri);
531 531
         } else {
532
-            $this->redirect($action, $controller, null, array('message' => $message));
532
+            $this->redirect($action, $controller, NULL, array('message' => $message));
533 533
         }
534 534
     }
535 535
 
Please login to merge, or discard this patch.
Classes/Controller/AbstractDocumentFormController.php 2 patches
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
 /**
26 26
  * DocumentFormController
27 27
  */
28
-abstract class AbstractDocumentFormController extends AbstractController
29
-{
28
+abstract class AbstractDocumentFormController extends AbstractController {
30 29
 
31 30
     /**
32 31
      * documentRepository
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
      *
82 81
      * @return void
83 82
      */
84
-    public function listAction()
85
-    {
83
+    public function listAction() {
86 84
         $documents = $this->documentRepository->findAll();
87 85
 
88 86
         $documentTypes = $this->documentTypeRepository->findAll();
@@ -127,8 +125,7 @@  discard block
 block discarded – undo
127 125
      *
128 126
      * @return void
129 127
      */
130
-    public function initializeNewAction()
131
-    {
128
+    public function initializeNewAction() {
132 129
 
133 130
         $requestArguments = $this->request->getArguments();
134 131
 
@@ -157,14 +154,12 @@  discard block
 block discarded – undo
157 154
      * @ignorevalidation $newDocumentForm
158 155
      * @return void
159 156
      */
160
-    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
161
-    {
157
+    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0) {
162 158
         $this->view->assign('returnDocumentId', $returnDocumentId);
163 159
         $this->view->assign('documentForm', $newDocumentForm);
164 160
     }
165 161
 
166
-    public function initializeCreateAction()
167
-    {
162
+    public function initializeCreateAction() {
168 163
 
169 164
         $requestArguments = $this->request->getArguments();
170 165
 
@@ -198,8 +193,7 @@  discard block
 block discarded – undo
198 193
      * @param \EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm
199 194
      * @return void
200 195
      */
201
-    public function createAction(DocumentForm $newDocumentForm)
202
-    {
196
+    public function createAction(DocumentForm $newDocumentForm) {
203 197
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
204 198
 
205 199
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
@@ -248,8 +242,7 @@  discard block
 block discarded – undo
248 242
 
249 243
     }
250 244
 
251
-    public function initializeEditAction()
252
-    {
245
+    public function initializeEditAction() {
253 246
         $requestArguments = $this->request->getArguments();
254 247
 
255 248
         if (array_key_exists('document', $requestArguments)) {
@@ -279,13 +272,11 @@  discard block
 block discarded – undo
279 272
      * @ignorevalidation $documentForm
280 273
      * @return void
281 274
      */
282
-    public function editAction(DocumentForm $documentForm)
283
-    {
275
+    public function editAction(DocumentForm $documentForm) {
284 276
         $this->view->assign('documentForm', $documentForm);
285 277
     }
286 278
 
287
-    public function initializeUpdateAction()
288
-    {
279
+    public function initializeUpdateAction() {
289 280
         $requestArguments = $this->request->getArguments();
290 281
 
291 282
         if ($this->request->hasArgument('documentData')) {
@@ -318,8 +309,7 @@  discard block
 block discarded – undo
318 309
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
319 310
      * @return void
320 311
      */
321
-    public function updateAction(DocumentForm $documentForm)
322
-    {
312
+    public function updateAction(DocumentForm $documentForm) {
323 313
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
324 314
 
325 315
         /* @var $updateDocument \EWW\Dpf\Domain\Model\Document */
@@ -360,18 +350,15 @@  discard block
 block discarded – undo
360 350
      *
361 351
      * @return void
362 352
      */
363
-    public function cancelAction()
364
-    {
353
+    public function cancelAction() {
365 354
         $this->redirectToList();
366 355
     }
367 356
 
368
-    protected function redirectAfterUpdate()
369
-    {
357
+    protected function redirectAfterUpdate() {
370 358
         $this->redirect('list');
371 359
     }
372 360
 
373
-    protected function redirectToList($message = null)
374
-    {
361
+    protected function redirectToList($message = null) {
375 362
         $this->redirect('list');
376 363
     }
377 364
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
35 35
      * @inject
36 36
      */
37
-    protected $documentRepository = null;
37
+    protected $documentRepository = NULL;
38 38
 
39 39
     /**
40 40
      * fileRepository
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @var \EWW\Dpf\Domain\Repository\FileRepository
43 43
      * @inject
44 44
      */
45
-    protected $fileRepository = null;
45
+    protected $fileRepository = NULL;
46 46
 
47 47
     /**
48 48
      * documentTypeRepository
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
51 51
      * @inject
52 52
      */
53
-    protected $documentTypeRepository = null;
53
+    protected $documentTypeRepository = NULL;
54 54
 
55 55
     /**
56 56
      * metadataGroupRepository
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
59 59
      * @inject
60 60
      */
61
-    protected $metadataGroupRepository = null;
61
+    protected $metadataGroupRepository = NULL;
62 62
 
63 63
     /**
64 64
      * metadataObjectRepository
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
67 67
      * @inject
68 68
      */
69
-    protected $metadataObjectRepository = null;
69
+    protected $metadataObjectRepository = NULL;
70 70
 
71 71
     /**
72 72
      * persistence manager
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      * @ignorevalidation $newDocumentForm
158 158
      * @return void
159 159
      */
160
-    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
160
+    public function newAction(DocumentForm $newDocumentForm = NULL, $returnDocumentId = 0)
161 161
     {
162 162
         $this->view->assign('returnDocumentId', $returnDocumentId);
163 163
         $this->view->assign('documentForm', $newDocumentForm);
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
             $documentType = $this->documentTypeRepository->findByUid($docTypeUid);
182 182
             $virtual = $documentType->getVirtual();
183 183
 
184
-            if (!$formDataReader->uploadError() || $virtual === true) {
184
+            if (!$formDataReader->uploadError() || $virtual === TRUE) {
185 185
                 $this->request->setArguments($requestArguments);
186 186
             } else {
187 187
                 $t = $docForm->getNewFileNames();
188
-                $this->redirect('list', 'DocumentForm', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
188
+                $this->redirect('list', 'DocumentForm', NULL, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
189 189
             }
190 190
         } else {
191 191
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -301,11 +301,11 @@  discard block
 block discarded – undo
301 301
             $documentType = $this->documentTypeRepository->findByUid($docTypeUid);
302 302
             $virtual = $documentType->getVirtual();
303 303
 
304
-            if (!$formDataReader->uploadError() || $virtual === true) {
304
+            if (!$formDataReader->uploadError() || $virtual === TRUE) {
305 305
                 $this->request->setArguments($requestArguments);
306 306
             } else {
307 307
                 $t = $docForm->getNewFileNames();
308
-                $this->redirect('list', 'Document', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
308
+                $this->redirect('list', 'Document', NULL, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
309 309
             }
310 310
         } else {
311 311
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             throw new \EWW\Dpf\Exceptions\DocumentMaxSizeErrorException("Maximum document size exceeded.");
331 331
         }
332 332
 
333
-        $updateDocument->setChanged(true);
333
+        $updateDocument->setChanged(TRUE);
334 334
         $this->documentRepository->update($updateDocument);
335 335
 
336 336
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         $this->redirect('list');
371 371
     }
372 372
 
373
-    protected function redirectToList($message = null)
373
+    protected function redirectToList($message = NULL)
374 374
     {
375 375
         $this->redirect('list');
376 376
     }
Please login to merge, or discard this patch.
Classes/ViewHelpers/FileUrlViewHelper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 use TYPO3\CMS\Core\Utility\GeneralUtility;
18 18
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
19 19
 
20
-class FileUrlViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
21
-{
20
+class FileUrlViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
22 21
     /**
23 22
      * Secret API key for delivering inactive documents.
24 23
      * @var string
@@ -44,8 +43,7 @@  discard block
 block discarded – undo
44 43
      * @param string $uri
45 44
      *
46 45
      */
47
-    public function render($uri)
48
-    {
46
+    public function render($uri) {
49 47
         $fileUri = $this->buildFileUri($uri);
50 48
 
51 49
         // pass configured API secret key parameter to enable dissemination for inactive documents
@@ -59,8 +57,7 @@  discard block
 block discarded – undo
59 57
     /**
60 58
      * Construct file URI
61 59
      */
62
-    protected function buildFileUri($uri)
63
-    {
60
+    protected function buildFileUri($uri) {
64 61
         $uploadFileUrl = new \EWW\Dpf\Helper\UploadFileUrl;
65 62
 
66 63
         if (strpos(strtolower($uri), "datastreams")) {
Please login to merge, or discard this patch.
Classes/Services/Document/DocumentCleaner.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class DocumentCleaner
18
-{
17
+class DocumentCleaner {
19 18
 
20 19
     /**
21 20
      * clientRepository
@@ -55,8 +54,7 @@  discard block
 block discarded – undo
55 54
      * @param \EWW\Dpf\Domain\Model\Document $openedDocument
56 55
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
57 56
      */
58
-    public function cleanUpDocuments($actionMethodName, $controllerClass)
59
-    {
57
+    public function cleanUpDocuments($actionMethodName, $controllerClass) {
60 58
         $excludeActions = [
61 59
             \EWW\Dpf\Controller\DocumentController::class => [
62 60
                 'showDetailsAction',
@@ -105,8 +103,7 @@  discard block
 block discarded – undo
105 103
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
106 104
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException
107 105
      */
108
-    protected function cleanUpOutdatedTemporaryDocuments()
109
-    {
106
+    protected function cleanUpOutdatedTemporaryDocuments() {
110 107
         // Remove outdated temporary documents from the document table.
111 108
         $outdatedTemporaryDocuments = $this->documentRepository->findOutdatedTemporaryDocuments(3600);
112 109
         foreach ($outdatedTemporaryDocuments as $outdatedTemporaryDocument) {
@@ -119,8 +116,7 @@  discard block
 block discarded – undo
119 116
     /**
120 117
      * Unlocks all editing locks of the current user.
121 118
      */
122
-    protected function cleanUpEditingLocks($actionMethodName, $controllerClass)
123
-    {
119
+    protected function cleanUpEditingLocks($actionMethodName, $controllerClass) {
124 120
         $excludeActions = [
125 121
             \EWW\Dpf\Controller\DocumentController::class => [
126 122
                 'duplicateAction'
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     public function setObjectIdentifier($objectIdentifier)
325 325
     {
326 326
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
327
-        $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
327
+        $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier;
328 328
     }
329 329
 
330 330
     /**
@@ -506,14 +506,14 @@  discard block
 block discarded – undo
506 506
 
507 507
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
508 508
 
509
-        $files = array();
509
+        $files = array ();
510 510
 
511 511
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
512 512
             foreach ($this->getFile() as $file) {
513 513
 
514 514
                 if (!$file->isFileGroupDeleted()) {
515 515
 
516
-                    $tmpFile = array(
516
+                    $tmpFile = array (
517 517
                         'path' => $file->getUrl(),
518 518
                         'type' => $file->getContentType(),
519 519
                         'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -557,12 +557,12 @@  discard block
 block discarded – undo
557 557
 
558 558
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
559 559
 
560
-        $files = array();
560
+        $files = array ();
561 561
 
562 562
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
563 563
             foreach ($this->getFile() as $file) {
564 564
 
565
-                $tmpFile = array(
565
+                $tmpFile = array (
566 566
                     'path' => $file->getUrl(),
567 567
                     'type' => $file->getContentType(),
568 568
                     'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
      */
716 716
     public function getCreator()
717 717
     {
718
-        return $this->creator? $this->creator : 0;
718
+        return $this->creator ? $this->creator : 0;
719 719
     }
720 720
 
721 721
     /**
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 
862 862
         foreach ($availableProperties as $propertyName) {
863 863
             if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName)
864
-                && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
864
+                && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
865 865
 
866 866
                 $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName);
867 867
                 \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue);
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
      */
884 884
     public function getDocumentIdentifier()
885 885
     {
886
-        return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
886
+        return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid();
887 887
     }
888 888
 
889 889
     /**
@@ -916,8 +916,8 @@  discard block
 block discarded – undo
916 916
     public function getPublicationYear()
917 917
     {
918 918
         $mods = new Mods($this->getXmlData());
919
-        $year =  $mods->getPublishingYear();
920
-        return $year? $year : "";
919
+        $year = $mods->getPublishingYear();
920
+        return $year ? $year : "";
921 921
     }
922 922
 
923 923
     /**
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
     {
930 930
         $mods = new Mods($this->getXmlData());
931 931
         $title = $mods->getTitle();
932
-        return $title? $title : "";
932
+        return $title ? $title : "";
933 933
     }
934 934
 
935 935
 
Please login to merge, or discard this patch.
Classes/Helper/DocumentMapper.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 use EWW\Dpf\Domain\Workflow\DocumentWorkflow;
20 20
 use EWW\Dpf\Services\ProcessNumber\ProcessNumberGenerator;
21 21
 
22
-class DocumentMapper
23
-{
22
+class DocumentMapper {
24 23
 
25 24
     /**
26 25
      * objectManager
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
      * @param bool $generateEmptyFields
78 77
      * @return \EWW\Dpf\Domain\Model\DocumentForm
79 78
      */
80
-    public function getDocumentForm(Document $document, $generateEmptyFields = true)
81
-    {
79
+    public function getDocumentForm(Document $document, $generateEmptyFields = true) {
82 80
         $documentForm = new \EWW\Dpf\Domain\Model\DocumentForm();
83 81
         $documentForm->setUid($document->getDocumentType()->getUid());
84 82
         $documentForm->setDisplayName($document->getDocumentType()->getDisplayName());
@@ -298,8 +296,7 @@  discard block
 block discarded – undo
298 296
         return $documentForm;
299 297
     }
300 298
 
301
-    public function getDocument($documentForm)
302
-    {
299
+    public function getDocument($documentForm) {
303 300
 
304 301
         if ($documentForm->getDocumentUid()) {
305 302
             $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -357,8 +354,7 @@  discard block
 block discarded – undo
357 354
         return $document;
358 355
     }
359 356
 
360
-    public function getMetadata($documentForm)
361
-    {
357
+    public function getMetadata($documentForm) {
362 358
 
363 359
         foreach ($documentForm->getItems() as $page) {
364 360
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
37 37
      * @inject
38 38
      */
39
-    protected $metadataGroupRepository = null;
39
+    protected $metadataGroupRepository = NULL;
40 40
 
41 41
     /**
42 42
      * metadataObjectRepository
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
45 45
      * @inject
46 46
      */
47
-    protected $metadataObjectRepository = null;
47
+    protected $metadataObjectRepository = NULL;
48 48
 
49 49
     /**
50 50
      * documentTypeRepository
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
53 53
      * @inject
54 54
      */
55
-    protected $documentTypeRepository = null;
55
+    protected $documentTypeRepository = NULL;
56 56
 
57 57
     /**
58 58
      * documentRepository
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
61 61
      * @inject
62 62
      */
63
-    protected $documentRepository = null;
63
+    protected $documentRepository = NULL;
64 64
 
65 65
     /**
66 66
      * fileRepository
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @var \EWW\Dpf\Domain\Repository\FileRepository
69 69
      * @inject
70 70
      */
71
-    protected $fileRepository = null;
71
+    protected $fileRepository = NULL;
72 72
 
73 73
     /**
74 74
      * Gets the document form representation of the document data
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @param bool $generateEmptyFields
78 78
      * @return \EWW\Dpf\Domain\Model\DocumentForm
79 79
      */
80
-    public function getDocumentForm(Document $document, $generateEmptyFields = true)
80
+    public function getDocumentForm(Document $document, $generateEmptyFields = TRUE)
81 81
     {
82 82
         $documentForm = new \EWW\Dpf\Domain\Model\DocumentForm();
83 83
         $documentForm->setUid($document->getDocumentType()->getUid());
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 // build mapping path, previous fixed attributes which are differ from
147 147
                 // the own fixed attributes are excluded
148 148
                 $queryGroupMapping = $metadataGroup->getAbsoluteMapping();
149
-                if (strpos($queryGroupMapping, "@displayLabel") === false && is_array($excludeGroupAttributes[$groupMappingName])) {
149
+                if (strpos($queryGroupMapping, "@displayLabel") === FALSE && is_array($excludeGroupAttributes[$groupMappingName])) {
150 150
                     foreach ($excludeGroupAttributes[$groupMappingName] as $excludeAttr => $excludeAttrValue) {
151 151
                         if (!in_array($excludeAttr, $fixedGroupAttributes)) {
152 152
                             $queryGroupMapping .= $excludeAttrValue;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
                                 // ensure that e.g. <mods:detail> and <mods:detail type="volume">
202 202
                                 // are not recognized as the same node
203
-                                if ((strpos($value, "@") === false) && ($value != '.')) {
203
+                                if ((strpos($value, "@") === FALSE) && ($value != '.')) {
204 204
                                     $objectMappingPath[$key] .= "[not(@*)]";
205 205
                                 }
206 206
                             }
Please login to merge, or discard this patch.
Classes/Helper/Mods.php 1 patch
Braces   +20 added lines, -40 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 
17 17
 
18
-class Mods
19
-{
18
+class Mods {
20 19
     /**
21 20
      * metadataObjectRepository
22 21
      *
@@ -36,13 +35,11 @@  discard block
 block discarded – undo
36 35
 
37 36
     protected $modsDom;
38 37
 
39
-    public function __construct($modsXml)
40
-    {
38
+    public function __construct($modsXml) {
41 39
         $this->setModsXml($modsXml);
42 40
     }
43 41
 
44
-    public function setModsXml($modsXml)
45
-    {
42
+    public function setModsXml($modsXml) {
46 43
         $modsDom = new \DOMDocument();
47 44
         if (!empty($modsXml)) {
48 45
             if (is_null(@$modsDom->loadXML($modsXml))) {
@@ -52,19 +49,16 @@  discard block
 block discarded – undo
52 49
         $this->modsDom = $modsDom;
53 50
     }
54 51
 
55
-    public function getModsXml()
56
-    {
52
+    public function getModsXml() {
57 53
         return $this->modsDom->saveXML();
58 54
     }
59 55
 
60
-    public function getModsXpath()
61
-    {
56
+    public function getModsXpath() {
62 57
         $xpath = \EWW\Dpf\Helper\XPath::create($this->modsDom);
63 58
         return $xpath;
64 59
     }
65 60
 
66
-    public function getTitle()
67
-    {
61
+    public function getTitle() {
68 62
         $titleNode = $this->getModsXpath()->query('/mods:mods/mods:titleInfo[@usage="primary"]/mods:title');
69 63
 
70 64
         if ($titleNode->length == 0) {
@@ -74,8 +68,7 @@  discard block
 block discarded – undo
74 68
     }
75 69
 
76 70
 
77
-    public function setTitle($title)
78
-    {
71
+    public function setTitle($title) {
79 72
         $titleNode = $this->getModsXpath()->query('/mods:mods/mods:titleInfo[@usage="primary"]/mods:title');
80 73
 
81 74
         if ($titleNode->length == 0) {
@@ -88,13 +81,11 @@  discard block
 block discarded – undo
88 81
     }
89 82
 
90 83
 
91
-    public function getAuthors()
92
-    {
84
+    public function getAuthors() {
93 85
         return $this->getPersons("aut");
94 86
     }
95 87
 
96
-    public function getPublishers()
97
-    {
88
+    public function getPublishers() {
98 89
         return $this->getPersons("edt");
99 90
     }
100 91
 
@@ -104,8 +95,7 @@  discard block
 block discarded – undo
104 95
      * @param $role
105 96
      * @return array
106 97
      */
107
-    protected function getPersons($role)
108
-    {
98
+    protected function getPersons($role) {
109 99
         $xpath = $this->getModsXpath();
110 100
 
111 101
         $authorNode = $xpath->query('/mods:mods/mods:name[mods:role/mods:roleTerm[@type="code"]="'.$role.'"]');
@@ -134,8 +124,7 @@  discard block
 block discarded – undo
134 124
         return $authors;
135 125
     }
136 126
 
137
-    public function setDateIssued($date)
138
-    {
127
+    public function setDateIssued($date) {
139 128
 
140 129
         $originInfo = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]');
141 130
 
@@ -175,8 +164,7 @@  discard block
 block discarded – undo
175 164
     }
176 165
 
177 166
 
178
-    public function getPublishingYear()
179
-    {
167
+    public function getPublishingYear() {
180 168
         $year = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="publication"]/mods:dateIssued[@encoding="iso8601"]');
181 169
         if ($year->length > 0) {
182 170
             return $year->item(0)->nodeValue;
@@ -185,8 +173,7 @@  discard block
 block discarded – undo
185 173
         return null;
186 174
     }
187 175
 
188
-    public function getOriginalSourceTitle()
189
-    {
176
+    public function getOriginalSourceTitle() {
190 177
         $node= $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]/mods:titleInfo/mods:title');
191 178
         if ($node->length > 0) {
192 179
             return $node->item(0)->nodeValue;
@@ -195,8 +182,7 @@  discard block
 block discarded – undo
195 182
         return null;
196 183
     }
197 184
 
198
-    public function getDateIssued()
199
-    {
185
+    public function getDateIssued() {
200 186
 
201 187
         $dateIssued = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]/mods:dateIssued[@encoding="iso8601"][@keyDate="yes"]');
202 188
         if ($dateIssued->length > 0) {
@@ -206,8 +192,7 @@  discard block
 block discarded – undo
206 192
         return null;
207 193
     }
208 194
 
209
-    public function removeDateIssued()
210
-    {
195
+    public function removeDateIssued() {
211 196
 
212 197
         $dateIssued = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]/mods:dateIssued[@encoding="iso8601"][@keyDate="yes"]');
213 198
         if ($dateIssued->length > 0) {
@@ -216,8 +201,7 @@  discard block
 block discarded – undo
216 201
 
217 202
     }
218 203
 
219
-    public function hasQucosaUrn()
220
-    {
204
+    public function hasQucosaUrn() {
221 205
         $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]');
222 206
 
223 207
         $hasUrn = false;
@@ -230,8 +214,7 @@  discard block
 block discarded – undo
230 214
         return $hasUrn;
231 215
     }
232 216
 
233
-    public function getQucosaUrn()
234
-    {
217
+    public function getQucosaUrn() {
235 218
         $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]');
236 219
         $urnList     = '';
237 220
 
@@ -243,8 +226,7 @@  discard block
 block discarded – undo
243 226
         return $urnList;
244 227
     }
245 228
 
246
-    public function addQucosaUrn($urn)
247
-    {
229
+    public function addQucosaUrn($urn) {
248 230
         $rootNode = $this->getModsXpath()->query('/mods:mods');
249 231
 
250 232
         if ($rootNode->length == 1) {
@@ -258,8 +240,7 @@  discard block
 block discarded – undo
258 240
 
259 241
     }
260 242
 
261
-    public function clearAllUrn()
262
-    {
243
+    public function clearAllUrn() {
263 244
         $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="urn"]');
264 245
 
265 246
         foreach ($urnNodeList as $urnNode) {
@@ -275,8 +256,7 @@  discard block
 block discarded – undo
275 256
     /**
276 257
      * @return string
277 258
      */
278
-    public function getSourceDetails()
279
-    {
259
+    public function getSourceDetails() {
280 260
         $data = [];
281 261
 
282 262
         $dataNodes[] = $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]');
Please login to merge, or discard this patch.
Classes/Domain/Model/File.php 2 patches
Braces   +25 added lines, -50 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * File
19 19
  */
20
-class File extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
21
-{
20
+class File extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
22 21
 
23 22
     /**
24 23
      * title
@@ -110,8 +109,7 @@  discard block
 block discarded – undo
110 109
      *
111 110
      * @return string $title
112 111
      */
113
-    public function getTitle()
114
-    {
112
+    public function getTitle() {
115 113
         return $this->title;
116 114
     }
117 115
 
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
      * @param string $title
122 120
      * @return void
123 121
      */
124
-    public function setTitle($title)
125
-    {
122
+    public function setTitle($title) {
126 123
         $this->title = $title;
127 124
     }
128 125
 
@@ -131,8 +128,7 @@  discard block
 block discarded – undo
131 128
      *
132 129
      * @return string $label
133 130
      */
134
-    public function getLabel()
135
-    {
131
+    public function getLabel() {
136 132
         return $this->label;
137 133
     }
138 134
 
@@ -142,8 +138,7 @@  discard block
 block discarded – undo
142 138
      * @param string $label
143 139
      * @return void
144 140
      */
145
-    public function setLabel($label)
146
-    {
141
+    public function setLabel($label) {
147 142
         $this->label = $label;
148 143
     }
149 144
 
@@ -152,8 +147,7 @@  discard block
 block discarded – undo
152 147
      *
153 148
      * @return boolean $download
154 149
      */
155
-    public function getDownload()
156
-    {
150
+    public function getDownload() {
157 151
         return $this->download;
158 152
     }
159 153
 
@@ -163,8 +157,7 @@  discard block
 block discarded – undo
163 157
      * @param string $download
164 158
      * @return void
165 159
      */
166
-    public function setDownload($download)
167
-    {
160
+    public function setDownload($download) {
168 161
         $this->download = $download;
169 162
     }
170 163
 
@@ -173,8 +166,7 @@  discard block
 block discarded – undo
173 166
      *
174 167
      * @return boolean $archive
175 168
      */
176
-    public function getArchive()
177
-    {
169
+    public function getArchive() {
178 170
         return $this->archive;
179 171
     }
180 172
 
@@ -184,8 +176,7 @@  discard block
 block discarded – undo
184 176
      * @param boolean $archive
185 177
      * @return void
186 178
      */
187
-    public function setArchive($archive)
188
-    {
179
+    public function setArchive($archive) {
189 180
         $this->archive = $archive;
190 181
     }
191 182
 
@@ -194,8 +185,7 @@  discard block
 block discarded – undo
194 185
      *
195 186
      * @return boolean $fileGroupDeleted
196 187
      */
197
-    public function isFileGroupDeleted()
198
-    {
188
+    public function isFileGroupDeleted() {
199 189
         return $this->fileGroupDeleted;
200 190
     }
201 191
 
@@ -204,8 +194,7 @@  discard block
 block discarded – undo
204 194
      *
205 195
      * @return boolean $fileGroupDeleted
206 196
      */
207
-    public function setFileGroupDeleted($fileGroupDeleted)
208
-    {
197
+    public function setFileGroupDeleted($fileGroupDeleted) {
209 198
         $this->fileGroupDeleted = $fileGroupDeleted;
210 199
     }
211 200
 
@@ -214,8 +203,7 @@  discard block
 block discarded – undo
214 203
      *
215 204
      * @return string $contentType
216 205
      */
217
-    public function getContentType()
218
-    {
206
+    public function getContentType() {
219 207
         return $this->contentType;
220 208
     }
221 209
 
@@ -225,8 +213,7 @@  discard block
 block discarded – undo
225 213
      * @param string $contentType
226 214
      * @return void
227 215
      */
228
-    public function setContentType($contentType)
229
-    {
216
+    public function setContentType($contentType) {
230 217
         $this->contentType = $contentType;
231 218
     }
232 219
 
@@ -235,8 +222,7 @@  discard block
 block discarded – undo
235 222
      *
236 223
      * @return string $link
237 224
      */
238
-    public function getLink()
239
-    {
225
+    public function getLink() {
240 226
         return $this->link;
241 227
     }
242 228
 
@@ -246,8 +232,7 @@  discard block
 block discarded – undo
246 232
      * @param string $link
247 233
      * @return void
248 234
      */
249
-    public function setLink($link)
250
-    {
235
+    public function setLink($link) {
251 236
         $this->link = $link;
252 237
     }
253 238
 
@@ -256,8 +241,7 @@  discard block
 block discarded – undo
256 241
      *
257 242
      * @return string $status
258 243
      */
259
-    public function getStatus()
260
-    {
244
+    public function getStatus() {
261 245
         return $this->status;
262 246
     }
263 247
 
@@ -267,8 +251,7 @@  discard block
 block discarded – undo
267 251
      * @param string $status
268 252
      * @return void
269 253
      */
270
-    public function setStatus($status)
271
-    {
254
+    public function setStatus($status) {
272 255
         $this->status = $status;
273 256
     }
274 257
 
@@ -277,8 +260,7 @@  discard block
 block discarded – undo
277 260
      *
278 261
      * @return \EWW\Dpf\Domain\Model\Document $document
279 262
      */
280
-    public function getDocument()
281
-    {
263
+    public function getDocument() {
282 264
         return $this->document;
283 265
     }
284 266
 
@@ -288,8 +270,7 @@  discard block
 block discarded – undo
288 270
      * @param \EWW\Dpf\Domain\Model\Document $document
289 271
      * @return void
290 272
      */
291
-    public function setDocument(\EWW\Dpf\Domain\Model\Document $document)
292
-    {
273
+    public function setDocument(\EWW\Dpf\Domain\Model\Document $document) {
293 274
         $this->document = $document;
294 275
     }
295 276
 
@@ -298,8 +279,7 @@  discard block
 block discarded – undo
298 279
      *
299 280
      * @return boolean $primaryFile
300 281
      */
301
-    public function getPrimaryFile()
302
-    {
282
+    public function getPrimaryFile() {
303 283
         return $this->primaryFile;
304 284
     }
305 285
 
@@ -309,8 +289,7 @@  discard block
 block discarded – undo
309 289
      * @param boolean $primaryFile
310 290
      * @return void
311 291
      */
312
-    public function setPrimaryFile($primaryFile)
313
-    {
292
+    public function setPrimaryFile($primaryFile) {
314 293
         $this->primaryFile = $primaryFile;
315 294
     }
316 295
 
@@ -319,8 +298,7 @@  discard block
 block discarded – undo
319 298
      *
320 299
      * @return boolean
321 300
      */
322
-    public function isPrimaryFile()
323
-    {
301
+    public function isPrimaryFile() {
324 302
         return $this->primaryFile;
325 303
     }
326 304
 
@@ -329,8 +307,7 @@  discard block
 block discarded – undo
329 307
      *
330 308
      * @return string $datastreamIdentifier
331 309
      */
332
-    public function getDatastreamIdentifier()
333
-    {
310
+    public function getDatastreamIdentifier() {
334 311
         return $this->datastreamIdentifier;
335 312
     }
336 313
 
@@ -340,8 +317,7 @@  discard block
 block discarded – undo
340 317
      * @param string $datastreamIdentifier
341 318
      * @return void
342 319
      */
343
-    public function setDatastreamIdentifier($datastreamIdentifier)
344
-    {
320
+    public function setDatastreamIdentifier($datastreamIdentifier) {
345 321
         $this->datastreamIdentifier = $datastreamIdentifier;
346 322
     }
347 323
 
@@ -373,8 +349,7 @@  discard block
 block discarded – undo
373 349
      *
374 350
      * @return string
375 351
      */
376
-    public function getUrl()
377
-    {
352
+    public function getUrl() {
378 353
         $url = $this->getLink();
379 354
 
380 355
         // FIXME: Checking for "datastreams" in the URL is Fedora 3 specific, for Fedora 4 we need a better solution.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @var \EWW\Dpf\Domain\Model\Document
97 97
      */
98
-    protected $document = null;
98
+    protected $document = NULL;
99 99
 
100 100
     const STATUS_REMOTE  = "remote";
101 101
     const STATUS_DELETED = "deleted";
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
         $url = $this->getLink();
379 379
 
380 380
         // FIXME: Checking for "datastreams" in the URL is Fedora 3 specific, for Fedora 4 we need a better solution.
381
-        if (strpos(strtolower($url), "datastreams") === false) {
381
+        if (strpos(strtolower($url), "datastreams") === FALSE) {
382 382
             // File is a locally uploaded file, therefor we need to
383 383
             // determine the path
384 384
             $uploadFileUrl = new \EWW\Dpf\Helper\UploadFileUrl;
Please login to merge, or discard this patch.