Passed
Pull Request — master (#209)
by
unknown
33:50 queued 24:56
created
Classes/ViewHelpers/ShowStatusViewHelper.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         }
35 35
 
36 36
         return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
37
-            "manager.documentList.state.".$aliasState,
37
+            "manager.documentList.state." . $aliasState,
38 38
             'dpf',
39 39
             $arguments = null
40 40
         );
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,10 +16,8 @@  discard block
 block discarded – undo
16 16
 
17 17
 use EWW\Dpf\Domain\Workflow\DocumentWorkflow;
18 18
 
19
-class ShowStatusViewHelper extends \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
20
-{
21
-    public function initializeArguments()
22
-    {
19
+class ShowStatusViewHelper extends \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper {
20
+    public function initializeArguments() {
23 21
         parent::initializeArguments();
24 22
 
25 23
         $this->registerArgument('status', 'string', 'The document state', true);
@@ -29,8 +27,7 @@  discard block
 block discarded – undo
29 27
      * Maps the internal states to more user friendly and localized state names.
30 28
      * @return string
31 29
      */
32
-    public function render()
33
-    {
30
+    public function render() {
34 31
         $status = $this->arguments['status'];
35 32
 
36 33
         $aliasState = DocumentWorkflow::getAliasStateByLocalOrRepositoryState($status);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         parent::initializeArguments();
24 24
 
25
-        $this->registerArgument('status', 'string', 'The document state', true);
25
+        $this->registerArgument('status', 'string', 'The document state', TRUE);
26 26
     }
27 27
 
28 28
     /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
44 44
             "manager.documentList.state.".$aliasState,
45 45
             'dpf',
46
-            $arguments = null
46
+            $arguments = NULL
47 47
         );
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
Classes/Controller/DocumentController.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
                             // check if new document form has more field items as the existing form
403 403
                             if ($valueFieldCounter < $fieldCounter && !$checkFieldsForAdding) {
404 404
                                 // field added
405
-                                for ($i = count($valueField); $i < $fieldCounter;$i++) {
405
+                                for ($i = count($valueField); $i < $fieldCounter; $i++) {
406 406
                                     $returnArray['added'][] = $docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup][$keyRepeatGroup]->getItems()[$keyField][$i];
407 407
 
408 408
                                 }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
                     if ($valueGroupCounter < count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup])) {
415 415
                         // group added
416 416
                         $counter = count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup]);
417
-                        for ($i = $valueGroupCounter; $i < $counter;$i++) {
417
+                        for ($i = $valueGroupCounter; $i < $counter; $i++) {
418 418
                             $returnArray['added'][] = $docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup][$i];
419 419
                         }
420 420
                     }
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 
664 664
         $newDocument->setState(DocumentWorkflow::STATE_NEW_NONE);
665 665
 
666
-        $copyTitle = LocalizationUtility::translate("manager.workspace.title.copy", "dpf").$document->getTitle();
666
+        $copyTitle = LocalizationUtility::translate("manager.workspace.title.copy", "dpf") . $document->getTitle();
667 667
 
668 668
         $newDocument->setTitle($copyTitle);
669 669
 
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
         }
805 805
 
806 806
         $this->editingLockService->lock(
807
-            ($document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid()),
807
+            ($document->getObjectIdentifier() ? $document->getObjectIdentifier() : $document->getUid()),
808 808
             $this->security->getUser()->getUid()
809 809
         );
810 810
 
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
         $documentForm = $documentMapper->getDocumentForm($document);
872 872
 
873 873
         $this->view->assign('suggestMod', true);
874
-        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
874
+        $this->forward('edit', 'DocumentFormBackoffice', NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
875 875
     }
876 876
 
877 877
 
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
 
