Passed
Push — master ( 391449...211177 )
by Ralf
09:26
created
Classes/Controller/DocumentController.php 1 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
 
@@ -533,12 +533,12 @@  discard block
 block discarded – undo
533 533
             $documentForm = $documentMapper->getDocumentForm($document);
534 534
             $document = $documentMapper->getDocument($documentForm);
535 535
 
536
-            $this->updateDocument($document, '', null);
537
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
536
+            $this->updateDocument($document, '', NULL);
537
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
538 538
         } else {
539 539
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure';
540 540
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
541
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
541
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
542 542
             return FALSE;
543 543
         }
544 544
     }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
         $this->redirect(
557 557
             'deleteLocally',
558 558
             'Document',
559
-            null,
559
+            NULL,
560 560
             [
561 561
                 'document' => $document,
562 562
                 'tstamp' => $tstamp,
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
                 $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_deleteLocally.accessDenied';
595 595
             }
596 596
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
597
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
597
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
598 598
             return FALSE;
599 599
         }
600 600
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
         } else {
648 648
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_deleteLocally.failureNewVersion';
649 649
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
650
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
650
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
651 651
         }
652 652
     }
653 653
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DUPLICATE, $document)) {
662 662
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.accessDenied';
663 663
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
664
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
664
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
665 665
             return FALSE;
666 666
         }
667 667
 
@@ -718,11 +718,11 @@  discard block
 block discarded – undo
718 718
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_PUBLISH, $document)) {
719 719
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.accessDenied';
720 720
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
721
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
721
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
722 722
             return FALSE;
723 723
         }
724 724
 
725
-        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_PUBLISH, null);
725
+        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_PUBLISH, NULL);
726 726
 
727 727
         /** @var Notifier $notifier */
728 728
         $notifier = $this->objectManager->get(Notifier::class);
@@ -741,11 +741,11 @@  discard block
 block discarded – undo
741 741
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_ACTIVATE, $document)) {
742 742
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.accessDenied';
743 743
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
744
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
744
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
745 745
             return FALSE;
746 746
         }
747 747
 
748
-        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE, null);
748
+        $this->updateDocument($document, DocumentWorkflow::TRANSITION_RELEASE_ACTIVATE, NULL);
749 749
 
750 750
     }
751 751
 
@@ -760,13 +760,13 @@  discard block
 block discarded – undo
760 760
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER, $document)) {
761 761
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
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
-        if (!$this->documentValidator->validate($document, false)) {
766
+        if (!$this->documentValidator->validate($document, FALSE)) {
767 767
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.missingValues';
768 768
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
769
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
769
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
770 770
         }
771 771
 
772 772
         $this->workflow->apply($document, \EWW\Dpf\Domain\Workflow\DocumentWorkflow::TRANSITION_REGISTER);
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
 
794 794
         $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.success';
795 795
         $this->flashMessage($document, $key, AbstractMessage::OK);
796
-        $this->redirect('showDetails', 'Document', null, ['document' => $document]);
796
+        $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
797 797
     }
798 798
 
799 799
     /**
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
         }
827 827
 
828 828
         $mapper = $this->objectManager->get(DocumentMapper::class);
829
-        $documentForm = $mapper->getDocumentForm($document, false);
829
+        $documentForm = $mapper->getDocumentForm($document, FALSE);
830 830
 
831 831
         $documentTypes = [0 => ''];
832 832
         foreach ($this->documentTypeRepository->getDocumentTypesAlphabetically() as $documentType) {
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SUGGEST_RESTORE, $document)) {
858 858
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_suggestRestore.accessDenied';
859 859
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
860
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
860
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
861 861
             return FALSE;
862 862
         }
863 863
 
@@ -877,8 +877,8 @@  discard block
 block discarded – undo
877 877
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
878 878
         $documentForm = $documentMapper->getDocumentForm($document);
879 879
 
880
-        $this->view->assign('suggestMod', true);
881
-        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
880
+        $this->view->assign('suggestMod', TRUE);
881
+        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => TRUE]);
882 882
     }
883 883
 
884 884
 
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
918 918
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
919 919
      */
920
-    protected function redirectToDocumentList($message = null)
920
+    protected function redirectToDocumentList($message = NULL)
921 921
     {
922 922
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
923 923
 
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
             $message,
961 961
             '',
962 962
             $severity,
963
-            true
963
+            TRUE
964 964
         );
965 965
     }
966 966
 
Please login to merge, or discard this patch.