1009 1009
             if ($this->documentManager->update($document, $workflowTransition)) {
1010 1010
 
1011
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.success';
1011
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.success';
1012 1012
                 $this->flashMessage($document, $key, AbstractMessage::OK);
1013 1013
 
1014 1014
                 if ($this->security->getUserRole() === Security::ROLE_LIBRARIAN) {
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
 
1038 1038
                 $this->redirectToDocumentList();
1039 1039
             } else {
1040
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.failure';
1040
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.failure';
1041 1041
                 $this->flashMessage($document, $key, AbstractMessage::ERROR);
1042 1042
                 $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
1043 1043
             }
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
             if ($exception instanceof DPFExceptionInterface) {
1049 1049
                 $key = $exception->messageLanguageKey();
1050 1050
             } else {
1051
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.failure';
1051
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.failure';
1052 1052
             }
1053 1053
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
1054 1054
             $this->redirectToDocumentList();
Please login to merge, or discard this patch.
Braces   +19 added lines, -38 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
35 35
 /**
36 36
  * DocumentController
37 37
  */
38
-class DocumentController extends AbstractController
39
-{
38
+class DocumentController extends AbstractController {
40 39
 
41 40
     /**
42 41
      * documentRepository
@@ -151,8 +150,7 @@  discard block
 block discarded – undo
151 150
     /**
152 151
      * DocumentController constructor.
153 152
      */
154
-    public function __construct()
155
-    {
153
+    public function __construct() {
156 154
         parent::__construct();
157 155
 
158 156
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -167,8 +165,7 @@  discard block
 block discarded – undo
167 165
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
168 166
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
169 167
      */
170
-    public function logoutAction()
171
-    {
168
+    public function logoutAction() {
172 169
         $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
173 170
         $uri = $cObj->typolink_URL([
174 171
             'parameter' => $this->settings['loginPage'],
@@ -439,8 +436,7 @@  discard block
 block discarded – undo
439 436
      * @param string $reason
440 437
      * @return void
441 438
      */
442
-    public function discardAction(Document $document, $tstamp, $reason = NULL)
443
-    {
439
+    public function discardAction(Document $document, $tstamp, $reason = NULL) {
444 440
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DISCARD, $document)) {
445 441
             if (
446 442
                 $this->editingLockService->isLocked(
@@ -468,8 +464,7 @@  discard block
 block discarded – undo
468 464
      * @param string $reason
469 465
      * @return void
470 466
      */
471
-    public function postponeAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = NULL)
472
-    {
467
+    public function postponeAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = NULL) {
473 468
         if (!$this->authorizationChecker->isGranted(DocumentVoter::POSTPONE, $document)) {
474 469
             if (
475 470
                 $this->editingLockService->isLocked(
@@ -498,8 +493,7 @@  discard block
 block discarded – undo
498 493
      * @param int $documentTypeUid
499 494
      * @return void
500 495
      */
501
-    public function changeDocumentTypeAction(\EWW\Dpf\Domain\Model\Document $document, $documentTypeUid = 0)
502
-    {
496
+    public function changeDocumentTypeAction(\EWW\Dpf\Domain\Model\Document $document, $documentTypeUid = 0) {
503 497
         if (!$this->authorizationChecker->isGranted(DocumentVoter::UPDATE, $document)) {
504 498
             if (
505 499
             $this->editingLockService->isLocked(
@@ -544,8 +538,7 @@  discard block
 block discarded – undo
544 538
      * @param string $reason
545 539
      * @return void
546 540
      */
547
-    public function deleteLocallySuggestionAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "")
548
-    {
541
+    public function deleteLocallySuggestionAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "") {
549 542
         $this->redirect(
550 543
             'deleteLocally',
551 544
             'Document',
@@ -567,8 +560,7 @@  discard block
 block discarded – undo
567 560
      * @param string $reason
568 561
      * @return void
569 562
      */
570
-    public function deleteLocallyAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "")
571
-    {
563
+    public function deleteLocallyAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "") {
572 564
         if (empty($document->getObjectIdentifier()) || $document->isSuggestion()) {
573 565
             $voterAttribute = DocumentVoter::DELETE_LOCALLY;
574 566
         } else {
@@ -649,8 +641,7 @@  discard block
 block discarded – undo
649 641
      * @param Document $document
650 642
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
651 643
      */
652
-    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document)
653
-    {
644
+    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) {
654 645
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DUPLICATE, $document)) {
655 646
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.accessDenied';
656 647
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -706,8 +697,7 @@  discard block
 block discarded – undo
706 697
      * @param integer $tstamp
707 698
      * @return void
708 699
      */
709
-    public function releasePublishAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
710
-    {
700
+    public function releasePublishAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
711 701
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_PUBLISH, $document)) {
712 702
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.accessDenied';
713 703
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -729,8 +719,7 @@  discard block
 block discarded – undo
729 719
      * @param integer $tstamp
730 720
      * @return void
731 721
      */
732
-    public function releaseActivateAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
733
-    {
722
+    public function releaseActivateAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
734 723
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_ACTIVATE, $document)) {
735 724
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.accessDenied';
736 725
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -748,8 +737,7 @@  discard block
 block discarded – undo
748 737
      * @param \EWW\Dpf\Domain\Model\Document $document
749 738
      * @return void
750 739
      */
751
-    public function registerAction(\EWW\Dpf\Domain\Model\Document $document)
752
-    {
740
+    public function registerAction(\EWW\Dpf\Domain\Model\Document $document) {
753 741
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER, $document)) {
754 742
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
755 743
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -795,8 +783,7 @@  discard block
 block discarded – undo
795 783
      * @param \EWW\Dpf\Domain\Model\Document $document
796 784
      * @return void
797 785
      */
798
-    public function showDetailsAction(Document $document)
799
-    {
786
+    public function showDetailsAction(Document $document) {
800 787
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SHOW_DETAILS, $document)) {
801 788
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_showDetails.accessDenied';
802 789
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -834,8 +821,7 @@  discard block
 block discarded – undo
834 821
     }
835 822
 
836 823
 
837
-    public function cancelListTaskAction()
838
-    {
824
+    public function cancelListTaskAction() {
839 825
         $this->redirectToDocumentList();
840 826
     }
841 827
     
@@ -878,8 +864,7 @@  discard block
 block discarded – undo
878 864
     /**
879 865
      * initializeAction
880 866
      */
881
-    public function initializeAction()
882
-    {
867
+    public function initializeAction() {
883 868
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
884 869
 
885 870
         parent::initializeAction();
@@ -910,8 +895,7 @@  discard block
 block discarded – undo
910 895
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
911 896
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
912 897
      */
913
-    protected function redirectToDocumentList($message = null)
914
-    {
898
+    protected function redirectToDocumentList($message = null) {
915 899
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
916 900
 
917 901
         if ($redirectUri) {
@@ -926,8 +910,7 @@  discard block
 block discarded – undo
926 910
      *
927 911
      * @return mixed
928 912
      */
929
-    protected function getStoragePID()
930
-    {
913
+    protected function getStoragePID() {
931 914
         return $this->settings['persistence']['classes']['EWW\Dpf\Domain\Model\Document']['newRecordStoragePid'];
932 915
     }
933 916
 
@@ -938,8 +921,7 @@  discard block
 block discarded – undo
938 921
      * @param string $severity
939 922
      * @param string $defaultMessage
940 923
      */
941
-    protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity, $defaultMessage = "")
942
-    {
924
+    protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity, $defaultMessage = "") {
943 925
         // Show success or failure of the action in a flash message
944 926
         if ($document) {
945 927
             $args[] = $document->getTitle();
@@ -966,8 +948,7 @@  discard block
 block discarded – undo
966 948
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
967 949
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
968 950
      */
969
-    protected function updateDocument(\EWW\Dpf\Domain\Model\Document $document, $workflowTransition, $reason)
970
-    {
951
+    protected function updateDocument(\EWW\Dpf\Domain\Model\Document $document, $workflowTransition, $reason) {
971 952
         switch ($workflowTransition) {
972 953
             case DocumentWorkflow::TRANSITION_DISCARD:
973 954
                 $messageKeyPart = 'document_discard';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
46 46
      * @TYPO3\CMS\Extbase\Annotation\Inject
47 47
      */
48
-    protected $documentRepository = null;
48
+    protected $documentRepository = NULL;
49 49
 
50 50
     /**
51 51
      * documentTypeRepository
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
54 54
      * @TYPO3\CMS\Extbase\Annotation\Inject
55 55
      */
56
-    protected $documentTypeRepository = null;
56
+    protected $documentTypeRepository = NULL;
57 57
 
58 58
     /**
59 59
      * inputOptionListRepository
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @var \EWW\Dpf\Domain\Repository\InputOptionListRepository
62 62
      * @TYPO3\CMS\Extbase\Annotation\Inject
63 63
      */
64
-    protected $inputOptionListRepository = null;
64
+    protected $inputOptionListRepository = NULL;
65 65
 
66 66
     /**
67 67
      * persistence manager
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @var \EWW\Dpf\Services\Document\EditingLockService
78 78
      * @TYPO3\CMS\Extbase\Annotation\Inject
79 79
      */
80
-    protected $editingLockService = null;
80
+    protected $editingLockService = NULL;
81 81
 
82 82
     /**
83 83
      * documentValidator
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @var \EWW\Dpf\Domain\Repository\DepositLicenseLogRepository
94 94
      * @TYPO3\CMS\Extbase\Annotation\Inject
95 95
      */
96
-    protected $depositLicenseLogRepository = null;
96
+    protected $depositLicenseLogRepository = NULL;
97 97
 
98 98
     /**
99 99
      * workflow
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @var \EWW\Dpf\Domain\Repository\FileRepository
123 123
      * @TYPO3\CMS\Extbase\Annotation\Inject
124 124
      */
125
-    protected $fileRepository = null;
125
+    protected $fileRepository = NULL;
126 126
 
127 127
 
128 128
     /**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      * @var \EWW\Dpf\Domain\Repository\FrontendUserRepository
132 132
      * @TYPO3\CMS\Extbase\Annotation\Inject
133 133
      */
134
-    protected $frontendUserRepository = null;
134
+    protected $frontendUserRepository = NULL;
135 135
 
136 136
     /**
137 137
      * documentManager
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * @var \EWW\Dpf\Services\Document\DocumentManager
140 140
      * @TYPO3\CMS\Extbase\Annotation\Inject
141 141
      */
142
-    protected $documentManager = null;
142
+    protected $documentManager = NULL;
143 143
 
144 144
     /**
145 145
      * bookmarkRepository
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
148 148
      * @TYPO3\CMS\Extbase\Annotation\Inject
149 149
      */
150
-    protected $bookmarkRepository = null;
150
+    protected $bookmarkRepository = NULL;
151 151
 
152 152
     /**
153 153
      * DocumentController constructor.
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      * @param Document $document
214 214
      * @param bool $acceptAll
215 215
      */
216
-    public function acceptSuggestionAction(\EWW\Dpf\Domain\Model\Document $document, bool $acceptAll = true) {
216
+    public function acceptSuggestionAction(\EWW\Dpf\Domain\Model\Document $document, bool $acceptAll = TRUE) {
217 217
 
218 218
         /** @var DocumentMapper $documentMapper */
219 219
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         if ($acceptAll) {
235 235
             // all changes are confirmed
236 236
             // copy suggest to origin document
237
-            $originDocument->copy($document, true);
237
+            $originDocument->copy($document, TRUE);
238 238
 
239 239
             if ($document->getRemoteState() != DocumentWorkflow::REMOTE_STATE_NONE) {
240 240
                 if ($document->getLocalState() != DocumentWorkflow::LOCAL_STATE_IN_PROGRESS) {
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             );
293 293
 
294 294
             // redirect to document
295
-            $this->redirect('showDetails', 'Document', null, ['document' => $originDocument]);
295
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $originDocument]);
296 296
         }
297 297
 
298 298
         $this->redirectToDocumentList();
@@ -343,11 +343,11 @@  discard block
 block discarded – undo
343 343
                 // groups
344 344
                 foreach ($valueRepeatPage->getItems() as $keyGroup => $valueGroup) {
345 345
 
346
-                    $checkFieldsForAdding = false;
346
+                    $checkFieldsForAdding = FALSE;
347 347
                     $valueGroupCounter = count($valueGroup);
348 348
 
349 349
                     if ($valueGroupCounter < count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup])) {
350
-                        $checkFieldsForAdding = true;
350
+                        $checkFieldsForAdding = TRUE;
351 351
                     }
352 352
 
353 353
                     foreach ($valueGroup as $keyRepeatGroup => $valueRepeatGroup) {
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
                                 $valueFieldCounter = count($valueField);
361 361
 
362 362
                                 // check if group or field is not existing
363
-                                $notExisting = false;
363
+                                $notExisting = FALSE;
364 364
                                 try {
365 365
                                     $flag = 'page';
366 366
                                     $value2 = $docForm2->getItems()[$keyPage];
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                                     $value2 = $value2[$keyRepeatGroup]->getItems()[$keyField];
371 371
                                     $flag = 'field';
372 372
                                 } catch (\Throwable $t) {
373
-                                    $notExisting = true;
373
+                                    $notExisting = TRUE;
374 374
                                 }
375 375
 
376 376
                                 $item = NULL;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_discard.accessDenied';
455 455
             }
456 456
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
457
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
457
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
458 458
             return FALSE;
459 459
         }
460 460
 
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_postpone.accessDenied';
484 484
             }
485 485
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
486
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
486
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
487 487
             return FALSE;
488 488
         }
489 489
 
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.accessDenied';
514 514
             }
515 515
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
516
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
516
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
517 517
             return FALSE;
518 518
         }
519 519
 
@@ -527,12 +527,12 @@  discard block
 block discarded – undo
527 527
             $internalFormat->setDocumentType($documentType->getName());
528 528
             $document->setXmlData($internalFormat->getXml());
529 529
 
530
-            $this->updateDocument($document, '', null);
531
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
530
+            $this->updateDocument($document, '', NULL);
531
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
532 532
         } else {
533 533
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure';
534 534
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
535
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
535
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
536 536
             return FALSE;
537 537
         }
538 538
     }
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
         $this->redirect(
551 551
             'deleteLocally',
552 552
             'Document',
553
-            null,
553
+            NULL,
554 554
             [
555 555
                 'document' => $document,
556 556
                 'tstamp' => $tstamp,
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_deleteLocally.accessDenied';
589 589
             }
590 590
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
591
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
591
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
592 592
             return FALSE;
593 593
         }
594 594
 
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
         } else {
642 642
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_deleteLocally.failureNewVersion';
643 643
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
644
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
644
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
645 645
         }
646 646
     }
647 647
 
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DUPLICATE, $document)) {
656 656
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.accessDenied';
657 657
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
658
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
658
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
659 659
             return FALSE;
660 660
         }
661 661
 
@@ -712,11 +712,11 @@  discard block
 block discarded – undo
712 712
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_PUBLISH, $document)) {
713 713
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.accessDenied';
714 714
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
715
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
715
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
716 716
             return FALSE;
717 717
         }
718 718
         
719
-        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_PUBLISH, null);
719
+        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_PUBLISH, NULL);
720 720
 
721 721
         /** @var Notifier $notifier */
722 722
         $notifier = $this->objectManager->get(Notifier::class);
@@ -735,11 +735,11 @@  discard block
 block discarded – undo
735 735
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_ACTIVATE, $document)) {
736 736
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.accessDenied';
737 737
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
738
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
738
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
739 739
             return FALSE;
740 740
         }
741 741
         
742
-        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE, null);
742
+        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE, NULL);
743 743
         
744 744
     }
745 745
     
@@ -754,13 +754,13 @@  discard block
 block discarded – undo
754 754
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER, $document)) {
755 755
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
756 756
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
757
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
757
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
758 758
         }
759 759
 
760
-        if (!$this->documentValidator->validate($document, false)) {
760
+        if (!$this->documentValidator->validate($document, FALSE)) {
761 761
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.missingValues';
762 762
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
763
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
763
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
764 764
         }
765 765
 
766 766
         $this->workflow->apply($document, \EWW\Dpf\Domain\Workflow\DocumentWorkflow::TRANSITION_REGISTER);
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 
788 788
         $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.success';
789 789
         $this->flashMessage($document, $key, AbstractMessage::OK);
790
-        $this->redirect('showDetails', 'Document', null, ['document' => $document]);
790
+        $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
791 791
     }
792 792
 
793 793
     /**
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
         }
821 821
 
822 822
         $mapper = $this->objectManager->get(DocumentMapper::class);
823
-        $documentForm = $mapper->getDocumentForm($document, false);
823
+        $documentForm = $mapper->getDocumentForm($document, FALSE);
824 824
 
825 825
         $documentTypes = [0 => ''];
826 826
         foreach ($this->documentTypeRepository->getDocumentTypesAlphabetically() as $documentType) {
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SUGGEST_RESTORE, $document)) {
852 852
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_suggestRestore.accessDenied';
853 853
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
854
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
854
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
855 855
             return FALSE;
856 856
         }
857 857
 
@@ -871,8 +871,8 @@  discard block
 block discarded – undo
871 871
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
872 872
         $documentForm = $documentMapper->getDocumentForm($document);
873 873
 
874
-        $this->view->assign('suggestMod', true);
875
-        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
874
+        $this->view->assign('suggestMod', TRUE);
875
+        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => TRUE]);
876 876
     }
877 877
 
878 878
 
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
912 912
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
913 913
      */
914
-    protected function redirectToDocumentList($message = null)
914
+    protected function redirectToDocumentList($message = NULL)
915 915
     {
916 916
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
917 917
 
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
             $message,
955 955
             '',
956 956
             $severity,
957
-            true
957
+            TRUE
958 958
         );
959 959
     }
960 960
 
Please login to merge, or discard this patch.
Classes/Controller/DocumentFormBackofficeController.php 3 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     }
93 93
 
94 94
     public function arrayRecursiveDiff($aArray1, $aArray2) {
95
-        $aReturn = array();
95
+        $aReturn = array ();
96 96
 
97 97
         foreach ($aArray1 as $mKey => $mValue) {
98 98
             if (array_key_exists($mKey, $aArray2)) {
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
                 $message = LocalizationUtility::translate(
147 147
                     'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.accessDenied',
148 148
                     'dpf',
149
-                    array($document->getTitle())
149
+                    array ($document->getTitle())
150 150
                 );
151 151
             } else {
152 152
                 $message = LocalizationUtility::translate(
153 153
                     'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.failureBlocked',
154 154
                     'dpf',
155
-                    array($document->getTitle())
155
+                    array ($document->getTitle())
156 156
                 );
157 157
             }
158 158
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         $this->view->assign('suggestMod', $suggestMod);
166 166
 
167 167
         $this->editingLockService->lock(
168
-            ($document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid()),
168
+            ($document->getObjectIdentifier() ? $document->getObjectIdentifier() : $document->getUid()),
169 169
             $this->security->getUser()->getUid()
170 170
         );
171 171
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
         } catch (\Throwable $t) {
288 288
             $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR;
289
-            $this->addFlashMessage("Failed", '', $severity,false);
289
+            $this->addFlashMessage("Failed", '', $severity, false);
290 290
         }
291 291
 
292 292
         $this->redirectToDocumentList();
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                 $message = LocalizationUtility::translate(
349 349
                     'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.accessDenied',
350 350
                     'dpf',
351
-                    array($document->getTitle())
351
+                    array ($document->getTitle())
352 352
                 );
353 353
                 $this->addFlashMessage($message, '', AbstractMessage::ERROR);
354 354
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             $workflowTransition = null;
377 377
 
378 378
             // Convert the temporary copy into a local working copy if needed.
379
-            if ( $updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') {
379
+            if ($updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') {
380 380
                 $saveWorkingCopy = true;
381 381
                 $updateDocument->setTemporary(false);
382 382
                 $workflowTransition = DocumentWorkflow::TRANSITION_IN_PROGRESS;
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                 $message = LocalizationUtility::translate(
429 429
                     'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.success',
430 430
                     'dpf',
431
-                    array($updateDocument->getTitle())
431
+                    array ($updateDocument->getTitle())
432 432
                 );
433 433
                 $this->addFlashMessage($message, '', AbstractMessage::OK);
434 434
 
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
                 $message = LocalizationUtility::translate(
483 483
                     'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure',
484 484
                     'dpf',
485
-                    array($updateDocument->getTitle())
485
+                    array ($updateDocument->getTitle())
486 486
                 );
487 487
                 $this->addFlashMessage($message, '', AbstractMessage::ERROR);
488 488
             }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
             $exceptionMsg[] = LocalizationUtility::translate(
517 517
                 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure',
518 518
                 'dpf',
519
-                array($updateDocument->getTitle())
519
+                array ($updateDocument->getTitle())
520 520
             );
521 521
 
522 522
             $exceptionMsg[] = LocalizationUtility::translate($key, 'dpf');
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
         if ($redirectUri) {
646 646
             $this->redirectToUri($redirectUri);
647 647
         } else {
648
-            $this->redirect($action, $controller, null, array('message' => $message));
648
+            $this->redirect($action, $controller, null, array ('message' => $message));
649 649
         }
650 650
     }
651 651
 }
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
32 32
 
33
-class DocumentFormBackofficeController extends AbstractDocumentFormController
34
-{
33
+class DocumentFormBackofficeController extends AbstractDocumentFormController {
35 34
     /**
36 35
      * documentTransferManager
37 36
      *
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
     /**
82 81
      * DocumentController constructor.
83 82
      */
84
-    public function __construct()
85
-    {
83
+    public function __construct() {
86 84
         parent::__construct();
87 85
 
88 86
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
         $activeGroup = '',
130 128
         $activeGroupIndex = 0,
131 129
         $addCurrentFeUser = true
132
-    )
133
-    {
130
+    ) {
134 131
         /** @var \EWW\Dpf\Domain\Model\Document $document */
135 132
         $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
136 133
 
@@ -179,8 +176,7 @@  discard block
 block discarded – undo
179 176
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
180 177
      * @param bool $restore
181 178
      */
182
-    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE)
183
-    {
179
+    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE) {
184 180
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
185 181
 
186 182
         $hasFilesFlag = true;
@@ -293,8 +289,7 @@  discard block
 block discarded – undo
293 289
     }
294 290
 
295 291
 
296
-    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm)
297
-    {
292
+    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm) {
298 293
         if ($this->request->getArgument('documentData')['suggestMod']) {
299 294
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
300 295
             $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
@@ -331,8 +326,7 @@  discard block
 block discarded – undo
331 326
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
332 327
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
333 328
      */
334
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false)
335
-    {
329
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false) {
336 330
         try {
337 331
             /** @var \EWW\Dpf\Domain\Model\Document $document */
338 332
             $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -531,8 +525,7 @@  discard block
 block discarded – undo
531 525
         }
532 526
     }
533 527
 
534
-    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm)
535
-    {
528
+    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) {
536 529
         /** @var \EWW\Dpf\Helper\DocumentMapper $documentMapper */
537 530
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
538 531
 
@@ -598,8 +591,7 @@  discard block
 block discarded – undo
598 591
      *
599 592
      * @return void
600 593
      */
601
-    public function cancelEditAction($documentUid = 0, $backToList = false)
602
-    {
594
+    public function cancelEditAction($documentUid = 0, $backToList = false) {
603 595
         if (empty($documentUid) || $backToList) {
604 596
             $this->redirectToDocumentList();
605 597
         }
@@ -617,14 +609,12 @@  discard block
 block discarded – undo
617 609
      *
618 610
      * @return void
619 611
      */
620
-    public function cancelNewAction()
621
-    {
612
+    public function cancelNewAction() {
622 613
         $this->redirect('list');
623 614
     }
624 615
 
625 616
 
626
-    public function initializeAction()
627
-    {
617
+    public function initializeAction() {
628 618
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
629 619
 
630 620
         parent::initializeAction();
@@ -638,8 +628,7 @@  discard block
 block discarded – undo
638 628
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
639 629
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
640 630
      */
641
-    protected function redirectToDocumentList($message = null)
642
-    {
631
+    protected function redirectToDocumentList($message = null) {
643 632
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
644 633
 
645 634
         if ($redirectUri) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @var \EWW\Dpf\Services\Document\EditingLockService
53 53
      * @TYPO3\CMS\Extbase\Annotation\Inject
54 54
      */
55
-    protected $editingLockService = null;
55
+    protected $editingLockService = NULL;
56 56
 
57 57
     /**
58 58
      * documentManager
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @var \EWW\Dpf\Services\Document\DocumentManager
61 61
      * @TYPO3\CMS\Extbase\Annotation\Inject
62 62
      */
63
-    protected $documentManager = null;
63
+    protected $documentManager = NULL;
64 64
 
65 65
     /**
66 66
      * bookmarkRepository
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
69 69
      * @TYPO3\CMS\Extbase\Annotation\Inject
70 70
      */
71
-    protected $bookmarkRepository = null;
71
+    protected $bookmarkRepository = NULL;
72 72
 
73 73
     /**
74 74
      * clientConfigurationManager
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function editAction(
127 127
         \EWW\Dpf\Domain\Model\DocumentForm $documentForm,
128
-        bool $suggestMod = false,
128
+        bool $suggestMod = FALSE,
129 129
         $activeGroup = '',
130 130
         $activeGroupIndex = 0,
131
-        $addCurrentFeUser = true
131
+        $addCurrentFeUser = TRUE
132 132
     )
133 133
     {
134 134
         /** @var \EWW\Dpf\Domain\Model\Document $document */
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             }
158 158
 
159 159
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
160
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
160
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
161 161
             return FALSE;
162 162
         }
163 163
 
@@ -183,17 +183,17 @@  discard block
 block discarded – undo
183 183
     {
184 184
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
185 185
 
186
-        $hasFilesFlag = true;
186
+        $hasFilesFlag = TRUE;
187 187
 
188 188
         $workingCopy = $this->documentRepository->findByUid($documentForm->getDocumentUid());
189 189
 
190 190
         if ($workingCopy->isTemporary()) {
191
-            $workingCopy->setTemporary(false);
191
+            $workingCopy->setTemporary(FALSE);
192 192
         }
193 193
 
194 194
         if (empty($workingCopy->getFileData())) {
195 195
             // no files are linked to the document
196
-            $hasFilesFlag = false;
196
+            $hasFilesFlag = FALSE;
197 197
         }
198 198
 
199 199
         $newDocument = $this->objectManager->get(Document::class);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             $newDocument->setLinkedUid($document->getUid());
214 214
         }
215 215
 
216
-        $newDocument->setSuggestion(true);
216
+        $newDocument->setSuggestion(TRUE);
217 217
         $newDocument->setComment($document->getComment());
218 218
 
219 219
         if ($restore) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                     ''
251 251
                 );
252 252
             }
253
-            $this->addFlashMessage($flashMessage, '', AbstractMessage::OK, true);
253
+            $this->addFlashMessage($flashMessage, '', AbstractMessage::OK, TRUE);
254 254
 
255 255
             $notifier = $this->objectManager->get(Notifier::class);
256 256
             $notifier->sendAdminNewSuggestionNotification($newDocument);
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
         } catch (\Throwable $t) {
288 288
             $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR;
289
-            $this->addFlashMessage("Failed", '', $severity,false);
289
+            $this->addFlashMessage("Failed", '', $severity,FALSE);
290 290
         }
291 291
 
292 292
         $this->redirectToDocumentList();
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     {
298 298
         if ($this->request->getArgument('documentData')['suggestMod']) {
299 299
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
300
-            $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
300
+            $this->forward('createSuggestionDocument', NULL, NULL, ['documentForm' => $documentForm, 'restore' => $restore]);
301 301
         }
302 302
 
303 303
         $backToList = $this->request->getArgument('documentData')['backToList'];
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         } elseif ($this->request->hasArgument('saveWorkingCopy')) {
308 308
             $saveMode = 'saveWorkingCopy';
309 309
         } else {
310
-            $saveMode = null;
310
+            $saveMode = NULL;
311 311
         }
312 312
 
313 313
         $this->forward(
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
332 332
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
333 333
      */
334
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false)
334
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = NULL, $backToList = FALSE)
335 335
     {
336 336
         try {
337 337
             /** @var \EWW\Dpf\Domain\Model\Document $document */
@@ -353,8 +353,8 @@  discard block
 block discarded – undo
353 353
                 $this->addFlashMessage($message, '', AbstractMessage::ERROR);
354 354
 
355 355
                 $this->redirect('cancelEdit',
356
-                    null,
357
-                    null,
356
+                    NULL,
357
+                    NULL,
358 358
                     ['documentUid' => $document->getUid(), 'backToList' => $backToList]
359 359
                 );
360 360
                 /*
@@ -372,13 +372,13 @@  discard block
 block discarded – undo
372 372
             /** @var \EWW\Dpf\Domain\Model\Document $updateDocument */
373 373
             $updateDocument = $documentMapper->getDocument($documentForm);
374 374
 
375
-            $saveWorkingCopy = false;
376
-            $workflowTransition = null;
375
+            $saveWorkingCopy = FALSE;
376
+            $workflowTransition = NULL;
377 377
 
378 378
             // Convert the temporary copy into a local working copy if needed.
379 379
             if ( $updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') {
380
-                $saveWorkingCopy = true;
381
-                $updateDocument->setTemporary(false);
380
+                $saveWorkingCopy = TRUE;
381
+                $updateDocument->setTemporary(FALSE);
382 382
                 $workflowTransition = DocumentWorkflow::TRANSITION_IN_PROGRESS;
383 383
             } elseif ($updateDocument->isTemporaryCopy() && $saveMode == 'saveAndUpdate') {
384 384
                 $workflowTransition = DocumentWorkflow::TRANSITION_REMOTE_UPDATE;
@@ -491,8 +491,8 @@  discard block
 block discarded – undo
491 491
                 $this->redirectToDocumentList();
492 492
             } else {
493 493
                 $this->redirect('cancelEdit',
494
-                    null,
495
-                    null,
494
+                    NULL,
495
+                    NULL,
496 496
                     ['documentUid' => $updateDocument->getUid(), 'backToList' => $backToList]
497 497
                 );
498 498
                 // $this->redirect('showDetails', 'Document', null, ['document' => $updateDocument]);
@@ -517,13 +517,13 @@  discard block
 block discarded – undo
517 517
 
518 518
             $exceptionMsg[] = LocalizationUtility::translate($key, 'dpf');
519 519
 
520
-            $this->addFlashMessage(implode(" ", $exceptionMsg), '', $severity, true);
520
+            $this->addFlashMessage(implode(" ", $exceptionMsg), '', $severity, TRUE);
521 521
             $this->redirect('cancelEdit',
522
-                null,
523
-                null,
522
+                NULL,
523
+                NULL,
524 524
                 ['documentUid' => $updateDocument->getUid(), 'backToList' => $backToList]
525 525
             );
526
-            $this->redirect('showDetails', 'Document', null, ['document' => $updateDocument]);
526
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $updateDocument]);
527 527
         }
528 528
     }
529 529
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
             $args[] = $document->getTitle();
541 541
             $message = LocalizationUtility::translate($key, 'dpf', $args);
542 542
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
543
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
543
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
544 544
             return FALSE;
545 545
         }
546 546
 
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                 $message,
555 555
                 '',
556 556
                 $severity,
557
-                true
557
+                TRUE
558 558
             );
559 559
 
560 560
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
                 implode(" ", $message),
577 577
                 '',
578 578
                 $severity,
579
-                true
579
+                TRUE
580 580
             );
581 581
         }
582 582
 
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      *
595 595
      * @return void
596 596
      */
597
-    public function cancelEditAction($documentUid = 0, $backToList = false)
597
+    public function cancelEditAction($documentUid = 0, $backToList = FALSE)
598 598
     {
599 599
         if (empty($documentUid) || $backToList) {
600 600
             $this->redirectToDocumentList();
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 
603 603
         /** @var $document \EWW\Dpf\Domain\Model\Document */
604 604
         $document = $this->documentRepository->findByUid($documentUid);
605
-        $this->redirect('showDetails', 'Document', null, ['document' => $document]);
605
+        $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
606 606
     }
607 607
 
608 608
     /**
@@ -634,14 +634,14 @@  discard block
 block discarded – undo
634 634
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
635 635
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
636 636
      */
637
-    protected function redirectToDocumentList($message = null)
637
+    protected function redirectToDocumentList($message = NULL)
638 638
     {
639 639
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
640 640
 
641 641
         if ($redirectUri) {
642 642
             $this->redirectToUri($redirectUri);
643 643
         } else {
644
-            $this->redirect($action, $controller, null, array('message' => $message));
644
+            $this->redirect($action, $controller, NULL, array('message' => $message));
645 645
         }
646 646
     }
647 647
 }
Please login to merge, or discard this patch.
Classes/Controller/WorkspaceController.php 3 patches
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 /**
28 28
  * Controller for the "workspace"/"my publications" area.
29 29
  */
30
-class WorkspaceController extends AbstractController
31
-{
30
+class WorkspaceController extends AbstractController {
32 31
     /**
33 32
      * FrontendUserRepository
34 33
      *
@@ -121,8 +120,7 @@  discard block
 block discarded – undo
121 120
     protected $fisDataService = null;
122 121
 
123 122
 
124
-    public function initializeAction()
125
-    {
123
+    public function initializeAction() {
126 124
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
127 125
 
128 126
         parent::initializeAction();
@@ -217,8 +215,7 @@  discard block
 block discarded – undo
217 215
      *
218 216
      * @return void
219 217
      */
220
-    protected function listWorkspaceAction($checkedDocumentIdentifiers = [])
221
-    {
218
+    protected function listWorkspaceAction($checkedDocumentIdentifiers = []) {
222 219
         $args = $this->request->getArguments();
223 220
         if ($args['refresh']) {
224 221
             $workspaceSessionData = $this->session->getWorkspaceData();
@@ -264,8 +261,7 @@  discard block
 block discarded – undo
264 261
      * Batch operations action.
265 262
      * @param array $listData
266 263
      */
267
-    public function batchAction($listData)
268
-    {
264
+    public function batchAction($listData) {
269 265
         if (array_key_exists('action', $listData)) {
270 266
             $this->forward($listData['action'], null, null, ['listData' => $listData]);
271 267
         }
@@ -276,8 +272,7 @@  discard block
 block discarded – undo
276 272
      * @param array $listData
277 273
      * @throws \EWW\Dpf\Exceptions\DocumentMaxSizeErrorException
278 274
      */
279
-    public function batchRegisterAction($listData)
280
-    {
275
+    public function batchRegisterAction($listData) {
281 276
         $successful = [];
282 277
         $checkedDocumentIdentifiers = [];
283 278
 
@@ -359,8 +354,7 @@  discard block
 block discarded – undo
359 354
      * Batch operation, set documents to "In progress".
360 355
      * @param array $listData
361 356
      */
362
-    public function batchSetInProgressAction($listData)
363
-    {
357
+    public function batchSetInProgressAction($listData) {
364 358
         $successful = [];
365 359
         $checkedDocumentIdentifiers = [];
366 360
 
@@ -429,8 +423,7 @@  discard block
 block discarded – undo
429 423
      * Batch operation, remove documents.
430 424
      * @param array $listData
431 425
      */
432
-    public function batchRemoveAction($listData)
433
-    {
426
+    public function batchRemoveAction($listData) {
434 427
         $successful = [];
435 428
         $checkedDocumentIdentifiers = [];
436 429
 
@@ -479,8 +472,7 @@  discard block
 block discarded – undo
479 472
      * Batch operation, release documents.
480 473
      * @param array $listData
481 474
      */
482
-    public function batchReleaseValidatedAction($listData)
483
-    {
475
+    public function batchReleaseValidatedAction($listData) {
484 476
         $this->batchRelease($listData, true);
485 477
     }
486 478
 
@@ -488,8 +480,7 @@  discard block
 block discarded – undo
488 480
      * Batch operation, release as unvalidated documents.
489 481
      * @param array $listData
490 482
      */
491
-    public function batchReleaseUnvalidatedAction($listData)
492
-    {
483
+    public function batchReleaseUnvalidatedAction($listData) {
493 484
         $this->batchRelease($listData, false);
494 485
     }
495 486
 
@@ -501,8 +492,7 @@  discard block
 block discarded – undo
501 492
      * @param array $listData
502 493
      * @param bool $validated
503 494
      */
504
-    protected function batchRelease($listData, $validated)
505
-    {
495
+    protected function batchRelease($listData, $validated) {
506 496
         $successful = [];
507 497
         $checkedDocumentIdentifiers = [];
508 498
 
@@ -619,8 +609,7 @@  discard block
 block discarded – undo
619 609
      */
620 610
     protected function getWorkspaceQuery(
621 611
         $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], $sortField = null, $sortOrder = null
622
-    )
623
-    {
612
+    ) {
624 613
         $workspaceFilter = [
625 614
             'bool' => [
626 615
                 'must' => [
@@ -671,8 +660,7 @@  discard block
 block discarded – undo
671 660
      */
672 661
     protected function getMyPublicationsQuery(
673 662
         $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], $sortField = null, $sortOrder = null
674
-    )
675
-    {
663
+    ) {
676 664
         $workspaceFilter = [
677 665
             'bool' => [
678 666
                 'must' => [
@@ -730,8 +718,7 @@  discard block
 block discarded – undo
730 718
      * @param int $stop
731 719
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
732 720
      */
733
-    public function initIndexAction($start = 1, $stop = 100)
734
-    {
721
+    public function initIndexAction($start = 1, $stop = 100) {
735 722
         /** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
736 723
         $signalSlotDispatcher = $this->objectManager->get(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
737 724
 
@@ -797,8 +784,7 @@  discard block
 block discarded – undo
797 784
      * @param int $activeGroupIndex
798 785
      * @return void
799 786
      */
800
-    public function editDocumentAction($documentIdentifier, $activeGroup = '', $activeGroupIndex = 0)
801
-    {
787
+    public function editDocumentAction($documentIdentifier, $activeGroup = '', $activeGroupIndex = 0) {
802 788
         $document = $this->documentManager->read(
803 789
             $documentIdentifier,
804 790
             $this->security->getUser()->getUID()
@@ -868,8 +854,7 @@  discard block
 block discarded – undo
868 854
      *
869 855
      * @return int
870 856
      */
871
-    protected function itemsPerPage()
872
-    {
857
+    protected function itemsPerPage() {
873 858
         /** @var SearchSessionData $workspaceData */
874 859
         $workspaceData = $this->session->getWorkspaceData();
875 860
         $itemsPerPage = $workspaceData->getItemsPerPage();
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             list($redirectAction, $redirectController) = $this->session->getStoredAction();
183 183
             $this->redirect(
184 184
                 $redirectAction, $redirectController, null,
185
-                array('message' => [], 'checkedDocumentIdentifiers' => [])
185
+                array ('message' => [], 'checkedDocumentIdentifiers' => [])
186 186
             );
187 187
         }
188 188
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             $currentPage = 1;
253 253
         }
254 254
 
255
-        $this->list((empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage()));
255
+        $this->list((empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage()));
256 256
 
257 257
         $this->view->assign('currentPage', $currentPage);
258 258
         $this->view->assign('workspaceListAction', $this->getCurrentAction());
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $successful = [];
282 282
         $checkedDocumentIdentifiers = [];
283 283
 
284
-        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) {
284
+        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) {
285 285
             $checkedDocumentIdentifiers = $listData['documentIdentifiers'];
286 286
             foreach ($listData['documentIdentifiers'] as $documentIdentifier) {
287 287
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
353 353
         $this->redirect(
354 354
             $redirectAction, $redirectController, null,
355
-            array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
355
+            array ('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
356 356
     }
357 357
 
358 358
     /**
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $successful = [];
365 365
         $checkedDocumentIdentifiers = [];
366 366
 
367
-        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) {
367
+        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) {
368 368
             $checkedDocumentIdentifiers = $listData['documentIdentifiers'];
369 369
             foreach ($listData['documentIdentifiers'] as $documentIdentifier) {
370 370
 
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
423 423
         $this->redirect(
424 424
             $redirectAction, $redirectController, null,
425
-            array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
425
+            array ('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
426 426
     }
427 427
 
428 428
     /**
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         $successful = [];
435 435
         $checkedDocumentIdentifiers = [];
436 436
 
437
-        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) {
437
+        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) {
438 438
             $checkedDocumentIdentifiers = $listData['documentIdentifiers'];
439 439
             foreach ($listData['documentIdentifiers'] as $documentIdentifier) {
440 440
                 $feUserUid = $this->security->getUser()->getUid();
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
472 472
         $this->redirect(
473 473
             $redirectAction, $redirectController, null,
474
-            array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
474
+            array ('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
475 475
     }
476 476
 
477 477
 
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         $successful = [];
507 507
         $checkedDocumentIdentifiers = [];
508 508
 
509
-        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) {
509
+        if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) {
510 510
             $checkedDocumentIdentifiers = $listData['documentIdentifiers'];
511 511
             foreach ($listData['documentIdentifiers'] as $documentIdentifier) {
512 512
 
@@ -573,15 +573,15 @@  discard block
 block discarded – undo
573 573
                 (sizeof($successful) > 0 ? AbstractMessage::OK : AbstractMessage::WARNING)
574 574
             );
575 575
 
576
-            if (sizeof($successful) === 1 ) {
576
+            if (sizeof($successful) === 1) {
577 577
                 $this->addFlashMessage(
578
-                    "1 ".LocalizationUtility::translate("manager.workspace.bookmarkRemoved.singular", "dpf"),
578
+                    "1 " . LocalizationUtility::translate("manager.workspace.bookmarkRemoved.singular", "dpf"),
579 579
                     '',
580 580
                     AbstractMessage::INFO
581 581
                 );
582 582
             }
583 583
 
584
-            if (sizeof($successful) > 1 ) {
584
+            if (sizeof($successful) > 1) {
585 585
                 $this->addFlashMessage(
586 586
                     LocalizationUtility::translate(
587 587
                         "manager.workspace.bookmarkRemoved.plural", "dpf", [sizeof($successful)]
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
602 602
         $this->redirect(
603 603
             $redirectAction, $redirectController, null,
604
-            array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
604
+            array ('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
605 605
 
606 606
     }
607 607
 
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
             ]
692 692
         ];
693 693
 
694
-        $fisPersIdFilter =  [
694
+        $fisPersIdFilter = [
695 695
             'bool' => [
696 696
                 'must' => [
697 697
                     [
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
         for ($i = $start; $i < $stop; $i++) {
745 745
             try {
746 746
                 $document = $documentTransferManager->retrieve(
747
-                    $this->settings['fedoraPidNamespace'].':' . $i
747
+                    $this->settings['fedoraPidNamespace'] . ':' . $i
748 748
                 );
749 749
 
750 750
                 if ($document instanceof Document) {
@@ -835,13 +835,13 @@  discard block
 block discarded – undo
835 835
                     $message = LocalizationUtility::translate(
836 836
                         'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.accessDenied',
837 837
                         'dpf',
838
-                        array($document->getTitle())
838
+                        array ($document->getTitle())
839 839
                     );
840 840
                 } else {
841 841
                     $message = LocalizationUtility::translate(
842 842
                         'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.failureBlocked',
843 843
                         'dpf',
844
-                        array($document->getTitle())
844
+                        array ($document->getTitle())
845 845
                     );
846 846
                 }
847 847
             }
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
         if ($redirectUri) {
860 860
             $this->redirectToUri($redirectUri);
861 861
         } else {
862
-            $this->redirect($action, $controller, null, array('message' => $message));
862
+            $this->redirect($action, $controller, null, array ('message' => $message));
863 863
         }
864 864
 
865 865
     }
@@ -876,8 +876,8 @@  discard block
 block discarded – undo
876 876
         $workspaceData = $this->session->getWorkspaceData();
877 877
         $itemsPerPage = $workspaceData->getItemsPerPage();
878 878
 
879
-        $default = ($this->settings['workspaceItemsPerPage'])? $this->settings['workspaceItemsPerPage'] : 10;
880
-        return ($itemsPerPage)? $itemsPerPage : $default;
879
+        $default = ($this->settings['workspaceItemsPerPage']) ? $this->settings['workspaceItemsPerPage'] : 10;
880
+        return ($itemsPerPage) ? $itemsPerPage : $default;
881 881
     }
882 882
 
883 883
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +28 added lines, -28 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
      * @TYPO3\CMS\Extbase\Annotation\Inject
45 45
      */
46
-    protected $documentRepository = null;
46
+    protected $documentRepository = NULL;
47 47
 
48 48
     /**
49 49
      * documentTypeRepository
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
52 52
      * @TYPO3\CMS\Extbase\Annotation\Inject
53 53
      */
54
-    protected $documentTypeRepository = null;
54
+    protected $documentTypeRepository = NULL;
55 55
 
56 56
     /**
57 57
      * bookmarkRepository
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
60 60
      * @TYPO3\CMS\Extbase\Annotation\Inject
61 61
      */
62
-    protected $bookmarkRepository = null;
62
+    protected $bookmarkRepository = NULL;
63 63
 
64 64
     /**
65 65
      * elasticSearch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @var \EWW\Dpf\Services\ElasticSearch\ElasticSearch
68 68
      * @TYPO3\CMS\Extbase\Annotation\Inject
69 69
      */
70
-    protected $elasticSearch = null;
70
+    protected $elasticSearch = NULL;
71 71
 
72 72
 
73 73
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @var \EWW\Dpf\Services\ElasticSearch\QueryBuilder
77 77
      * @TYPO3\CMS\Extbase\Annotation\Inject
78 78
      */
79
-    protected $queryBuilder = null;
79
+    protected $queryBuilder = NULL;
80 80
 
81 81
 
82 82
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @var \EWW\Dpf\Services\Document\DocumentManager
86 86
      * @TYPO3\CMS\Extbase\Annotation\Inject
87 87
      */
88
-    protected $documentManager = null;
88
+    protected $documentManager = NULL;
89 89
 
90 90
     /**
91 91
      * documentValidator
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @var \EWW\Dpf\Services\Document\EditingLockService
102 102
      * @TYPO3\CMS\Extbase\Annotation\Inject
103 103
      */
104
-    protected $editingLockService = null;
104
+    protected $editingLockService = NULL;
105 105
 
106 106
 
107 107
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @var \EWW\Dpf\Services\FeUser\FisDataService
119 119
      * @TYPO3\CMS\Extbase\Annotation\Inject
120 120
      */
121
-    protected $fisDataService = null;
121
+    protected $fisDataService = NULL;
122 122
 
123 123
 
124 124
     public function initializeAction()
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $this->session->setWorkspaceData($workspaceSessionData);
182 182
             list($redirectAction, $redirectController) = $this->session->getStoredAction();
183 183
             $this->redirect(
184
-                $redirectAction, $redirectController, null,
184
+                $redirectAction, $redirectController, NULL,
185 185
                 array('message' => [], 'checkedDocumentIdentifiers' => [])
186 186
             );
187 187
         }
@@ -229,9 +229,9 @@  discard block
 block discarded – undo
229 229
         }
230 230
 
231 231
         if ($this->security->getUserRole() === Security::ROLE_LIBRARIAN) {
232
-            $this->view->assign('isWorkspace', true);
232
+            $this->view->assign('isWorkspace', TRUE);
233 233
         } elseif ($this->security->getUserRole() === Security::ROLE_RESEARCHER) {
234
-            $this->view->assign('isWorkspace', false);
234
+            $this->view->assign('isWorkspace', FALSE);
235 235
         } else {
236 236
             $message = LocalizationUtility::translate(
237 237
                 'manager.workspace.accessDenied', 'dpf'
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $this->uriBuilder->getRequest()->getRequestUri()
244 244
         );
245 245
 
246
-        $currentPage = null;
246
+        $currentPage = NULL;
247 247
         $pagination = $this->getParametersSafely('@widget_0');
248 248
         if ($pagination) {
249 249
             $checkedDocumentIdentifiers = [];
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     public function batchAction($listData)
268 268
     {
269 269
         if (array_key_exists('action', $listData)) {
270
-            $this->forward($listData['action'], null, null, ['listData' => $listData]);
270
+            $this->forward($listData['action'], NULL, NULL, ['listData' => $listData]);
271 271
         }
272 272
     }
273 273
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
353 353
         $this->redirect(
354
-            $redirectAction, $redirectController, null,
354
+            $redirectAction, $redirectController, NULL,
355 355
             array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
356 356
     }
357 357
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
                     if ($this->authorizationChecker->isGranted(DocumentVoter::UPDATE, $document)) {
378 378
 
379
-                        $document->setTemporary(false);
379
+                        $document->setTemporary(FALSE);
380 380
 
381 381
                             if (
382 382
                                 $this->documentManager->update(
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
423 423
         $this->redirect(
424
-            $redirectAction, $redirectController, null,
424
+            $redirectAction, $redirectController, NULL,
425 425
             array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
426 426
     }
427 427
 
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 
471 471
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
472 472
         $this->redirect(
473
-            $redirectAction, $redirectController, null,
473
+            $redirectAction, $redirectController, NULL,
474 474
             array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
475 475
     }
476 476
 
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
      */
482 482
     public function batchReleaseValidatedAction($listData)
483 483
     {
484
-        $this->batchRelease($listData, true);
484
+        $this->batchRelease($listData, TRUE);
485 485
     }
486 486
 
487 487
     /**
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
      */
491 491
     public function batchReleaseUnvalidatedAction($listData)
492 492
     {
493
-        $this->batchRelease($listData, false);
493
+        $this->batchRelease($listData, FALSE);
494 494
     }
495 495
 
496 496
 
@@ -533,8 +533,8 @@  discard block
 block discarded – undo
533 533
                         $documentWorkflowTransition = DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE;
534 534
                         break;
535 535
                     default:
536
-                        $documentVoterAttribute = null;
537
-                        $documentWorkflowTransition = null;
536
+                        $documentVoterAttribute = NULL;
537
+                        $documentWorkflowTransition = NULL;
538 538
                         break;
539 539
                 }
540 540
 
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 
601 601
         list($redirectAction, $redirectController) = $this->session->getStoredAction();
602 602
         $this->redirect(
603
-            $redirectAction, $redirectController, null,
603
+            $redirectAction, $redirectController, NULL,
604 604
             array('message' => $message, 'checkedDocumentIdentifiers' =>  $checkedDocumentIdentifiers));
605 605
 
606 606
     }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
      * @return array
619 619
      */
620 620
     protected function getWorkspaceQuery(
621
-        $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], $sortField = null, $sortOrder = null
621
+        $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], $sortField = NULL, $sortOrder = NULL
622 622
     )
623 623
     {
624 624
         $workspaceFilter = [
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
      * @return array
671 671
      */
672 672
     protected function getMyPublicationsQuery(
673
-        $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], $sortField = null, $sortOrder = null
673
+        $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], $sortField = NULL, $sortOrder = NULL
674 674
     )
675 675
     {
676 676
         $workspaceFilter = [
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
                 $this->redirect(
812 812
                     'edit',
813 813
                     'DocumentFormBackoffice',
814
-                    null,
814
+                    NULL,
815 815
                     [
816 816
                         'document' => $document,
817 817
                         'activeGroup' => $activeGroup,
@@ -822,10 +822,10 @@  discard block
 block discarded – undo
822 822
                 $this->redirect(
823 823
                     'edit',
824 824
                     'DocumentFormBackoffice',
825
-                    null,
825
+                    NULL,
826 826
                     [
827 827
                         'document' => $document,
828
-                        'suggestMod' => true,
828
+                        'suggestMod' => TRUE,
829 829
                         'activeGroup' => $activeGroup,
830 830
                         'activeGroupIndex' => $activeGroupIndex
831 831
                     ]
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
         if ($redirectUri) {
860 860
             $this->redirectToUri($redirectUri);
861 861
         } else {
862
-            $this->redirect($action, $controller, null, array('message' => $message));
862
+            $this->redirect($action, $controller, NULL, array('message' => $message));
863 863
         }
864 864
 
865 865
     }
Please login to merge, or discard this patch.
Classes/Controller/AbstractController.php 2 patches
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 use TYPO3\CMS\Core\Log\LogManager;
20 20
 
21 21
 
22
-abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
23
-{
22
+abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
24 23
     /**
25 24
      * authorizationChecker
26 25
      *
@@ -69,14 +68,12 @@  discard block
 block discarded – undo
69 68
     protected $logger = null;
70 69
 
71 70
 
72
-    public function __construct()
73
-    {
71
+    public function __construct() {
74 72
         /** @var $logger \TYPO3\CMS\Core\Log\Logger */
75 73
         $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
76 74
     }
77 75
 
78
-    protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
79
-    {
76
+    protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) {
80 77
         parent::initializeView($view);
81 78
 
82 79
         $client = $this->clientRepository->findAll()->current();
@@ -102,8 +99,7 @@  discard block
 block discarded – undo
102 99
      * @param string $key
103 100
      * @param string $data
104 101
      */
105
-    public function setSessionData($key, $data)
106
-    {
102
+    public function setSessionData($key, $data) {
107 103
         if (!empty($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
108 104
 
109 105
             $userGlobals = $GLOBALS['TSFE']->fe_user;
@@ -126,8 +122,7 @@  discard block
 block discarded – undo
126 122
      *
127 123
      * @return
128 124
      */
129
-    public function getSessionData($key)
130
-    {
125
+    public function getSessionData($key) {
131 126
         if (!empty($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
132 127
 
133 128
             $userGlobals = $GLOBALS['TSFE']->fe_user;
@@ -148,8 +143,7 @@  discard block
 block discarded – undo
148 143
      *
149 144
      * @return null|string
150 145
      */
151
-    protected function getParametersSafely($parameterName)
152
-    {
146
+    protected function getParametersSafely($parameterName) {
153 147
         if ($this->request->hasArgument($parameterName)) {
154 148
             return $this->filterSafelyParameters($this->request->getArgument($parameterName));
155 149
         }
@@ -163,8 +157,7 @@  discard block
 block discarded – undo
163 157
      *
164 158
      * @return string
165 159
      */
166
-    protected function filterSafelyParameters($param)
167
-    {
160
+    protected function filterSafelyParameters($param) {
168 161
         if (is_array($param)) {
169 162
             foreach ($param as $key => $item) {
170 163
                 $param[$key] = $this->filterSafelyParameters($item);
@@ -175,8 +168,7 @@  discard block
 block discarded – undo
175 168
         }
176 169
     }
177 170
 
178
-    public function initializeAction()
179
-    {
171
+    public function initializeAction() {
180 172
         parent::initializeAction();
181 173
 
182 174
         $signalSlotDispatcher = GeneralUtility::makeInstance(Dispatcher::class);
@@ -184,13 +176,11 @@  discard block
 block discarded – undo
184 176
     }
185 177
 
186 178
 
187
-    public function getCurrentAction()
188
-    {
179
+    public function getCurrentAction() {
189 180
         return str_replace('Action', '', $this->actionMethodName);
190 181
     }
191 182
 
192
-    public function getCurrentController()
193
-    {
183
+    public function getCurrentController() {
194 184
         $controllerName = end(explode('\\', get_Class($this)));
195 185
         return str_replace('Controller', '', $controllerName);
196 186
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @var \EWW\Dpf\Security\AuthorizationChecker
28 28
      * @TYPO3\CMS\Extbase\Annotation\Inject
29 29
      */
30
-    protected $authorizationChecker = null;
30
+    protected $authorizationChecker = NULL;
31 31
 
32 32
     /**
33 33
      * security
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @var \EWW\Dpf\Security\Security
36 36
      * @TYPO3\CMS\Extbase\Annotation\Inject
37 37
      */
38
-    protected $security = null;
38
+    protected $security = NULL;
39 39
 
40 40
     /**
41 41
      * clientRepository
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * @var \EWW\Dpf\Domain\Repository\ClientRepository
44 44
      * @TYPO3\CMS\Extbase\Annotation\Inject
45 45
      */
46
-    protected $clientRepository = null;
46
+    protected $clientRepository = NULL;
47 47
 
48 48
     /**
49 49
      * signalSlotDispatcher
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
52 52
      * @TYPO3\CMS\Extbase\Annotation\Inject
53 53
      */
54
-    protected $signalSlotDispatcher = null;
54
+    protected $signalSlotDispatcher = NULL;
55 55
 
56 56
     /**
57 57
      * session
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
      * @var \EWW\Dpf\Session\Session
60 60
      * @TYPO3\CMS\Extbase\Annotation\Inject
61 61
      */
62
-    protected $session = null;
62
+    protected $session = NULL;
63 63
 
64 64
     /**
65 65
      * logger
66 66
      *
67 67
      * @var \TYPO3\CMS\Core\Log\Logger
68 68
      */
69
-    protected $logger = null;
69
+    protected $logger = NULL;
70 70
 
71 71
 
72 72
     public function __construct()
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 $message,
90 90
                 $messageTitle = '',
91 91
                 $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING,
92
-                $storeInSession = true
92
+                $storeInSession = TRUE
93 93
             );
94 94
         } else {
95 95
             $view->assign('client', $client);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         if ($this->request->hasArgument($parameterName)) {
154 154
             return $this->filterSafelyParameters($this->request->getArgument($parameterName));
155 155
         }
156
-        return null;
156
+        return NULL;
157 157
     }
158 158
 
159 159
     /**
Please login to merge, or discard this patch.
Classes/Controller/ApiController.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             }
260 260
 
261 261
             if ($this->documentManager->update($doc, null, [], [], true)) {
262
-                return '{"success": "Document '.$document.' added '.$id.'"}';
262
+                return '{"success": "Document ' . $document . ' added ' . $id . '"}';
263 263
             } else {
264 264
                 return '{"failed": Could not update the Document"}';
265 265
             }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                     return '{"error": "Invalid data in parameter json."}';
299 299
                 }
300 300
             } else {
301
-                if (empty($json) || json_decode($json,true) === []) {
301
+                if (empty($json) || json_decode($json, true) === []) {
302 302
                     return '{"error": "Parameter json can not be empty."}';
303 303
                 }
304 304
                 if (is_null(json_decode($json))) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             $doc = $this->documentManager->read($document);
311 311
 
312 312
             if (!$doc) {
313
-                return '{"failed": "Document does not exist: '.$document.'"}';
313
+                return '{"failed": "Document does not exist: ' . $document . '"}';
314 314
             }
315 315
 
316 316
             if ($doc->getState() === DocumentWorkflow::STATE_NEW_NONE) {
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
             }
324 324
 
325 325
             if ($linkedDocument) {
326
-                return '{"failed": "There is already a suggestion for the document: '.$linkedDocument->getUid().'"}';
326
+                return '{"failed": "There is already a suggestion for the document: ' . $linkedDocument->getUid() . '"}';
327 327
             }
328 328
 
329 329
             $mapper = $this->objectManager->get(\EWW\Dpf\Services\Api\JsonToDocumentMapper::class);
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
         $missingArguments = [];
682 682
         foreach ($parameterNames as $parameterName) {
683 683
             if (!$this->request->hasArgument($parameterName)) {
684
-                $missingArguments[] =  $parameterName;
684
+                $missingArguments[] = $parameterName;
685 685
             }
686 686
         }
687 687
 
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
             $this->throwStatus(
690 690
                 400,
691 691
                 null,
692
-                '{"error": "Missing parameters: '.implode(", ", $missingArguments).'"}'
692
+                '{"error": "Missing parameters: ' . implode(", ", $missingArguments) . '"}'
693 693
             );
694 694
         }
695 695
 
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
             $this->throwStatus(
720 720
                 400,
721 721
                 null,
722
-            '{"error": "An invalid action hes been called: '.$actionName.'"}'
722
+            '{"error": "An invalid action hes been called: ' . $actionName . '"}'
723 723
             );
724 724
         }
725 725
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
 /**
33 33
  * DocumentController
34 34
  */
35
-class ApiController extends ActionController
36
-{
35
+class ApiController extends ActionController {
37 36
     /**
38 37
      * @var \TYPO3\CMS\Extbase\Mvc\View\JsonView
39 38
      */
@@ -116,8 +115,7 @@  discard block
 block discarded – undo
116 115
         'importBibtexWithoutSaving', 'importRisWithoutSaving', 'addFisId'
117 116
     ];
118 117
 
119
-    public function __construct()
120
-    {
118
+    public function __construct() {
121 119
         /** @var $logger \TYPO3\CMS\Core\Log\Logger */
122 120
         $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
123 121
     }
@@ -139,8 +137,7 @@  discard block
 block discarded – undo
139 137
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
140 138
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
141 139
      */
142
-    public function initializeShowAction()
143
-    {
140
+    public function initializeShowAction() {
144 141
         $this->checkMandatoryParameters(['document', 'token']);
145 142
     }
146 143
 
@@ -175,8 +172,7 @@  discard block
 block discarded – undo
175 172
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
176 173
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
177 174
      */
178
-    public function initializeCreateAction()
179
-    {
175
+    public function initializeCreateAction() {
180 176
         $this->checkMandatoryParameters(['json', 'token']);
181 177
     }
182 178
 
@@ -231,8 +227,7 @@  discard block
 block discarded – undo
231 227
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
232 228
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
233 229
      */
234
-    public function initializeAddFisIdAction()
235
-    {
230
+    public function initializeAddFisIdAction() {
236 231
         $this->checkMandatoryParameters(['document', 'id', 'token']);
237 232
     }
238 233
 
@@ -272,8 +267,7 @@  discard block
 block discarded – undo
272 267
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
273 268
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
274 269
      */
275
-    public function initializeSuggestionAction()
276
-    {
270
+    public function initializeSuggestionAction() {
277 271
         $this->checkMandatoryParameters(['document', 'json', 'comment', 'token']);
278 272
         if ($this->request->hasArgument('restore')) {
279 273
             $restore = $this->request->getArgument('restore');
@@ -351,8 +345,7 @@  discard block
 block discarded – undo
351 345
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
352 346
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
353 347
      */
354
-    public function initializeImportDoiWithoutSavingAction()
355
-    {
348
+    public function initializeImportDoiWithoutSavingAction() {
356 349
         $this->checkMandatoryParameters(['doi', 'token']);
357 350
     }
358 351
 
@@ -406,8 +399,7 @@  discard block
 block discarded – undo
406 399
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
407 400
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
408 401
      */
409
-    public function initializeImportPubmedWithoutSavingAction()
410
-    {
402
+    public function initializeImportPubmedWithoutSavingAction() {
411 403
         $this->checkMandatoryParameters(['pmid', 'token']);
412 404
     }
413 405
 
@@ -458,8 +450,7 @@  discard block
 block discarded – undo
458 450
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
459 451
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
460 452
      */
461
-    public function initializeImportIsbnWithoutSavingAction()
462
-    {
453
+    public function initializeImportIsbnWithoutSavingAction() {
463 454
         $this->checkMandatoryParameters(['isbn', 'token']);
464 455
     }
465 456
 
@@ -510,8 +501,7 @@  discard block
 block discarded – undo
510 501
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
511 502
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
512 503
      */
513
-    public function initializeImportBibtexWithoutSavingAction()
514
-    {
504
+    public function initializeImportBibtexWithoutSavingAction() {
515 505
         $this->checkMandatoryParameters(['bibtex', 'token']);
516 506
         if ($this->request->hasArgument('force')) {
517 507
             $force = $this->request->getArgument('force');
@@ -590,8 +580,7 @@  discard block
 block discarded – undo
590 580
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
591 581
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
592 582
      */
593
-    public function initializeImportRisWithoutSavingAction()
594
-    {
583
+    public function initializeImportRisWithoutSavingAction() {
595 584
         $this->checkMandatoryParameters(['ris', 'token']);
596 585
         if ($this->request->hasArgument('force')) {
597 586
             $force = $this->request->getArgument('force');
@@ -676,8 +665,7 @@  discard block
 block discarded – undo
676 665
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
677 666
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
678 667
      */
679
-    protected function checkMandatoryParameters($parameterNames)
680
-    {
668
+    protected function checkMandatoryParameters($parameterNames) {
681 669
         $missingArguments = [];
682 670
         foreach ($parameterNames as $parameterName) {
683 671
             if (!$this->request->hasArgument($parameterName)) {
@@ -700,8 +688,7 @@  discard block
 block discarded – undo
700 688
      *
701 689
      * @return string Method name of the current action
702 690
      */
703
-    protected function resolveActionMethodName()
704
-    {
691
+    protected function resolveActionMethodName() {
705 692
         if ($this->request->hasArgument('action')) {
706 693
             $actionName = $this->request->getArgument('action');
707 694
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @var \EWW\Dpf\Security\Security
52 52
      * @TYPO3\CMS\Extbase\Annotation\Inject
53 53
      */
54
-    protected $security = null;
54
+    protected $security = NULL;
55 55
 
56 56
     /**
57 57
      * documentRepository
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
60 60
      * @TYPO3\CMS\Extbase\Annotation\Inject
61 61
      */
62
-    protected $documentRepository = null;
62
+    protected $documentRepository = NULL;
63 63
 
64 64
     /**
65 65
      * frontendUserRepository
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @var \EWW\Dpf\Domain\Repository\FrontendUserRepository
68 68
      * @TYPO3\CMS\Extbase\Annotation\Inject
69 69
      */
70
-    protected $frontendUserRepository = null;
70
+    protected $frontendUserRepository = NULL;
71 71
 
72 72
     /**
73 73
      * documentManager
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @var \EWW\Dpf\Services\Document\DocumentManager
76 76
      * @TYPO3\CMS\Extbase\Annotation\Inject
77 77
      */
78
-    protected $documentManager = null;
78
+    protected $documentManager = NULL;
79 79
 
80 80
     /**
81 81
      * clientRepository
@@ -99,16 +99,16 @@  discard block
 block discarded – undo
99 99
      * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
100 100
      * @TYPO3\CMS\Extbase\Annotation\Inject
101 101
      */
102
-    protected $signalSlotDispatcher = null;
102
+    protected $signalSlotDispatcher = NULL;
103 103
 
104 104
     /**
105 105
      * logger
106 106
      *
107 107
      * @var \TYPO3\CMS\Core\Log\Logger
108 108
      */
109
-    protected $logger = null;
109
+    protected $logger = NULL;
110 110
 
111
-    protected $frontendUser = null;
111
+    protected $frontendUser = NULL;
112 112
 
113 113
     protected $validActions = [
114 114
         'show', 'create', 'suggestion', 'importDoiWithoutSaving',
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 
130 130
         if ($frontendUser) {
131 131
             $this->frontendUser = $frontendUser;
132
-            return true;
132
+            return TRUE;
133 133
         } else {
134
-            return false;
134
+            return FALSE;
135 135
         }
136 136
     }
137 137
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                 $doc->setProcessNumber($processNumber);
259 259
             }
260 260
 
261
-            if ($this->documentManager->update($doc, null, [], [], true)) {
261
+            if ($this->documentManager->update($doc, NULL, [], [], TRUE)) {
262 262
                 return '{"success": "Document '.$document.' added '.$id.'"}';
263 263
             } else {
264 264
                 return '{"failed": Could not update the Document"}';
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      * @param bool $restore
290 290
      * @return string
291 291
      */
292
-    public function suggestionAction($document, $json, $comment, $token, $restore = false) {
292
+    public function suggestionAction($document, $json, $comment, $token, $restore = FALSE) {
293 293
 
294 294
         if ($this->checkToken($token)) {
295 295
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                     return '{"error": "Invalid data in parameter json."}';
299 299
                 }
300 300
             } else {
301
-                if (empty($json) || json_decode($json,true) === []) {
301
+                if (empty($json) || json_decode($json,TRUE) === []) {
302 302
                     return '{"error": "Parameter json can not be empty."}';
303 303
                 }
304 304
                 if (is_null(json_decode($json))) {
@@ -525,14 +525,14 @@  discard block
 block discarded – undo
525 525
      * @param bool $force
526 526
      * @return string
527 527
      */
528
-    public function importBibtexWithoutSavingAction($bibtex, $token, $force = false) {
528
+    public function importBibtexWithoutSavingAction($bibtex, $token, $force = FALSE) {
529 529
 
530 530
         if ($this->checkToken($token)) {
531 531
             $importer = $this->objectManager->get(BibTexFileImporter::class);
532 532
             $importer->deactivateProcessNumberGeneration();
533 533
 
534 534
             try {
535
-                $externalMetadata = $importer->loadFile($bibtex, $this->settings['bibTexMandatoryFields'], true);
535
+                $externalMetadata = $importer->loadFile($bibtex, $this->settings['bibTexMandatoryFields'], TRUE);
536 536
                 $mandatoryErrors = $importer->getMandatoryErrors();
537 537
             } catch (\Throwable $throwable) {
538 538
                 return '{"failed": "' . $throwable->getMessage() . '"}';
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
      * @param bool $force
606 606
      * @return string
607 607
      */
608
-    public function importRisWithoutSavingAction($ris, $token, $force = false) {
608
+    public function importRisWithoutSavingAction($ris, $token, $force = FALSE) {
609 609
 
610 610
         if ($this->checkToken($token)) {
611 611
             /** @var FileImporter $fileImporter */
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
             $importer->deactivateProcessNumberGeneration();
614 614
 
615 615
             try {
616
-                $externalMetadata = $importer->loadFile($ris, $this->settings['riswosMandatoryFields'], true);
616
+                $externalMetadata = $importer->loadFile($ris, $this->settings['riswosMandatoryFields'], TRUE);
617 617
                 $mandatoryErrors = $importer->getMandatoryErrors();
618 618
             } catch (\Throwable $throwable) {
619 619
                 return '{"failed": "' . $throwable->getMessage() . '"}';
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
         if ($missingArguments) {
689 689
             $this->throwStatus(
690 690
                 400,
691
-                null,
691
+                NULL,
692 692
                 '{"error": "Missing parameters: '.implode(", ", $missingArguments).'"}'
693 693
             );
694 694
         }
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
         if (empty($actionName)) {
710 710
             $this->throwStatus(
711 711
                 400,
712
-                null,
712
+                NULL,
713 713
                 '{"error": "No action has been specified"}'
714 714
             );
715 715
 
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
         if (!in_array($actionName, $this->validActions)) {
719 719
             $this->throwStatus(
720 720
                 400,
721
-                null,
721
+                NULL,
722 722
             '{"error": "An invalid action hes been called: '.$actionName.'"}'
723 723
             );
724 724
         }
Please login to merge, or discard this patch.
Classes/Controller/AbstractDocumentFormController.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 $this->request->setArguments($requestArguments);
184 184
             } else {
185 185
                 $t = $docForm->getNewFileNames();
186
-                $this->redirect('list', 'DocumentForm', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
186
+                $this->redirect('list', 'DocumentForm', null, array ('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
187 187
             }
188 188
         } else {
189 189
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                 $this->request->setArguments($requestArguments);
339 339
             } else {
340 340
                 $t = $docForm->getNewFileNames();
341
-                $this->redirect('list', 'Document', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
341
+                $this->redirect('list', 'Document', null, array ('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
342 342
             }
343 343
         } else {
344 344
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
Please login to merge, or discard this patch.
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
37 37
      * @TYPO3\CMS\Extbase\Annotation\Inject
38 38
      */
39
-    protected $documentRepository = null;
39
+    protected $documentRepository = NULL;
40 40
 
41 41
     /**
42 42
      * fileRepository
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @var \EWW\Dpf\Domain\Repository\FileRepository
45 45
      * @TYPO3\CMS\Extbase\Annotation\Inject
46 46
      */
47
-    protected $fileRepository = null;
47
+    protected $fileRepository = 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
      * @TYPO3\CMS\Extbase\Annotation\Inject
54 54
      */
55
-    protected $documentTypeRepository = null;
55
+    protected $documentTypeRepository = NULL;
56 56
 
57 57
     /**
58 58
      * metadataGroupRepository
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
61 61
      * @TYPO3\CMS\Extbase\Annotation\Inject
62 62
      */
63
-    protected $metadataGroupRepository = null;
63
+    protected $metadataGroupRepository = NULL;
64 64
 
65 65
     /**
66 66
      * metadataObjectRepository
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
69 69
      * @TYPO3\CMS\Extbase\Annotation\Inject
70 70
      */
71
-    protected $metadataObjectRepository = null;
71
+    protected $metadataObjectRepository = NULL;
72 72
 
73 73
     /**
74 74
      * depositLicenseLogRepository
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @var \EWW\Dpf\Domain\Repository\DepositLicenseLogRepository
77 77
      * @TYPO3\CMS\Extbase\Annotation\Inject
78 78
      */
79
-    protected $depositLicenseLogRepository = null;
79
+    protected $depositLicenseLogRepository = NULL;
80 80
 
81 81
     /**
82 82
      * persistence manager
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @var \EWW\Dpf\Services\FeUser\FisDataService
93 93
      * @TYPO3\CMS\Extbase\Annotation\Inject
94 94
      */
95
-    protected $fisDataService = null;
95
+    protected $fisDataService = NULL;
96 96
 
97 97
     /**
98 98
      * action list
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newDocumentForm")
152 152
      * @return void
153 153
      */
154
-    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
154
+    public function newAction(DocumentForm $newDocumentForm = NULL, $returnDocumentId = 0)
155 155
     {
156 156
         $this->view->assign('returnDocumentId', $returnDocumentId);
157 157
         $this->view->assign('documentForm', $newDocumentForm);
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
             $documentType = $this->documentTypeRepository->findByUid($docTypeUid);
180 180
             $virtualType = $documentType->getVirtualType();
181 181
 
182
-            if (!$formDataReader->uploadError() || $virtualType === true) {
182
+            if (!$formDataReader->uploadError() || $virtualType === TRUE) {
183 183
                 $this->request->setArguments($requestArguments);
184 184
             } else {
185 185
                 $t = $docForm->getNewFileNames();
186
-                $this->redirect('list', 'DocumentForm', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
186
+                $this->redirect('list', 'DocumentForm', NULL, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
187 187
             }
188 188
         } else {
189 189
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
             $documentType = $this->documentTypeRepository->findByUid($docTypeUid);
335 335
             $virtualType = $documentType->getVirtualType();
336 336
 
337
-            if (!$formDataReader->uploadError() || $virtualType === true) {
337
+            if (!$formDataReader->uploadError() || $virtualType === TRUE) {
338 338
                 $this->request->setArguments($requestArguments);
339 339
             } else {
340 340
                 $t = $docForm->getNewFileNames();
341
-                $this->redirect('list', 'Document', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
341
+                $this->redirect('list', 'Document', NULL, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
342 342
             }
343 343
         } else {
344 344
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         // send document to index
372 372
         $elasticsearchRepository->add($updateDocument, $json);
373 373
 
374
-        $updateDocument->setChanged(true);
374
+        $updateDocument->setChanged(TRUE);
375 375
         $this->documentRepository->update($updateDocument);
376 376
 
377 377
 
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         $this->redirect('list');
412 412
     }
413 413
 
414
-    protected function redirectToList($message = null)
414
+    protected function redirectToList($message = NULL)
415 415
     {
416 416
         $this->redirect('list');
417 417
     }
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 /**
28 28
  * DocumentFormController
29 29
  */
30
-abstract class AbstractDocumentFormController extends AbstractController
31
-{
30
+abstract class AbstractDocumentFormController extends AbstractController {
32 31
 
33 32
     /**
34 33
      * documentRepository
@@ -99,8 +98,7 @@  discard block
 block discarded – undo
99 98
      *
100 99
      * @return void
101 100
      */
102
-    public function listAction()
103
-    {
101
+    public function listAction() {
104 102
         $documents = $this->documentRepository->findAll();
105 103
         $docTypes = $this->documentTypeRepository->getDocumentTypesAlphabetically();
106 104
 
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
      *
122 120
      * @return void
123 121
      */
124
-    public function initializeNewAction()
125
-    {
122
+    public function initializeNewAction() {
126 123
 
127 124
         $requestArguments = $this->request->getArguments();
128 125
 
@@ -151,8 +148,7 @@  discard block
 block discarded – undo
151 148
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newDocumentForm")
152 149
      * @return void
153 150
      */
154
-    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
155
-    {
151
+    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0) {
156 152
         $this->view->assign('returnDocumentId', $returnDocumentId);
157 153
         $this->view->assign('documentForm', $newDocumentForm);
158 154
 
@@ -165,8 +161,7 @@  discard block
 block discarded – undo
165 161
         }
166 162
     }
167 163
 
168
-    public function initializeCreateAction()
169
-    {
164
+    public function initializeCreateAction() {
170 165
 
171 166
         $requestArguments = $this->request->getArguments();
172 167
 
@@ -200,8 +195,7 @@  discard block
 block discarded – undo
200 195
      * @param \EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm
201 196
      * @return void
202 197
      */
203
-    public function createAction(DocumentForm $newDocumentForm)
204
-    {
198
+    public function createAction(DocumentForm $newDocumentForm) {
205 199
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
206 200
 
207 201
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
@@ -281,8 +275,7 @@  discard block
 block discarded – undo
281 275
 
282 276
     }
283 277
 
284
-    public function initializeEditAction()
285
-    {
278
+    public function initializeEditAction() {
286 279
         $requestArguments = $this->request->getArguments();
287 280
 
288 281
         if (array_key_exists('document', $requestArguments)) {
@@ -312,8 +305,7 @@  discard block
 block discarded – undo
312 305
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("documentForm")
313 306
      * @return void
314 307
      */
315
-    public function editAction(DocumentForm $documentForm)
316
-    {
308
+    public function editAction(DocumentForm $documentForm) {
317 309
         $this->view->assign('documentForm', $documentForm);
318 310
 
319 311
         if (!empty($this->security->getUserAccessToGroups())) {
@@ -325,8 +317,7 @@  discard block
 block discarded – undo
325 317
         }
326 318
     }
327 319
 
328
-    public function initializeUpdateAction()
329
-    {
320
+    public function initializeUpdateAction() {
330 321
         $requestArguments = $this->request->getArguments();
331 322
 
332 323
         if ($this->request->hasArgument('documentData')) {
@@ -359,8 +350,7 @@  discard block
 block discarded – undo
359 350
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
360 351
      * @return void
361 352
      */
362
-    public function updateAction(DocumentForm $documentForm)
363
-    {
353
+    public function updateAction(DocumentForm $documentForm) {
364 354
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
365 355
 
366 356
         /* @var $updateDocument \EWW\Dpf\Domain\Model\Document */
@@ -409,18 +399,15 @@  discard block
 block discarded – undo
409 399
      *
410 400
      * @return void
411 401
      */
412
-    public function cancelAction()
413
-    {
402
+    public function cancelAction() {
414 403
         $this->redirectToList();
415 404
     }
416 405
 
417
-    protected function redirectAfterUpdate()
418
-    {
406
+    protected function redirectAfterUpdate() {
419 407
         $this->redirect('list');
420 408
     }
421 409
 
422
-    protected function redirectToList($message = null)
423
-    {
410
+    protected function redirectToList($message = null) {
424 411
         $this->redirect('list');
425 412
     }
426 413
 
Please login to merge, or discard this patch.
Classes/Controller/ExternalMetadataImportController.php 4 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -574,8 +574,8 @@
 block discarded – undo
574 574
                 'manager.importMetadata.publicationNotImported', 'dpf'
575 575
             );
576 576
 
577
-           $this->addFlashMessage($message, '', AbstractMessage::ERROR);
578
-           $this->redirect('find');
577
+            $this->addFlashMessage($message, '', AbstractMessage::ERROR);
578
+            $this->redirect('find');
579 579
         }
580 580
     }
581 581
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -40 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@  discard block
 block discarded – undo
37 37
 /**
38 38
  * ExternalDataImportController
39 39
  */
40
-class ExternalMetadataImportController extends AbstractController
41
-{
40
+class ExternalMetadataImportController extends AbstractController {
42 41
     /**
43 42
      * ExternalMetadataRepository
44 43
      *
@@ -114,8 +113,7 @@  discard block
 block discarded – undo
114 113
     /**
115 114
      * DocumentController constructor.
116 115
      */
117
-    public function __construct()
118
-    {
116
+    public function __construct() {
119 117
         parent::__construct();
120 118
     }
121 119
 
@@ -123,8 +121,7 @@  discard block
 block discarded – undo
123 121
      * @param string $crossRefQuery
124 122
      * @param string $pubMedQuery
125 123
      */
126
-    public function bulkStartAction($crossRefQuery = '', $pubMedQuery = '')
127
-    {
124
+    public function bulkStartAction($crossRefQuery = '', $pubMedQuery = '') {
128 125
         /** @var BulkImportSessionData $bulkImportSessionData */
129 126
         $bulkImportSessionData = $this->session->getBulkImportData();
130 127
 
@@ -141,8 +138,7 @@  discard block
 block discarded – undo
141 138
     /**
142 139
      * @param string $query
143 140
      */
144
-    public function bulkSearchCrossRefAction($query = '')
145
-    {
141
+    public function bulkSearchCrossRefAction($query = '') {
146 142
         /** @var BulkImportSessionData $bulkImportSessionData */
147 143
         $bulkImportSessionData = $this->session->getBulkImportData();
148 144
 
@@ -208,8 +204,7 @@  discard block
 block discarded – undo
208 204
     /**
209 205
      * @param string $query
210 206
      */
211
-    public function bulkSearchPubMedAction($query = '')
212
-    {
207
+    public function bulkSearchPubMedAction($query = '') {
213 208
         /** @var BulkImportSessionData $bulkImportSessionData */
214 209
         $bulkImportSessionData = $this->session->getBulkImportData();
215 210
 
@@ -278,8 +273,7 @@  discard block
 block discarded – undo
278 273
      * @param array $results
279 274
      * @param int $currentPage
280 275
      */
281
-    public function bulkResultsAction($importSourceName, $query, $results = null, $currentPage = 1)
282
-    {
276
+    public function bulkResultsAction($importSourceName, $query, $results = null, $currentPage = 1) {
283 277
         $externalMetadata = $this->externalMetadataRepository->findByFeUser($this->security->getUser()->getUid());
284 278
         $checkedPublicationIdentifiers = [];
285 279
 
@@ -300,8 +294,7 @@  discard block
 block discarded – undo
300 294
     /**
301 295
      *
302 296
      */
303
-    function bulkImportAction()
304
-    {
297
+    function bulkImportAction() {
305 298
         $importCounter = ['imported' => 0, 'bookmarked' => 0, 'total' => 0];
306 299
 
307 300
         try {
@@ -385,8 +378,7 @@  discard block
 block discarded – undo
385 378
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
386 379
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
387 380
      */
388
-    function cancelBulkImportAction()
389
-    {
381
+    function cancelBulkImportAction() {
390 382
         $this->redirect('bulkStart');
391 383
     }
392 384
 
@@ -396,8 +388,7 @@  discard block
 block discarded – undo
396 388
      * @param string $identifier
397 389
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
398 390
      */
399
-    public function findAction($identifier = '')
400
-    {
391
+    public function findAction($identifier = '') {
401 392
         $this->externalMetadataRepository->clearExternalMetadataByFeUserUid($this->security->getUser()->getUid());
402 393
         $this->view->assign('identifier', $identifier);
403 394
     }
@@ -407,8 +398,7 @@  discard block
 block discarded – undo
407 398
      *
408 399
      * @param string $identifier
409 400
      */
410
-    public function retrieveAction($identifier)
411
-    {
401
+    public function retrieveAction($identifier) {
412 402
         $identifier = trim($identifier);
413 403
 
414 404
         if (empty($identifier)) {
@@ -512,8 +502,7 @@  discard block
 block discarded – undo
512 502
      *
513 503
      * @param ExternalMetadata $externalMetadata
514 504
      */
515
-    public function importAction(ExternalMetadata $externalMetadata)
516
-    {
505
+    public function importAction(ExternalMetadata $externalMetadata) {
517 506
         $this->view->assign('identifierType',
518 507
             PublicationIdentifier::determineIdentifierType($externalMetadata->getPublicationIdentifier())
519 508
         );
@@ -523,8 +512,7 @@  discard block
 block discarded – undo
523 512
     /**
524 513
      * @param ExternalMetadata $externalMetadata
525 514
      */
526
-    public function createDocumentAction(ExternalMetadata $externalMetadata)
527
-    {
515
+    public function createDocumentAction(ExternalMetadata $externalMetadata) {
528 516
         /** @var  Importer $importer */
529 517
         $importer = $this->objectManager->get($externalMetadata->getSource());
530 518
 
@@ -589,8 +577,7 @@  discard block
 block discarded – undo
589 577
      * @param $identifier
590 578
      * @return array
591 579
      */
592
-    protected function findDocumentInWorkspace($identifier)
593
-    {
580
+    protected function findDocumentInWorkspace($identifier) {
594 581
         $bookmarkIdentifiers = [];
595 582
         foreach ($this->bookmarkRepository->findByFeUserUid($this->security->getUser()->getUid()) as $bookmark) {
596 583
             $bookmarkIdentifiers[] = $bookmark->getDocumentIdentifier();
@@ -704,8 +691,7 @@  discard block
 block discarded – undo
704 691
     /**
705 692
      * @param array $importCounter
706 693
      */
707
-    public function bulkImportedDocumentsAction($importCounter = ['imported' => 0, 'bookmarked' => 0, 'total' => 0])
708
-    {
694
+    public function bulkImportedDocumentsAction($importCounter = ['imported' => 0, 'bookmarked' => 0, 'total' => 0]) {
709 695
 
710 696
         $publicationSingular = LocalizationUtility::translate('manager.importMetadata.publication.singular', 'dpf');
711 697
         $publicationPlural = LocalizationUtility::translate('manager.importMetadata.publication.plural', 'dpf');
@@ -752,8 +738,7 @@  discard block
 block discarded – undo
752 738
     /**
753 739
      *
754 740
      */
755
-    protected function showImportedDocuments()
756
-    {
741
+    protected function showImportedDocuments() {
757 742
         $this->session->setStoredAction($this->getCurrentAction(), $this->getCurrentController(),
758 743
             $this->uriBuilder->getRequest()->getRequestUri()
759 744
         );
@@ -818,8 +803,7 @@  discard block
 block discarded – undo
818 803
      *
819 804
      * @return int
820 805
      */
821
-    protected function itemsPerPage()
822
-    {
806
+    protected function itemsPerPage() {
823 807
         /** @var BulkImportSessionData $bulkImportSessionData */
824 808
         $bulkImportSessionData = $this->session->getBulkImportData();
825 809
 
@@ -837,8 +821,7 @@  discard block
 block discarded – undo
837 821
     /**
838 822
      * @param string $error
839 823
      */
840
-    public function uploadStartAction($error = '')
841
-    {
824
+    public function uploadStartAction($error = '') {
842 825
         switch ($error) {
843 826
             case 'INVALID_FORMAT':
844 827
                 $message = LocalizationUtility::translate(
@@ -861,8 +844,7 @@  discard block
 block discarded – undo
861 844
      * @param string $fileType (bibtex or riswos)
862 845
      * @param array $uploadFile
863 846
      */
864
-    public function uploadImportFileAction($fileType, $uploadFile = [])
865
-    {
847
+    public function uploadImportFileAction($fileType, $uploadFile = []) {
866 848
         $this->externalMetadataRepository->clearExternalMetadataByFeUserUid($this->security->getUser()->getUid());
867 849
 
868 850
         $uploadFileUrl = new \EWW\Dpf\Helper\UploadFileUrl;
@@ -929,8 +911,7 @@  discard block
 block discarded – undo
929 911
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
930 912
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
931 913
      */
932
-    public function importUploadedDataAction()
933
-    {
914
+    public function importUploadedDataAction() {
934 915
         try {
935 916
             $externalMetadata = $this->externalMetadataRepository->findByFeUser($this->security->getUser()->getUid());
936 917
 
@@ -994,8 +975,7 @@  discard block
 block discarded – undo
994 975
     /**
995 976
      * @param int $importCounter
996 977
      */
997
-    public function uploadedDocumentsAction($importCounter = 0)
998
-    {
978
+    public function uploadedDocumentsAction($importCounter = 0) {
999 979
         $publicationSingular = LocalizationUtility::translate('manager.importMetadata.publication.singular', 'dpf');
1000 980
         $publicationPlural = LocalizationUtility::translate('manager.importMetadata.publication.plural', 'dpf');
1001 981
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             $currentPage = 1;
162 162
         }
163 163
 
164
-        $offset = empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage();
164
+        $offset = empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage();
165 165
 
166 166
         /** @var Importer $importer */
167 167
         $importer = $this->objectManager->get(CrossRefImporter::class);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             $bulkImportSessionData->getCrossRefSearchField()
173 173
         );
174 174
 
175
-        $bulkImportSessionData->setCurrentMetadataItems(($results? $results['items'] : []));
175
+        $bulkImportSessionData->setCurrentMetadataItems(($results ? $results['items'] : []));
176 176
         $this->session->setBulkImportData($bulkImportSessionData);
177 177
 
178 178
         if ($results) {
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             $currentPage = 1;
229 229
         }
230 230
 
231
-        $offset = empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage();
231
+        $offset = empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage();
232 232
 
233 233
         /** @var Importer $importer */
234 234
         $importer = $this->objectManager->get(PubMedImporter::class);
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             $bulkImportSessionData->getPubMedSearchField()
240 240
         );
241 241
 
242
-        $bulkImportSessionData->setCurrentMetadataItems(($results? $results['items'] : []));
242
+        $bulkImportSessionData->setCurrentMetadataItems(($results ? $results['items'] : []));
243 243
         $this->session->setBulkImportData($bulkImportSessionData);
244 244
 
245 245
         if ($results) {
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
             $bulkImportSessionData->setLatestImportIdentifiers($importedDocumentIdentifiers);
364 364
             $this->session->setBulkImportData($bulkImportSessionData);
365 365
 
366
-        } catch(\Throwable $throwable) {
366
+        } catch (\Throwable $throwable) {
367 367
             $this->logger->log(\TYPO3\CMS\Core\Log\LogLevel::ERROR, $throwable->getMessage());
368 368
 
369 369
             $message = LocalizationUtility::translate(
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
572 572
             // A redirect always throws this exception, but in this case, however,
573 573
             // redirection is desired and should not lead to an exception handling
574
-        } catch(\Throwable $throwable) {
574
+        } catch (\Throwable $throwable) {
575 575
 
576 576
             $this->logger->log(\TYPO3\CMS\Core\Log\LogLevel::ERROR, $throwable->getMessage());
577 577
 
@@ -645,12 +645,12 @@  discard block
 block discarded – undo
645 645
         $query = $this->queryBuilder->buildQuery(
646 646
             1, $workspaceFilter, 0,
647 647
             $bookmarkIdentifiers, [], [], null, null,
648
-            'identifier:"'.$identifier.'"'
648
+            'identifier:"' . $identifier . '"'
649 649
         );
650 650
 
651 651
         try {
652 652
 
653
-            $results =  $this->elasticSearch->search($query, 'object');
653
+            $results = $this->elasticSearch->search($query, 'object');
654 654
             if (is_array($results) && $results['hits']['total']['value'] > 0) {
655 655
                 return $results['hits']['hits'][0];
656 656
             }
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 
692 692
         // Search if the document already exists in kitodo.
693 693
         $query = $this->queryBuilder->buildQuery(
694
-            1, $workspaceFilter , 0, [], [], [], null, null, 'identifier:"'.$identifier.'"'
694
+            1, $workspaceFilter, 0, [], [], [], null, null, 'identifier:"' . $identifier . '"'
695 695
         );
696 696
         $results = $this->elasticSearch->search($query, 'object');
697 697
 
@@ -722,9 +722,9 @@  discard block
 block discarded – undo
722 722
             'dpf',
723 723
             [
724 724
                 0 => $importCounter['imported'],
725
-                1 => ($importCounter['imported'] == 1? $publicationSingular : $publicationPlural),
725
+                1 => ($importCounter['imported'] == 1 ? $publicationSingular : $publicationPlural),
726 726
                 2 => $importCounter['bookmarked'],
727
-                3 => ($importCounter['bookmarked'] == 1? $publicationSingular : $publicationPlural)
727
+                3 => ($importCounter['bookmarked'] == 1 ? $publicationSingular : $publicationPlural)
728 728
             ]
729 729
         );
730 730
 
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
         $query = $this->queryBuilder->buildQuery(
789 789
             $this->itemsPerPage(),
790 790
             $workspaceFilter,
791
-            (empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage())
791
+            (empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage())
792 792
         );
793 793
 
794 794
         try {
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 
869 869
         $uploadFileUrl = new \EWW\Dpf\Helper\UploadFileUrl;
870 870
         $uploadFilePath = Environment::getPublicPath() . "/" . $uploadFileUrl->getDirectory() .
871
-            "/importFile.".md5($this->security->getUser()->getUid());
871
+            "/importFile." . md5($this->security->getUser()->getUid());
872 872
 
873 873
         if ($uploadFile['error'] === UPLOAD_ERR_OK) {
874 874
             \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move($uploadFile['tmp_name'], $uploadFilePath);
@@ -977,7 +977,7 @@  discard block
 block discarded – undo
977 977
             $bulkImportSessionData->setLatestImportIdentifiers($importedDocumentIdentifiers);
978 978
             $this->session->setBulkImportData($bulkImportSessionData);
979 979
 
980
-        } catch(\Throwable $throwable) {
980
+        } catch (\Throwable $throwable) {
981 981
             $this->logger->log(\TYPO3\CMS\Core\Log\LogLevel::ERROR, $throwable->getMessage());
982 982
 
983 983
             $message = LocalizationUtility::translate(
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
             'dpf',
1015 1015
             [
1016 1016
                 0 => $importCounter,
1017
-                1 => ($importCounter == 1? $publicationSingular : $publicationPlural)
1017
+                1 => ($importCounter == 1 ? $publicationSingular : $publicationPlural)
1018 1018
             ]
1019 1019
         );
1020 1020
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @var \EWW\Dpf\Domain\Repository\ExternalMetadataRepository
47 47
      * @TYPO3\CMS\Extbase\Annotation\Inject
48 48
      */
49
-    protected $externalMetadataRepository = null;
49
+    protected $externalMetadataRepository = NULL;
50 50
 
51 51
     /**
52 52
      * documentRepository
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
55 55
      * @TYPO3\CMS\Extbase\Annotation\Inject
56 56
      */
57
-    protected $documentRepository = null;
57
+    protected $documentRepository = NULL;
58 58
 
59 59
     /**
60 60
      * documentTypeRepository
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
63 63
      * @TYPO3\CMS\Extbase\Annotation\Inject
64 64
      */
65
-    protected $documentTypeRepository = null;
65
+    protected $documentTypeRepository = NULL;
66 66
 
67 67
     /**
68 68
      * persistence manager
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @var \EWW\Dpf\Services\ElasticSearch\ElasticSearch
79 79
      * @TYPO3\CMS\Extbase\Annotation\Inject
80 80
      */
81
-    protected $elasticSearch = null;
81
+    protected $elasticSearch = NULL;
82 82
 
83 83
     /**
84 84
      * queryBuilder
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @var \EWW\Dpf\Services\ElasticSearch\QueryBuilder
87 87
      * @TYPO3\CMS\Extbase\Annotation\Inject
88 88
      */
89
-    protected $queryBuilder = null;
89
+    protected $queryBuilder = NULL;
90 90
 
91 91
     /**
92 92
      * bookmarkRepository
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
95 95
      * @TYPO3\CMS\Extbase\Annotation\Inject
96 96
      */
97
-    protected $bookmarkRepository = null;
97
+    protected $bookmarkRepository = NULL;
98 98
 
99 99
     /**
100 100
      * workflow
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         /** @var BulkImportSessionData $bulkImportSessionData */
148 148
         $bulkImportSessionData = $this->session->getBulkImportData();
149 149
 
150
-        $currentPage = null;
150
+        $currentPage = NULL;
151 151
         $pagination = $this->getParametersSafely('@widget_0');
152 152
         if ($pagination) {
153 153
             $currentPage = $pagination['currentPage'];
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
         if ($results) {
179 179
             $this->forward(
180 180
                 'bulkResults',
181
-                null,
182
-                null,
181
+                NULL,
182
+                NULL,
183 183
                 [
184 184
                     'results' => $results,
185 185
                     'query' => $query,
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 
198 198
             $this->forward(
199 199
                 'bulkStart',
200
-                null,
201
-                null,
200
+                NULL,
201
+                NULL,
202 202
                 [
203 203
                     'crossRefQuery' => $bulkImportSessionData->getCrossRefQuery()
204 204
                 ]
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         /** @var BulkImportSessionData $bulkImportSessionData */
215 215
         $bulkImportSessionData = $this->session->getBulkImportData();
216 216
 
217
-        $currentPage = null;
217
+        $currentPage = NULL;
218 218
         $pagination = $this->getParametersSafely('@widget_0');
219 219
         if ($pagination) {
220 220
             $currentPage = $pagination['currentPage'];
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
         if ($results) {
246 246
             $this->forward(
247 247
                 'bulkResults',
248
-                null,
249
-                null,
248
+                NULL,
249
+                NULL,
250 250
                 [
251 251
                     'results' => $results,
252 252
                     'query' => $query,
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
 
265 265
             $this->forward(
266 266
                 'bulkStart',
267
-                null,
268
-                null,
267
+                NULL,
268
+                NULL,
269 269
                 [
270 270
                     'pubMedQuery' => $bulkImportSessionData->getPubMedQuery()
271 271
                 ]
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      * @param array $results
280 280
      * @param int $currentPage
281 281
      */
282
-    public function bulkResultsAction($importSourceName, $query, $results = null, $currentPage = 1)
282
+    public function bulkResultsAction($importSourceName, $query, $results = NULL, $currentPage = 1)
283 283
     {
284 284
         $externalMetadata = $this->externalMetadataRepository->findByFeUser($this->security->getUser()->getUid());
285 285
         $checkedPublicationIdentifiers = [];
@@ -375,8 +375,8 @@  discard block
 block discarded – undo
375 375
 
376 376
         $this->redirect(
377 377
             'bulkImportedDocuments',
378
-            null,
379
-            null,
378
+            NULL,
379
+            NULL,
380 380
             ['from' => 0, 'importCounter' => $importCounter]);
381 381
     }
382 382
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             }
432 432
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
433 433
 
434
-            $this->redirect('find', null, null, ['identifier' => $identifier]);
434
+            $this->redirect('find', NULL, NULL, ['identifier' => $identifier]);
435 435
         }
436 436
 
437 437
         // Check if the document already exists in kitodo.
@@ -454,11 +454,11 @@  discard block
 block discarded – undo
454 454
             }
455 455
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
456 456
 
457
-            $this->redirect('find', null, null, ['identifier' => $identifier]);
457
+            $this->redirect('find', NULL, NULL, ['identifier' => $identifier]);
458 458
         }
459 459
 
460 460
         /** @var \EWW\Dpf\Services\ImportExternalMetadata\Importer $importer */
461
-        $importer = null;
461
+        $importer = NULL;
462 462
 
463 463
         // Choose the right data provider depending on the identifier type and retrieve the metadata.
464 464
         $identifierType = PublicationIdentifier::determineIdentifierType($identifier);
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             $importer = $this->objectManager->get(K10plusImporter::class);
478 478
             $externalMetadata = $importer->findByIdentifier(str_replace('- ', '', $identifier));
479 479
         } else {
480
-            $externalMetadata = null;
480
+            $externalMetadata = NULL;
481 481
         }
482 482
 
483 483
         if ($externalMetadata) {
@@ -489,8 +489,8 @@  discard block
 block discarded – undo
489 489
         if ($externalMetadata) {
490 490
             $this->redirect(
491 491
                 'import',
492
-                null,
493
-                null,
492
+                NULL,
493
+                NULL,
494 494
                 ['externalMetadata'=>$externalMetadata]
495 495
             );
496 496
         } else {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                 '',
504 504
                 AbstractMessage::ERROR
505 505
             );
506
-            $this->redirect('find', null, null, ['identifier' => $identifier]);
506
+            $this->redirect('find', NULL, NULL, ['identifier' => $identifier]);
507 507
         }
508 508
 
509 509
     }
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
                 }
558 558
                 $this->addFlashMessage($message, '', AbstractMessage::OK);
559 559
 
560
-                $this->redirect('showDetails', 'Document', null, ['document' => $newDocument]);
560
+                $this->redirect('showDetails', 'Document', NULL, ['document' => $newDocument]);
561 561
 
562 562
             } else {
563 563
                 $message = LocalizationUtility::translate(
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 
645 645
         $query = $this->queryBuilder->buildQuery(
646 646
             1, $workspaceFilter, 0,
647
-            $bookmarkIdentifiers, [], [], null, null,
647
+            $bookmarkIdentifiers, [], [], NULL, NULL,
648 648
             'identifier:"'.$identifier.'"'
649 649
         );
650 650
 
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 
692 692
         // Search if the document already exists in kitodo.
693 693
         $query = $this->queryBuilder->buildQuery(
694
-            1, $workspaceFilter , 0, [], [], [], null, null, 'identifier:"'.$identifier.'"'
694
+            1, $workspaceFilter , 0, [], [], [], NULL, NULL, 'identifier:"'.$identifier.'"'
695 695
         );
696 696
         $results = $this->elasticSearch->search($query, 'object');
697 697
 
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
             $this->uriBuilder->getRequest()->getRequestUri()
760 760
         );
761 761
 
762
-        $currentPage = null;
762
+        $currentPage = NULL;
763 763
         $pagination = $this->getParametersSafely('@widget_0');
764 764
         if ($pagination) {
765 765
             $currentPage = $pagination['currentPage'];
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         } elseif ($uploadFile['error'] == UPLOAD_ERR_NO_FILE) {
879 879
             $this->redirect('uploadStart');
880 880
         } else {
881
-            $this->redirect('uploadStart', null, null, ['error' => 'UPLOAD_ERROR']);
881
+            $this->redirect('uploadStart', NULL, NULL, ['error' => 'UPLOAD_ERROR']);
882 882
         }
883 883
 
884 884
         try {
@@ -916,18 +916,18 @@  discard block
 block discarded – undo
916 916
             } elseif ($results) {
917 917
                     $this->redirect(
918 918
                         'importUploadedData',
919
-                        null,
920
-                        null,
919
+                        NULL,
920
+                        NULL,
921 921
                         ['uploadFilePath' => $uploadFilePath]
922 922
                     );
923 923
             } else {
924
-                $this->redirect('uploadStart', null, null, ['error' => 'INVALID_FORMAT']);
924
+                $this->redirect('uploadStart', NULL, NULL, ['error' => 'INVALID_FORMAT']);
925 925
             }
926 926
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $exception) {
927 927
             // A redirect always throws this exception, but in this case, however,
928 928
             // redirection is desired and should not lead to an exception handling
929 929
         } catch (\RenanBr\BibTexParser\Exception\ParserException $exception) {
930
-            $this->redirect('uploadStart', null, null, ['error' => 'INVALID_FORMAT']);
930
+            $this->redirect('uploadStart', NULL, NULL, ['error' => 'INVALID_FORMAT']);
931 931
         }
932 932
 
933 933
     }
@@ -989,8 +989,8 @@  discard block
 block discarded – undo
989 989
 
990 990
         $this->redirect(
991 991
             'uploadedDocuments',
992
-            null,
993
-            null,
992
+            NULL,
993
+            NULL,
994 994
             ['from' => 0, 'importCounter' => sizeof($importedDocumentIdentifiers)]);
995 995
     }
996 996
 
Please login to merge, or discard this patch.
Classes/Controller/AjaxBackofficeController.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function searchFisAction($searchTerm, $type = 'person') {
252 252
         $fisUserDataService = new FisDataService();
253
-        $methodName = 'search'.ucfirst($type).'Request';
253
+        $methodName = 'search' . ucfirst($type) . 'Request';
254 254
         $result = $fisUserDataService->{$methodName}($searchTerm);
255 255
 
256 256
         return json_encode($result);
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function getFisDataAction($dataId, $groupId, $groupIndex, $fieldIndex, $pageId, $type = 'person') {
269 269
         $fisDataService = new FisDataService();
270
-        $methodName = 'get'.ucfirst($type).'Data';
270
+        $methodName = 'get' . ucfirst($type) . 'Data';
271 271
         $fisData = $fisDataService->{$methodName}($dataId);
272 272
 
273
-        $result = $this->getApiMappingArray($groupId, $fisData, $groupIndex, $fieldIndex, $pageId, 'getFis'.ucfirst($type).'Mapping');
273
+        $result = $this->getApiMappingArray($groupId, $fisData, $groupIndex, $fieldIndex, $pageId, 'getFis' . ucfirst($type) . 'Mapping');
274 274
 
275 275
         return json_encode($result);
276 276
     }
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      */
283 283
     public function searchGndAction($searchTerm, $type = 'person') {
284 284
         $gndUserDataService = new GndDataService();
285
-        $methodName = 'search'.ucfirst($type).'Request';
285
+        $methodName = 'search' . ucfirst($type) . 'Request';
286 286
         $result = $gndUserDataService->{$methodName}($searchTerm);
287 287
 
288 288
         return json_encode($result);
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function getGndDataAction($dataId, $groupId, $groupIndex, $fieldIndex, $pageId, $type = 'person') {
300 300
         $gndUserDataService = new GndDataService();
301
-        $methodName = 'get'.ucfirst($type).'Data';
301
+        $methodName = 'get' . ucfirst($type) . 'Data';
302 302
         $gndData = $gndUserDataService->{$methodName}($dataId);
303 303
 
304
-        $result = $this->getApiMappingArray($groupId, $gndData, $groupIndex, $fieldIndex, $pageId, 'getGnd'.ucfirst($type).'Mapping');
304
+        $result = $this->getApiMappingArray($groupId, $gndData, $groupIndex, $fieldIndex, $pageId, 'getGnd' . ucfirst($type) . 'Mapping');
305 305
 
306 306
         return json_encode($result);
307 307
     }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      */
397 397
     public function searchOrcidAction($searchTerm, $type = 'person') {
398 398
         $orcidUserDataService = new OrcidDataService();
399
-        $methodName = 'search'.ucfirst($type).'Request';
399
+        $methodName = 'search' . ucfirst($type) . 'Request';
400 400
         $result = $orcidUserDataService->{$methodName}($searchTerm);
401 401
 
402 402
         return json_encode($result);
@@ -413,10 +413,10 @@  discard block
 block discarded – undo
413 413
      */
414 414
     public function getOrcidDataAction($dataId, $groupId, $groupIndex, $fieldIndex, $pageId, $type = 'person') {
415 415
         $orcidDataService = new OrcidDataService();
416
-        $methodName = 'get'.ucfirst($type).'Data';
416
+        $methodName = 'get' . ucfirst($type) . 'Data';
417 417
         $orcidData = $orcidDataService->{$methodName}($dataId);
418 418
 
419
-        $result = $this->getApiMappingArray($groupId, $orcidData, $groupIndex, $fieldIndex, $pageId, 'getOrcid'.ucfirst($type).'Mapping');
419
+        $result = $this->getApiMappingArray($groupId, $orcidData, $groupIndex, $fieldIndex, $pageId, 'getOrcid' . ucfirst($type) . 'Mapping');
420 420
 
421 421
         return json_encode($result);
422 422
     }
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
     public function generateApiTokenAction($feUser) {
553 553
         $currentUser = $this->security->getUser();
554 554
         if ($currentUser->getUid() === $feUser) {
555
-            $string = md5(substr(md5(time()), 0, 14)).date("Y-m-dH:i:s");
555
+            $string = md5(substr(md5(time()), 0, 14)) . date("Y-m-dH:i:s");
556 556
             $hash = hash('sha256', $string);
557 557
 
558 558
             $currentUser->setApiToken($hash);
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 /**
30 30
  * AjaxBackofficeController
31 31
  */
32
-class AjaxBackofficeController extends \EWW\Dpf\Controller\AbstractController
33
-{
32
+class AjaxBackofficeController extends \EWW\Dpf\Controller\AbstractController {
34 33
     /**
35 34
      * bookmarkRepository
36 35
      *
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
      * @param string $identifier
70 69
      * @return bool
71 70
      */
72
-    public function addBookmarkAction($identifier)
73
-    {
71
+    public function addBookmarkAction($identifier) {
74 72
         /** @var \EWW\Dpf\Domain\Model\Bookmark $bookmark */
75 73
         $bookmark = $this->bookmarkRepository->findBookmark($this->security->getUser()->getUid(), $identifier);
76 74
         if (!$bookmark) {
@@ -90,8 +88,7 @@  discard block
 block discarded – undo
90 88
      * @param string $identifier
91 89
      * @return bool
92 90
      */
93
-    public function removeBookmarkAction($identifier)
94
-    {
91
+    public function removeBookmarkAction($identifier) {
95 92
         /** @var \EWW\Dpf\Domain\Model\Bookmark $bookmark */
96 93
         $bookmark = $this->bookmarkRepository->findBookmark($this->security->getUser()->getUid(), $identifier);
97 94
         if ($bookmark) {
@@ -109,8 +106,7 @@  discard block
 block discarded – undo
109 106
      * @param array $values
110 107
      * @return bool
111 108
      */
112
-    public function addWorkspaceFilterAction($name, $values = [])
113
-    {
109
+    public function addWorkspaceFilterAction($name, $values = []) {
114 110
         /** @var SearchSessionData $workspaceSessionData */
115 111
         $workspaceSessionData = $this->session->getWorkspaceData();
116 112
         $workspaceSessionData->setFilter($name, $values);
@@ -125,8 +121,7 @@  discard block
 block discarded – undo
125 121
      * @param string $order
126 122
      * @return bool
127 123
      */
128
-    public function addWorkspaceSortAction($field, $order)
129
-    {
124
+    public function addWorkspaceSortAction($field, $order) {
130 125
         /** @var SearchSessionData $workspaceSessionData */
131 126
         $workspaceSessionData = $this->session->getWorkspaceData();
132 127
         $workspaceSessionData->setSortField($field);
@@ -140,8 +135,7 @@  discard block
 block discarded – undo
140 135
      *
141 136
      * @return bool
142 137
      */
143
-    public function toggleWorkspaceExcludeDiscardedAction()
144
-    {
138
+    public function toggleWorkspaceExcludeDiscardedAction() {
145 139
         /** @var SearchSessionData $workspaceSessionData */
146 140
         $workspaceSessionData = $this->session->getWorkspaceData();
147 141
         $workspaceSessionData->toggleExcludeDiscardedFilter();
@@ -154,8 +148,7 @@  discard block
 block discarded – undo
154 148
      *
155 149
      * @return bool
156 150
      */
157
-    public function toggleWorkspaceBookmarksOnlyAction()
158
-    {
151
+    public function toggleWorkspaceBookmarksOnlyAction() {
159 152
         /** @var SearchSessionData $workspaceSessionData */
160 153
         $workspaceSessionData = $this->session->getWorkspaceData();
161 154
         $workspaceSessionData->toggleBookmarksOnlyFilter();
@@ -169,8 +162,7 @@  discard block
 block discarded – undo
169 162
      * @param int $itemsPerPage
170 163
      * @return bool
171 164
      */
172
-    public function setWorkspaceItemsPerPageAction($itemsPerPage)
173
-    {
165
+    public function setWorkspaceItemsPerPageAction($itemsPerPage) {
174 166
         /** @var SearchSessionData $workspaceSessionData */
175 167
         $workspaceSessionData = $this->session->getWorkspaceData();
176 168
         $workspaceSessionData->setItemsPerPage($itemsPerPage);
@@ -186,8 +178,7 @@  discard block
 block discarded – undo
186 178
      * @param string $query
187 179
      * @return bool
188 180
      */
189
-    public function saveExtendedSearchAction($name, $query)
190
-    {
181
+    public function saveExtendedSearchAction($name, $query) {
191 182
         $search = new \EWW\Dpf\Domain\Model\StoredSearch();
192 183
         $search->setName($name);
193 184
         $search->setQuery($query);
@@ -206,8 +197,7 @@  discard block
 block discarded – undo
206 197
      * @param int $id
207 198
      * @return bool
208 199
      */
209
-    public function loadExtendedSearchAction($id)
210
-    {
200
+    public function loadExtendedSearchAction($id) {
211 201
         /** @var FrontendUser $feUser */
212 202
         $feUser = $this->security->getUser();
213 203
         $searches = $feUser->getStoredSearches();
@@ -226,8 +216,7 @@  discard block
 block discarded – undo
226 216
      *
227 217
      * @return string
228 218
      */
229
-    public function loadExtendedSearchListAction()
230
-    {
219
+    public function loadExtendedSearchListAction() {
231 220
         /** @var FrontendUser $feUser */
232 221
         $feUser = $this->security->getUser();
233 222
 
@@ -481,8 +470,7 @@  discard block
 block discarded – undo
481 470
      * @return bool
482 471
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
483 472
      */
484
-    public function toggleBulkImportRecordAction($identifier)
485
-    {
473
+    public function toggleBulkImportRecordAction($identifier) {
486 474
         $externalMetaData = $this->externalMetadataRepository->findOneByPublicationIdentifier($identifier);
487 475
 
488 476
         if ($externalMetaData) {
@@ -505,8 +493,7 @@  discard block
 block discarded – undo
505 493
      * @param string $apiName
506 494
      * @return bool
507 495
      */
508
-    public function toggleBulkImportAuthorSearchAction($apiName)
509
-    {
496
+    public function toggleBulkImportAuthorSearchAction($apiName) {
510 497
         /** @var BulkImportSessionData $bulkImportData */
511 498
         $bulkImportSessionData = $this->session->getBulkImportData();
512 499
 
@@ -538,8 +525,7 @@  discard block
 block discarded – undo
538 525
         return true;
539 526
     }
540 527
 
541
-    public function initializeAction()
542
-    {
528
+    public function initializeAction() {
543 529
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
544 530
 
545 531
         parent::initializeAction();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
38 38
      * @TYPO3\CMS\Extbase\Annotation\Inject
39 39
      */
40
-    protected $bookmarkRepository = null;
40
+    protected $bookmarkRepository = NULL;
41 41
 
42 42
     /**
43 43
      * frontendUserRepository
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @var \EWW\Dpf\Domain\Repository\FrontendUserRepository
46 46
      * @TYPO3\CMS\Extbase\Annotation\Inject
47 47
      */
48
-    protected $frontendUserRepository = null;
48
+    protected $frontendUserRepository = NULL;
49 49
 
50 50
     /**
51 51
      * metadataGroupRepository
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
54 54
      * @TYPO3\CMS\Extbase\Annotation\Inject
55 55
      */
56
-    protected $metadataGroupRepository = null;
56
+    protected $metadataGroupRepository = NULL;
57 57
 
58 58
     /**
59 59
      * externalMetadataRepository
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @var \EWW\Dpf\Domain\Repository\ExternalMetadataRepository
62 62
      * @TYPO3\CMS\Extbase\Annotation\Inject
63 63
      */
64
-    protected $externalMetadataRepository = null;
64
+    protected $externalMetadataRepository = NULL;
65 65
 
66 66
     /**
67 67
      * Adds a the given document identifier to the bookmark list of the current fe user.
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
             $bookmark->setDocumentIdentifier($identifier);
79 79
             $bookmark->setFeUserUid($this->security->getUser()->getUid());
80 80
             $this->bookmarkRepository->add($bookmark);
81
-            return true;
81
+            return TRUE;
82 82
         }
83 83
 
84
-        return false;
84
+        return FALSE;
85 85
     }
86 86
 
87 87
     /**
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
         $bookmark = $this->bookmarkRepository->findBookmark($this->security->getUser()->getUid(), $identifier);
97 97
         if ($bookmark) {
98 98
             $this->bookmarkRepository->remove($bookmark);
99
-            return true;
99
+            return TRUE;
100 100
         }
101 101
 
102
-        return false;
102
+        return FALSE;
103 103
     }
104 104
 
105 105
     /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $workspaceSessionData = $this->session->getWorkspaceData();
116 116
         $workspaceSessionData->setFilter($name, $values);
117 117
         $this->session->setWorkspaceData($workspaceSessionData);
118
-        return true;
118
+        return TRUE;
119 119
     }
120 120
 
121 121
     /**
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $workspaceSessionData->setSortField($field);
133 133
         $workspaceSessionData->setSortOrder($order);
134 134
         $this->session->setWorkspaceData($workspaceSessionData);
135
-        return true;
135
+        return TRUE;
136 136
     }
137 137
 
138 138
     /**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $workspaceSessionData = $this->session->getWorkspaceData();
147 147
         $workspaceSessionData->toggleExcludeDiscardedFilter();
148 148
         $this->session->setWorkspaceData($workspaceSessionData);
149
-        return true;
149
+        return TRUE;
150 150
     }
151 151
 
152 152
     /**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $workspaceSessionData = $this->session->getWorkspaceData();
161 161
         $workspaceSessionData->toggleBookmarksOnlyFilter();
162 162
         $this->session->setWorkspaceData($workspaceSessionData);
163
-        return true;
163
+        return TRUE;
164 164
     }
165 165
 
166 166
     /**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $workspaceSessionData = $this->session->getWorkspaceData();
176 176
         $workspaceSessionData->setItemsPerPage($itemsPerPage);
177 177
         $this->session->setWorkspaceData($workspaceSessionData);
178
-        return true;
178
+        return TRUE;
179 179
     }
180 180
 
181 181
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $feUser->addStoredSearch($search);
198 198
         $this->frontendUserRepository->update($feUser);
199 199
 
200
-        return true;
200
+        return TRUE;
201 201
     }
202 202
 
203 203
     /**
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             }
219 219
         }
220 220
 
221
-        return false;
221
+        return FALSE;
222 222
     }
223 223
 
224 224
     /**
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
             }
497 497
         }
498 498
 
499
-        return true;
499
+        return TRUE;
500 500
     }
501 501
 
502 502
     /**
@@ -530,12 +530,12 @@  discard block
 block discarded – undo
530 530
                 $bulkImportSessionData->setPubMedSearchField($searchField);
531 531
                 break;
532 532
             default:
533
-                return false;
533
+                return FALSE;
534 534
         }
535 535
 
536 536
         $this->session->setBulkImportData($bulkImportSessionData);
537 537
 
538
-        return true;
538
+        return TRUE;
539 539
     }
540 540
 
541 541
     public function initializeAction()
Please login to merge, or discard this patch.