Passed
Pull Request — master (#214)
by Ralf
11:24
created
ext_localconf.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
     require_once $composerAutoloadFile;
23 23
 }
24 24
 
25
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array(
25
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array (
26 26
     'extension'   => $_EXTKEY,
27 27
     'title'       => 'Kitodo.Publication-Dokumente ans Repository übertragen.',
28 28
     'description' => '',
29 29
 );
30 30
 
31
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\EmbargoTask'] = array(
31
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\EmbargoTask'] = array (
32 32
     'extension' => $_EXTKEY,
33 33
     'title' => 'Kitodo.Publication Embargo Task',
34 34
     'description' => 'Embargo task for sending information to admins or publish files automatically if the embargo date is expired',
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
38 38
     'EWW.' . $_EXTKEY,
39 39
     'KitodoPublicationForm',
40
-    array(
40
+    array (
41 41
         'DocumentForm'     => 'list,new,create,edit,update,delete,cancel,summary,register,delete',
42 42
         'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut',
43 43
         'Gnd'              => 'search',
44 44
     ),
45 45
     // non-cacheable actions
46
-    array(
46
+    array (
47 47
         'DocumentForm'     => 'list,new,create,edit,update,delete,cancel,summary,register,delete,'
48 48
             . 'ajaxGroup,ajaxFileGroup,ajaxField',
49 49
         'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut',
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
57 57
     'EWW.' . $_EXTKEY,
58 58
     'Frontendsearch',
59
-    array(
59
+    array (
60 60
         'SearchFE' => 'search,extendedSearch,showSearchForm',
61 61
     ),
62 62
     // non-cacheable actions
63
-    array(
63
+    array (
64 64
         'SearchFE' => 'search,extendedSearch'
65 65
     )
66 66
 );
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
69 69
     'EWW.' . $_EXTKEY,
70 70
     'Getfile',
71
-    array(
71
+    array (
72 72
         'GetFile'     => 'attachment',
73 73
     ),
74 74
     // non-cacheable actions
75
-    array(
75
+    array (
76 76
         'GetFile'     => 'attachment',
77 77
     )
78 78
 );
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
92 92
     'EWW.' . $_EXTKEY,
93 93
     'Backoffice',
94
-    array(
94
+    array (
95 95
         'Workspace'        => 'listWorkspace, initIndex, '
96 96
             .'batch, batchRegister, batchRemove, batchReleaseValidated, batchReleaseUnvalidated, editDocument, batchSetInProgress',
97 97
         'Document'         => 'logout, showDetails, discard, postpone, deleteLocally, deleteLocallySuggestion, register, releasePublish, '
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         'User'             => 'settings, saveSettings',
117 117
     ),
118 118
     // non-cacheable actions
119
-    array(
119
+    array (
120 120
         'Workspace'        => 'listWorkspace, initIndex, '
121 121
             .'batch, batchRegister, batchRemove, batchReleaseValidated, batchReleaseUnvalidated, editDocument, batchSetInProgress',
122 122
         'Document'         => 'logout, showDetails, discard, postpone, deleteLocally, deleteLocallySuggestion, register, releasePublish, '
Please login to merge, or discard this patch.
Classes/Helper/FormDataReader.php 1 patch
Upper-Lower-Casing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
30 30
      * @TYPO3\CMS\Extbase\Annotation\Inject
31 31
      */
32
-    protected $documentTypeRepository = null;
32
+    protected $documentTypeRepository = NULL;
33 33
 
34 34
     /**
35 35
      * metadataPageRepository
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @var \EWW\Dpf\Domain\Repository\MetadataPageRepository
38 38
      * @TYPO3\CMS\Extbase\Annotation\Inject
39 39
      */
40
-    protected $metadataPageRepository = null;
40
+    protected $metadataPageRepository = NULL;
41 41
 
42 42
     /**
43 43
      * metadataGroupRepository
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
46 46
      * @TYPO3\CMS\Extbase\Annotation\Inject
47 47
      */
48
-    protected $metadataGroupRepository = null;
48
+    protected $metadataGroupRepository = NULL;
49 49
 
50 50
     /**
51 51
      * metadataObjectRepository
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
54 54
      * @TYPO3\CMS\Extbase\Annotation\Inject
55 55
      */
56
-    protected $metadataObjectRepository = null;
56
+    protected $metadataObjectRepository = NULL;
57 57
 
58 58
     /**
59 59
      * fileRepository
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @var \EWW\Dpf\Domain\Repository\FileRepository
62 62
      * @TYPO3\CMS\Extbase\Annotation\Inject
63 63
      */
64
-    protected $fileRepository = null;
64
+    protected $fileRepository = NULL;
65 65
 
66 66
     /**
67 67
      * documentRepository
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
70 70
      * @TYPO3\CMS\Extbase\Annotation\Inject
71 71
      */
72
-    protected $documentRepository = null;
72
+    protected $documentRepository = NULL;
73 73
 
74 74
     /**
75 75
      * objectManager
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @var \EWW\Dpf\Domain\Repository\DepositLicenseRepository
93 93
      * @TYPO3\CMS\Extbase\Annotation\Inject
94 94
      */
95
-    protected $depositLicenseRepository = null;
95
+    protected $depositLicenseRepository = NULL;
96 96
 
97 97
     /**
98 98
      * formData
@@ -182,35 +182,35 @@  discard block
 block discarded – undo
182 182
     public function uploadError()
183 183
     {
184 184
         // todo: To be updated or implemented elsewhere
185
-        return false;
185
+        return FALSE;
186 186
 
187 187
         if (
188 188
             $this->formData['primaryFile'] &&
189 189
             $this->formData['primaryFile']['error'] != UPLOAD_ERR_OK &&
190 190
             $this->formData['primaryFile']['error'] != UPLOAD_ERR_NO_FILE
191 191
         ) {
192
-            return true;
192
+            return TRUE;
193 193
         }
194 194
 
195 195
         if (is_array($this->formData['secondaryFiles'])) {
196 196
             foreach ($this->formData['secondaryFiles'] as $tmpFile) {
197 197
                 if ($tmpFile['error'] != UPLOAD_ERR_OK && $tmpFile['error'] != UPLOAD_ERR_NO_FILE) {
198
-                    return true;
198
+                    return TRUE;
199 199
                 }
200 200
             }
201 201
         }
202 202
 
203
-        return false;
203
+        return FALSE;
204 204
     }
205 205
 
206
-    protected function getUploadedFile($tmpFile, $primary = false, \EWW\Dpf\Domain\Model\File $file = null)
206
+    protected function getUploadedFile($tmpFile, $primary = FALSE, \EWW\Dpf\Domain\Model\File $file = NULL)
207 207
     {
208 208
 
209 209
         if (empty($file)) {
210 210
             $file = $this->objectManager->get(File::class);
211 211
         }
212 212
 
213
-        $fileName = uniqid(time(), true);
213
+        $fileName = uniqid(time(), TRUE);
214 214
 
215 215
         \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move($tmpFile['tmp_name'], $this->uploadPath . $fileName);
216 216
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         $file->setTitle($tmpFile['name']);
224 224
         $file->setLink($fileName);
225 225
         $file->setPrimaryFile($primary);
226
-        $file->setFileIdentifier(uniqid(time(), true));
226
+        $file->setFileIdentifier(uniqid(time(), TRUE));
227 227
 
228 228
         if ($primary) {
229 229
             if ($file->getDatastreamIdentifier()) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                             if ($metadataGroup->isFileGroup()) {
335 335
 
336 336
                                 // Use the existing file entry
337
-                                $file = null;
337
+                                $file = NULL;
338 338
                                 $document = $this->documentRepository->findByUid($this->formData['documentUid']);
339 339
                                 if ($document) {
340 340
                                     if ($metadataGroup->isPrimaryFileGroup()) {
Please login to merge, or discard this patch.
Classes/Security/DocumentVoter.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     protected static function getAttributes()
82 82
     {
83
-        return array(
83
+        return array (
84 84
             self::CREATE,
85 85
             self::CREATE_ANONYMOUSLY,
86 86
             self::UPDATE,
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
     {
489 489
         if ($this->security->getUserRole() === Security::ROLE_RESEARCHER) {
490 490
 
491
-            $objectManager =GeneralUtility::makeInstance(ObjectManager::class);
491
+            $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
492 492
             $documentRepository = $objectManager->get(DocumentRepository::class);
493 493
 
494 494
             $linkedDocument = $documentRepository->findOneByLinkedUid($document->getUid());
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
      */
608 608
     protected function isDocumentLocked($document)
609 609
     {
610
-        $identifier = $document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid();
610
+        $identifier = $document->getObjectIdentifier() ? $document->getObjectIdentifier() : $document->getUid();
611 611
         return $this->editingLockService->isLocked($identifier, $this->security->getUser()->getUid());
612 612
     }
613 613
 
Please login to merge, or discard this patch.
Braces   +25 added lines, -50 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 use TYPO3\CMS\Core\Log\LogManager;
23 23
 
24 24
 
25
-class DocumentVoter extends Voter
26
-{
25
+class DocumentVoter extends Voter {
27 26
     const CREATE = "DOCUMENT_CREATE";
28 27
     const CREATE_ANONYMOUSLY = "DOCUMENT_CREATE_ANONYMOUSLY";
29 28
     const UPDATE = "DOCUMENT_UPDATE";
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
      */
68 67
     protected $workflow;
69 68
 
70
-    public function __construct()
71
-    {
69
+    public function __construct() {
72 70
        $this->workflow = DocumentWorkflow::getWorkflow();
73 71
     }
74 72
 
@@ -78,8 +76,7 @@  discard block
 block discarded – undo
78 76
      *
79 77
      * @return array
80 78
      */
81
-    protected static function getAttributes()
82
-    {
79
+    protected static function getAttributes() {
83 80
         return array(
84 81
             self::CREATE,
85 82
             self::CREATE_ANONYMOUSLY,
@@ -117,8 +114,7 @@  discard block
 block discarded – undo
117 114
      * @param mixed $subject
118 115
      * @return mixed
119 116
      */
120
-    public static function supports($attribute, $subject = NULL)
121
-    {
117
+    public static function supports($attribute, $subject = NULL) {
122 118
         if (!in_array($attribute, self::getAttributes())) {
123 119
             return FALSE;
124 120
         }
@@ -137,8 +133,7 @@  discard block
 block discarded – undo
137 133
      * @param mixed $subject
138 134
      * @return mixed
139 135
      */
140
-    public function voteOnAttribute($attribute, $subject = NULL)
141
-    {
136
+    public function voteOnAttribute($attribute, $subject = NULL) {
142 137
         if (!$subject instanceof Document) {
143 138
             return FALSE;
144 139
         }
@@ -259,8 +254,7 @@  discard block
 block discarded – undo
259 254
     /**
260 255
      * @return bool
261 256
      */
262
-    protected function defaultAccess()
263
-    {
257
+    protected function defaultAccess() {
264 258
         return (
265 259
             $this->security->getUserRole() === Security::ROLE_LIBRARIAN ||
266 260
             $this->security->getUserRole() === Security::ROLE_RESEARCHER
@@ -270,8 +264,7 @@  discard block
 block discarded – undo
270 264
     /**
271 265
      * @return bool
272 266
      */
273
-    protected function librarianOnly()
274
-    {
267
+    protected function librarianOnly() {
275 268
         return $this->security->getUserRole() === Security::ROLE_LIBRARIAN;
276 269
     }
277 270
 
@@ -279,8 +272,7 @@  discard block
 block discarded – undo
279 272
      * @param \EWW\Dpf\Domain\Model\Document $document
280 273
      * @return bool
281 274
      */
282
-    protected function canDiscard($document)
283
-    {
275
+    protected function canDiscard($document) {
284 276
         if ($this->isDocumentLocked($document)) {
285 277
             return FALSE;
286 278
         }
@@ -303,8 +295,7 @@  discard block
 block discarded – undo
303 295
      * @param \EWW\Dpf\Domain\Model\Document $document
304 296
      * @return bool
305 297
      */
306
-    protected function canShowDetails($document)
307
-    {
298
+    protected function canShowDetails($document) {
308 299
         if ($this->security->getUserRole() === Security::ROLE_LIBRARIAN) {
309 300
             return (
310 301
                 $document->getState() !== DocumentWorkflow::STATE_NEW_NONE ||
@@ -330,8 +321,7 @@  discard block
 block discarded – undo
330 321
      * @param \EWW\Dpf\Domain\Model\Document $document
331 322
      * @return bool
332 323
      */
333
-    protected function canRegister($document)
334
-    {
324
+    protected function canRegister($document) {
335 325
         if (
336 326
             $this->workflow->can($document, \EWW\Dpf\Domain\Workflow\DocumentWorkflow::TRANSITION_REGISTER) &&
337 327
             $document->getCreator() === $this->security->getUser()->getUid()
@@ -347,8 +337,7 @@  discard block
 block discarded – undo
347 337
      * @param \EWW\Dpf\Domain\Model\Document $document
348 338
      * @return bool
349 339
      */
350
-    protected function canReleasePublish($document)
351
-    {
340
+    protected function canReleasePublish($document) {
352 341
         if ($this->isDocumentLocked($document)) {
353 342
             return FALSE;
354 343
         }
@@ -366,8 +355,7 @@  discard block
 block discarded – undo
366 355
      * @param \EWW\Dpf\Domain\Model\Document $document
367 356
      * @return bool
368 357
      */
369
-    protected function canReleaseActivate($document)
370
-    {
358
+    protected function canReleaseActivate($document) {
371 359
         if ($this->isDocumentLocked($document)) {
372 360
             return FALSE;
373 361
         }
@@ -384,8 +372,7 @@  discard block
 block discarded – undo
384 372
      * @param \EWW\Dpf\Domain\Model\Document $document
385 373
      * @return bool
386 374
      */
387
-    protected function canDeleteLocally($document)
388
-    {
375
+    protected function canDeleteLocally($document) {
389 376
         if ($this->isDocumentLocked($document)) {
390 377
             return FALSE;
391 378
         }
@@ -410,8 +397,7 @@  discard block
 block discarded – undo
410 397
      * @param \EWW\Dpf\Domain\Model\Document $document
411 398
      * @return bool
412 399
      */
413
-    protected function canDeleteWorkingCopy($document)
414
-    {
400
+    protected function canDeleteWorkingCopy($document) {
415 401
         if ($document->isTemporary() || $this->isDocumentLocked($document)) {
416 402
             return FALSE;
417 403
         }
@@ -428,8 +414,7 @@  discard block
 block discarded – undo
428 414
      * @param \EWW\Dpf\Domain\Model\Document $document
429 415
      * @return bool
430 416
      */
431
-    protected function canEdit($document)
432
-    {
417
+    protected function canEdit($document) {
433 418
         if ($this->isDocumentLocked($document)) {
434 419
             return FALSE;
435 420
         }
@@ -456,8 +441,7 @@  discard block
 block discarded – undo
456 441
      * @param \EWW\Dpf\Domain\Model\Document $document
457 442
      * @return bool
458 443
      */
459
-    protected function canUpdate($document)
460
-    {
444
+    protected function canUpdate($document) {
461 445
         if ($this->isDocumentLocked($document)) {
462 446
             return FALSE;
463 447
         }
@@ -484,8 +468,7 @@  discard block
 block discarded – undo
484 468
      * @param \EWW\Dpf\Domain\Model\Document $document
485 469
      * @return bool
486 470
      */
487
-    protected function canSuggestRestore($document)
488
-    {
471
+    protected function canSuggestRestore($document) {
489 472
         if ($this->security->getUserRole() === Security::ROLE_RESEARCHER) {
490 473
 
491 474
             $objectManager =GeneralUtility::makeInstance(ObjectManager::class);
@@ -510,8 +493,7 @@  discard block
 block discarded – undo
510 493
      * @param \EWW\Dpf\Domain\Model\Document $document
511 494
      * @return bool
512 495
      */
513
-    protected function canSuggestModification($document)
514
-    {
496
+    protected function canSuggestModification($document) {
515 497
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
516 498
         $documentRepository = $objectManager->get(DocumentRepository::class);
517 499
 
@@ -540,8 +522,7 @@  discard block
 block discarded – undo
540 522
      * @param \EWW\Dpf\Domain\Model\Document $document
541 523
      * @return bool
542 524
      */
543
-    protected function canSuggestionAccept($document)
544
-    {
525
+    protected function canSuggestionAccept($document) {
545 526
         // TODO: What if a document should be restored?
546 527
 
547 528
         return $this->librarianOnly();
@@ -551,8 +532,7 @@  discard block
 block discarded – undo
551 532
      * @param \EWW\Dpf\Domain\Model\Document $document
552 533
      * @return bool
553 534
      */
554
-    protected function canPostpone($document)
555
-    {
535
+    protected function canPostpone($document) {
556 536
         if ($this->isDocumentLocked($document)) {
557 537
             return FALSE;
558 538
         }
@@ -569,8 +549,7 @@  discard block
 block discarded – undo
569 549
      * @param \EWW\Dpf\Domain\Model\Document $document
570 550
      * @return bool
571 551
      */
572
-    protected function canCreateAnonymously($document)
573
-    {
552
+    protected function canCreateAnonymously($document) {
574 553
         if ($this->security->getUserRole()) {
575 554
             return FALSE;
576 555
         }
@@ -582,8 +561,7 @@  discard block
 block discarded – undo
582 561
      * @param \EWW\Dpf\Domain\Model\Document $document
583 562
      * @return bool
584 563
      */
585
-    protected function canDuplicate($document)
586
-    {
564
+    protected function canDuplicate($document) {
587 565
         if ($this->security->getUserRole() === Security::ROLE_LIBRARIAN) {
588 566
             return (
589 567
                 $document->getState() !== DocumentWorkflow::STATE_NEW_NONE ||
@@ -605,8 +583,7 @@  discard block
 block discarded – undo
605 583
      * @param \EWW\Dpf\Domain\Model\Document $document
606 584
      * @return bool
607 585
      */
608
-    protected function isDocumentLocked($document)
609
-    {
586
+    protected function isDocumentLocked($document) {
610 587
         $identifier = $document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid();
611 588
         return $this->editingLockService->isLocked($identifier, $this->security->getUser()->getUid());
612 589
     }
@@ -615,8 +592,7 @@  discard block
 block discarded – undo
615 592
      * @param \EWW\Dpf\Domain\Model\Document $document
616 593
      * @return bool
617 594
      */
618
-    protected function canEditAnonymously($document)
619
-    {
595
+    protected function canEditAnonymously($document) {
620 596
         if ($this->security->getUserRole()) {
621 597
             return FALSE;
622 598
         }
@@ -634,8 +610,7 @@  discard block
 block discarded – undo
634 610
      * @param \EWW\Dpf\Domain\Model\Document $document
635 611
      * @return bool
636 612
      */
637
-    protected function canRegisterAnonymously($document)
638
-    {
613
+    protected function canRegisterAnonymously($document) {
639 614
         if ($this->security->getUserRole()) {
640 615
             return FALSE;
641 616
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     const CREATE = "DOCUMENT_CREATE";
28 28
     const CREATE_ANONYMOUSLY = "DOCUMENT_CREATE_ANONYMOUSLY";
29 29
     const UPDATE = "DOCUMENT_UPDATE";
30
-    const LIST = "DOCUMENT_LIST";
30
+    const list = "DOCUMENT_LIST";
31 31
     const LIST_REGISTERED = "DOCUMENT_LIST_REGISTERED";
32 32
     const LIST_IN_PROGRESS = "DOCUMENT_LIST_IN_PROGRESS";
33 33
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @var \EWW\Dpf\Services\Document\EditingLockService
59 59
      * @TYPO3\CMS\Extbase\Annotation\Inject
60 60
      */
61
-    protected $editingLockService = null;
61
+    protected $editingLockService = NULL;
62 62
 
63 63
     /**
64 64
      * workflow
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             self::CREATE,
85 85
             self::CREATE_ANONYMOUSLY,
86 86
             self::UPDATE,
87
-            self::LIST,
87
+            self::list,
88 88
             self::LIST_REGISTERED,
89 89
             self::LIST_IN_PROGRESS,
90 90
             self::DISCARD,
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 return $this->canUpdate($subject);
158 158
                 break;
159 159
 
160
-            case self::LIST:
160
+            case self::list:
161 161
                 return $this->defaultAccess();
162 162
                 break;
163 163
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
             ]
254 254
         );
255 255
 
256
-        return false;
256
+        return FALSE;
257 257
     }
258 258
 
259 259
     /**
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             );
478 478
         }
479 479
 
480
-        return false;
480
+        return FALSE;
481 481
     }
482 482
 
483 483
     /**
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
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                 $this->request->setArguments($requestArguments);
353 353
             } else {
354 354
                 $t = $docForm->getFileNames();
355
-                $this->redirect('list', 'Document', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
355
+                $this->redirect('list', 'Document', null, array ('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
356 356
             }
357 357
         } else {
358 358
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                 $this->request->setArguments($requestArguments);
411 411
             } else {
412 412
                 $t = $docForm->getFileNames();
413
-                $this->redirect('list', 'DocumentForm', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
413
+                $this->redirect('list', 'DocumentForm', null, array ('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
414 414
             }
415 415
         } else {
416 416
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
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
      * documentManager
34 33
      *
@@ -111,8 +110,7 @@  discard block
 block discarded – undo
111 110
      *
112 111
      * @return void
113 112
      */
114
-    public function listAction()
115
-    {
113
+    public function listAction() {
116 114
         $documents = $this->documentRepository->findAll();
117 115
         $docTypes = $this->documentTypeRepository->getDocumentTypesAlphabetically();
118 116
 
@@ -133,8 +131,7 @@  discard block
 block discarded – undo
133 131
      *
134 132
      * @return void
135 133
      */
136
-    public function initializeNewAction()
137
-    {
134
+    public function initializeNewAction() {
138 135
 
139 136
         $requestArguments = $this->request->getArguments();
140 137
 
@@ -170,8 +167,7 @@  discard block
 block discarded – undo
170 167
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newDocumentForm")
171 168
      * @return void
172 169
      */
173
-    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
174
-    {
170
+    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0) {
175 171
         $this->view->assign('returnDocumentId', $returnDocumentId);
176 172
         $this->view->assign('documentForm', $newDocumentForm);
177 173
 
@@ -184,8 +180,7 @@  discard block
 block discarded – undo
184 180
         }
185 181
     }
186 182
 
187
-    public function initializeCreateAction()
188
-    {
183
+    public function initializeCreateAction() {
189 184
         $this->documentFormMapping();
190 185
     }
191 186
 
@@ -195,8 +190,7 @@  discard block
 block discarded – undo
195 190
      * @param \EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm
196 191
      * @return void
197 192
      */
198
-    public function createAction(DocumentForm $newDocumentForm)
199
-    {
193
+    public function createAction(DocumentForm $newDocumentForm) {
200 194
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
201 195
 
202 196
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
@@ -283,8 +277,7 @@  discard block
 block discarded – undo
283 277
         }
284 278
     }
285 279
 
286
-    public function initializeEditAction()
287
-    {
280
+    public function initializeEditAction() {
288 281
         $requestArguments = $this->request->getArguments();
289 282
 
290 283
         if (array_key_exists('document', $requestArguments)) {
@@ -313,8 +306,7 @@  discard block
 block discarded – undo
313 306
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("documentForm")
314 307
      * @return void
315 308
      */
316
-    public function editAction(DocumentForm $documentForm)
317
-    {
309
+    public function editAction(DocumentForm $documentForm) {
318 310
         $this->view->assign('documentForm', $documentForm);
319 311
 
320 312
         if (!empty($this->security->getUserAccessToGroups())) {
@@ -326,8 +318,7 @@  discard block
 block discarded – undo
326 318
         }
327 319
     }
328 320
 
329
-    public function initializeUpdateAction()
330
-    {
321
+    public function initializeUpdateAction() {
331 322
         $requestArguments = $this->request->getArguments();
332 323
 
333 324
         if ($this->request->hasArgument('documentData')) {
@@ -364,23 +355,19 @@  discard block
 block discarded – undo
364 355
      *
365 356
      * @return void
366 357
      */
367
-    public function cancelAction()
368
-    {
358
+    public function cancelAction() {
369 359
         $this->redirectToList();
370 360
     }
371 361
 
372
-    protected function redirectAfterUpdate()
373
-    {
362
+    protected function redirectAfterUpdate() {
374 363
         $this->redirect('list');
375 364
     }
376 365
 
377
-    protected function redirectToList($message = null)
378
-    {
366
+    protected function redirectToList($message = null) {
379 367
         $this->redirect('list');
380 368
     }
381 369
 
382
-    protected function documentFormMapping()
383
-    {
370
+    protected function documentFormMapping() {
384 371
         $requestArguments = $this->request->getArguments();
385 372
 
386 373
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($requestArguments, null, 20);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @var \EWW\Dpf\Services\Document\DocumentManager
36 36
      * @TYPO3\CMS\Extbase\Annotation\Inject
37 37
      */
38
-    protected $documentManager = null;
38
+    protected $documentManager = NULL;
39 39
 
40 40
     /**
41 41
      * documentRepository
@@ -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
      * fileRepository
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @var \EWW\Dpf\Domain\Repository\FileRepository
52 52
      * @TYPO3\CMS\Extbase\Annotation\Inject
53 53
      */
54
-    protected $fileRepository = null;
54
+    protected $fileRepository = NULL;
55 55
 
56 56
     /**
57 57
      * documentTypeRepository
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
60 60
      * @TYPO3\CMS\Extbase\Annotation\Inject
61 61
      */
62
-    protected $documentTypeRepository = null;
62
+    protected $documentTypeRepository = NULL;
63 63
 
64 64
     /**
65 65
      * metadataGroupRepository
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
68 68
      * @TYPO3\CMS\Extbase\Annotation\Inject
69 69
      */
70
-    protected $metadataGroupRepository = null;
70
+    protected $metadataGroupRepository = NULL;
71 71
 
72 72
     /**
73 73
      * metadataObjectRepository
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
76 76
      * @TYPO3\CMS\Extbase\Annotation\Inject
77 77
      */
78
-    protected $metadataObjectRepository = null;
78
+    protected $metadataObjectRepository = NULL;
79 79
 
80 80
     /**
81 81
      * depositLicenseLogRepository
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @var \EWW\Dpf\Domain\Repository\DepositLicenseLogRepository
84 84
      * @TYPO3\CMS\Extbase\Annotation\Inject
85 85
      */
86
-    protected $depositLicenseLogRepository = null;
86
+    protected $depositLicenseLogRepository = NULL;
87 87
 
88 88
     /**
89 89
      * persistence manager
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
      * @var \EWW\Dpf\Services\FeUser\FisDataService
100 100
      * @TYPO3\CMS\Extbase\Annotation\Inject
101 101
      */
102
-    protected $fisDataService = null;
102
+    protected $fisDataService = NULL;
103 103
 
104 104
     /**
105 105
      * @var Document
106 106
      */
107
-    protected $newDocument = null;
107
+    protected $newDocument = NULL;
108 108
 
109 109
     /**
110 110
      * action list
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $docForm = $this->request->getArgument('newDocumentForm');
152 152
             if (is_numeric($docForm)) {
153 153
                 $sessionData = $this->session->getData();
154
-                $docForm = null;
154
+                $docForm = NULL;
155 155
                 if (array_key_exists('newDocumentForm', $sessionData)) {
156 156
                     $docForm = unserialize($sessionData['newDocumentForm']);
157 157
                 }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newDocumentForm")
171 171
      * @return void
172 172
      */
173
-    public function newAction(DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
173
+    public function newAction(DocumentForm $newDocumentForm = NULL, $returnDocumentId = 0)
174 174
     {
175 175
         $this->view->assign('returnDocumentId', $returnDocumentId);
176 176
         $this->view->assign('documentForm', $newDocumentForm);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             //$workflow->apply($newDocument, DocumentWorkflow::TRANSITION_CREATE);
213 213
         } else {
214 214
             $newDocument->setCreator(0);
215
-            $newDocument->setTemporary(true);
215
+            $newDocument->setTemporary(TRUE);
216 216
             //$workflow->apply($newDocument, DocumentWorkflow::TRANSITION_CREATE_REGISTER);
217 217
         }
218 218
 
@@ -348,11 +348,11 @@  discard block
 block discarded – undo
348 348
             $virtualType = $documentType->getVirtualType();
349 349
 
350 350
 
351
-            if (!$formDataReader->uploadError() || $virtualType === true) {
351
+            if (!$formDataReader->uploadError() || $virtualType === TRUE) {
352 352
                 $this->request->setArguments($requestArguments);
353 353
             } else {
354 354
                 $t = $docForm->getFileNames();
355
-                $this->redirect('list', 'Document', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
355
+                $this->redirect('list', 'Document', NULL, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
356 356
             }
357 357
         } else {
358 358
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
         $this->redirect('list');
375 375
     }
376 376
 
377
-    protected function redirectToList($message = null)
377
+    protected function redirectToList($message = NULL)
378 378
     {
379 379
         $this->redirect('list');
380 380
     }
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     {
384 384
         $requestArguments = $this->request->getArguments();
385 385
 
386
-        \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($requestArguments, null, 20);
386
+        \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($requestArguments, NULL, 20);
387 387
 
388 388
 
389 389
         if ($this->request->hasArgument('documentData')) {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             if (!$docForm->hasValidCsrfToken()) {
398 398
                 throw new Exception("Invalid CSRF Token");
399 399
             }
400
-            \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($docForm, null, 20);
400
+            \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($docForm, NULL, 20);
401 401
 
402 402
 
403 403
             $requestArguments['newDocumentForm'] = $docForm;
@@ -406,11 +406,11 @@  discard block
 block discarded – undo
406 406
             $documentType = $this->documentTypeRepository->findByUid($docTypeUid);
407 407
             $virtualType = $documentType->getVirtualType();
408 408
 
409
-            if (!$formDataReader->uploadError() || $virtualType === true) {
409
+            if (!$formDataReader->uploadError() || $virtualType === TRUE) {
410 410
                 $this->request->setArguments($requestArguments);
411 411
             } else {
412 412
                 $t = $docForm->getFileNames();
413
-                $this->redirect('list', 'DocumentForm', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
413
+                $this->redirect('list', 'DocumentForm', NULL, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t));
414 414
             }
415 415
         } else {
416 416
             $this->redirectToList("UPLOAD_POST_SIZE_ERROR");
Please login to merge, or discard this patch.
Classes/Controller/DocumentController.php 2 patches
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
 /**
37 37
  * DocumentController
38 38
  */
39
-class DocumentController extends AbstractController
40
-{
39
+class DocumentController extends AbstractController {
41 40
 
42 41
     /**
43 42
      * documentRepository
@@ -152,8 +151,7 @@  discard block
 block discarded – undo
152 151
     /**
153 152
      * DocumentController constructor.
154 153
      */
155
-    public function __construct()
156
-    {
154
+    public function __construct() {
157 155
         parent::__construct();
158 156
 
159 157
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -168,8 +166,7 @@  discard block
 block discarded – undo
168 166
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
169 167
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
170 168
      */
171
-    public function logoutAction()
172
-    {
169
+    public function logoutAction() {
173 170
         $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
174 171
         $uri = $cObj->typolink_URL([
175 172
             'parameter' => $this->settings['loginPage'],
@@ -440,8 +437,7 @@  discard block
 block discarded – undo
440 437
      * @param string $reason
441 438
      * @return void
442 439
      */
443
-    public function discardAction(Document $document, $tstamp, $reason = NULL)
444
-    {
440
+    public function discardAction(Document $document, $tstamp, $reason = NULL) {
445 441
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DISCARD, $document)) {
446 442
             if (
447 443
                 $this->editingLockService->isLocked(
@@ -469,8 +465,7 @@  discard block
 block discarded – undo
469 465
      * @param string $reason
470 466
      * @return void
471 467
      */
472
-    public function postponeAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = NULL)
473
-    {
468
+    public function postponeAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = NULL) {
474 469
         if (!$this->authorizationChecker->isGranted(DocumentVoter::POSTPONE, $document)) {
475 470
             if (
476 471
                 $this->editingLockService->isLocked(
@@ -499,8 +494,7 @@  discard block
 block discarded – undo
499 494
      * @param int $documentTypeUid
500 495
      * @return void
501 496
      */
502
-    public function changeDocumentTypeAction(\EWW\Dpf\Domain\Model\Document $document, $documentTypeUid = 0)
503
-    {
497
+    public function changeDocumentTypeAction(\EWW\Dpf\Domain\Model\Document $document, $documentTypeUid = 0) {
504 498
         if (!$this->authorizationChecker->isGranted(DocumentVoter::UPDATE, $document)) {
505 499
             if (
506 500
             $this->editingLockService->isLocked(
@@ -551,8 +545,7 @@  discard block
 block discarded – undo
551 545
      * @param string $reason
552 546
      * @return void
553 547
      */
554
-    public function deleteLocallySuggestionAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "")
555
-    {
548
+    public function deleteLocallySuggestionAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "") {
556 549
         $this->redirect(
557 550
             'deleteLocally',
558 551
             'Document',
@@ -574,8 +567,7 @@  discard block
 block discarded – undo
574 567
      * @param string $reason
575 568
      * @return void
576 569
      */
577
-    public function deleteLocallyAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "")
578
-    {
570
+    public function deleteLocallyAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp, $reason = "") {
579 571
         if (empty($document->getObjectIdentifier()) || $document->isSuggestion()) {
580 572
             $voterAttribute = DocumentVoter::DELETE_LOCALLY;
581 573
         } else {
@@ -656,8 +648,7 @@  discard block
 block discarded – undo
656 648
      * @param Document $document
657 649
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
658 650
      */
659
-    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document)
660
-    {
651
+    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) {
661 652
         if (!$this->authorizationChecker->isGranted(DocumentVoter::DUPLICATE, $document)) {
662 653
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.accessDenied';
663 654
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -713,8 +704,7 @@  discard block
 block discarded – undo
713 704
      * @param integer $tstamp
714 705
      * @return void
715 706
      */
716
-    public function releasePublishAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
717
-    {
707
+    public function releasePublishAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
718 708
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_PUBLISH, $document)) {
719 709
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.accessDenied';
720 710
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -736,8 +726,7 @@  discard block
 block discarded – undo
736 726
      * @param integer $tstamp
737 727
      * @return void
738 728
      */
739
-    public function releaseActivateAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp)
740
-    {
729
+    public function releaseActivateAction(\EWW\Dpf\Domain\Model\Document $document, $tstamp) {
741 730
         if (!$this->authorizationChecker->isGranted(DocumentVoter::RELEASE_ACTIVATE, $document)) {
742 731
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.accessDenied';
743 732
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -755,8 +744,7 @@  discard block
 block discarded – undo
755 744
      * @param \EWW\Dpf\Domain\Model\Document $document
756 745
      * @return void
757 746
      */
758
-    public function registerAction(\EWW\Dpf\Domain\Model\Document $document)
759
-    {
747
+    public function registerAction(\EWW\Dpf\Domain\Model\Document $document) {
760 748
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER, $document)) {
761 749
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
762 750
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -802,8 +790,7 @@  discard block
 block discarded – undo
802 790
      * @param \EWW\Dpf\Domain\Model\Document $document
803 791
      * @return void
804 792
      */
805
-    public function showDetailsAction(Document $document)
806
-    {
793
+    public function showDetailsAction(Document $document) {
807 794
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SHOW_DETAILS, $document)) {
808 795
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_showDetails.accessDenied';
809 796
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -843,8 +830,7 @@  discard block
 block discarded – undo
843 830
     }
844 831
 
845 832
 
846
-    public function cancelListTaskAction()
847
-    {
833
+    public function cancelListTaskAction() {
848 834
         $this->redirectToDocumentList();
849 835
     }
850 836
 
@@ -887,8 +873,7 @@  discard block
 block discarded – undo
887 873
     /**
888 874
      * initializeAction
889 875
      */
890
-    public function initializeAction()
891
-    {
876
+    public function initializeAction() {
892 877
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
893 878
 
894 879
         parent::initializeAction();
@@ -919,8 +904,7 @@  discard block
 block discarded – undo
919 904
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
920 905
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
921 906
      */
922
-    protected function redirectToDocumentList($message = null)
923
-    {
907
+    protected function redirectToDocumentList($message = null) {
924 908
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
925 909
 
926 910
         if ($redirectUri) {
@@ -935,8 +919,7 @@  discard block
 block discarded – undo
935 919
      *
936 920
      * @return mixed
937 921
      */
938
-    protected function getStoragePID()
939
-    {
922
+    protected function getStoragePID() {
940 923
         return $this->settings['persistence']['classes']['EWW\Dpf\Domain\Model\Document']['newRecordStoragePid'];
941 924
     }
942 925
 
@@ -949,8 +932,7 @@  discard block
 block discarded – undo
949 932
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
950 933
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
951 934
      */
952
-    protected function updateDocument(\EWW\Dpf\Domain\Model\Document $document, $workflowTransition, $reason)
953
-    {
935
+    protected function updateDocument(\EWW\Dpf\Domain\Model\Document $document, $workflowTransition, $reason) {
954 936
         switch ($workflowTransition) {
955 937
             case DocumentWorkflow::TRANSITION_DISCARD:
956 938
                 $messageKeyPart = 'document_discard';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +39 added lines, -39 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) {
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
         if (!$this->authorizationChecker->isGranted(DocumentVoter::SUGGEST_RESTORE, $document)) {
860 860
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_suggestRestore.accessDenied';
861 861
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
862
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
862
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
863 863
             return FALSE;
864 864
         }
865 865
 
@@ -879,8 +879,8 @@  discard block
 block discarded – undo
879 879
         /* @var $newDocument \EWW\Dpf\Domain\Model\Document */
880 880
         $documentForm = $documentMapper->getDocumentForm($document);
881 881
 
882
-        $this->view->assign('suggestMod', true);
883
-        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]);
882
+        $this->view->assign('suggestMod', TRUE);
883
+        $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => TRUE]);
884 884
     }
885 885
 
886 886
 
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
920 920
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
921 921
      */
922
-    protected function redirectToDocumentList($message = null)
922
+    protected function redirectToDocumentList($message = NULL)
923 923
     {
924 924
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
925 925
 
Please login to merge, or discard this patch.
Classes/Controller/DocumentFormController.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@
 block discarded – undo
255 255
     public function deleteAction(Document $document)
256 256
     {
257 257
         if ($this->authorizationChecker->isGranted(DocumentVoter::DELETE_ANONYMOUSLY, $document)) {
258
-           $this->documentRepository->remove($document);
258
+            $this->documentRepository->remove($document);
259 259
         } else {
260 260
             $message = LocalizationUtility::translate(
261 261
                 'manager.workspace.accessDenied', 'dpf'
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
      * @var \EWW\Dpf\Helper\DocumentMapper
34 34
      * @TYPO3\CMS\Extbase\Annotation\Inject
35 35
      */
36
-    protected $documentMapper= null;
36
+    protected $documentMapper = null;
37 37
 
38 38
     protected function redirectToList($message = null)
39 39
     {
40
-        $this->redirect('list', 'DocumentForm', null, array('message' => $message));
40
+        $this->redirect('list', 'DocumentForm', null, array ('message' => $message));
41 41
     }
42 42
 
43 43
     /**
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 
96 96
             $message[] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, 'dpf');
97 97
 
98
-            $this->addFlashMessage(implode(" ", $message), '', $severity,true);
99
-            $this->forward('new', 'DocumentForm', null, array('newDocumentForm' => $newDocumentForm));
98
+            $this->addFlashMessage(implode(" ", $message), '', $severity, true);
99
+            $this->forward('new', 'DocumentForm', null, array ('newDocumentForm' => $newDocumentForm));
100 100
         }
101 101
     }
102 102
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $message = LocalizationUtility::translate(
117 117
                 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.accessDenied',
118 118
                 'dpf',
119
-                array($document->getTitle())
119
+                array ($document->getTitle())
120 120
             );
121 121
 
122 122
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
 use TYPO3\CMS\Core\Messaging\AbstractMessage;
26 26
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
27 27
 
28
-class DocumentFormController extends AbstractDocumentFormController
29
-{
28
+class DocumentFormController extends AbstractDocumentFormController {
30 29
     /**
31 30
      * documentRepository
32 31
      *
@@ -35,8 +34,7 @@  discard block
 block discarded – undo
35 34
      */
36 35
     protected $documentMapper= null;
37 36
 
38
-    protected function redirectToList($message = null)
39
-    {
37
+    protected function redirectToList($message = null) {
40 38
         $this->redirect('list', 'DocumentForm', null, array('message' => $message));
41 39
     }
42 40
 
@@ -48,8 +46,7 @@  discard block
 block discarded – undo
48 46
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newDocumentForm")
49 47
      * @return void
50 48
      */
51
-    public function newAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
52
-    {
49
+    public function newAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm = null, $returnDocumentId = 0) {
53 50
         $this->view->assign('documentForm', $newDocumentForm);
54 51
     }
55 52
 
@@ -59,8 +56,7 @@  discard block
 block discarded – undo
59 56
      * @param \EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm
60 57
      * @return void
61 58
      */
62
-    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm)
63
-    {
59
+    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) {
64 60
         // Replaced by the form configuration (download/archive)
65 61
         /*
66 62
            foreach ($newDocumentForm->getFiles() as $file) {
@@ -107,8 +103,7 @@  discard block
 block discarded – undo
107 103
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("documentForm")
108 104
      * @return void
109 105
      */
110
-    public function editAction(DocumentForm $documentForm)
111
-    {
106
+    public function editAction(DocumentForm $documentForm) {
112 107
         $document = $this->documentMapper->getDocument($documentForm);
113 108
 
114 109
         if (!$this->authorizationChecker->isGranted(DocumentVoter::EDIT_ANONYMOUSLY, $document)) {
@@ -133,8 +128,7 @@  discard block
 block discarded – undo
133 128
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
134 129
      * @return void
135 130
      */
136
-    public function updateAction(DocumentForm $documentForm)
137
-    {
131
+    public function updateAction(DocumentForm $documentForm) {
138 132
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
139 133
 
140 134
         /* @var $updateDocument \EWW\Dpf\Domain\Model\Document */
@@ -162,8 +156,7 @@  discard block
 block discarded – undo
162 156
      * @param \EWW\Dpf\Domain\Model\Document $document
163 157
      * @return void
164 158
      */
165
-    public function registerAction(Document $document)
166
-    {
159
+    public function registerAction(Document $document) {
167 160
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER_ANONYMOUSLY, $document)) {
168 161
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
169 162
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
@@ -230,8 +223,7 @@  discard block
 block discarded – undo
230 223
      * @param Document $document
231 224
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
232 225
      */
233
-    public function summaryAction(Document $document)
234
-    {
226
+    public function summaryAction(Document $document) {
235 227
         if (!$this->authorizationChecker->isGranted(DocumentVoter::EDIT_ANONYMOUSLY, $document)) {
236 228
             $message = LocalizationUtility::translate(
237 229
                 'manager.workspace.accessDenied', 'dpf'
@@ -252,8 +244,7 @@  discard block
 block discarded – undo
252 244
      * @param Document $document
253 245
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
254 246
      */
255
-    public function deleteAction(Document $document)
256
-    {
247
+    public function deleteAction(Document $document) {
257 248
         if ($this->authorizationChecker->isGranted(DocumentVoter::DELETE_ANONYMOUSLY, $document)) {
258 249
            $this->documentRepository->remove($document);
259 250
         } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
      * @var \EWW\Dpf\Helper\DocumentMapper
34 34
      * @TYPO3\CMS\Extbase\Annotation\Inject
35 35
      */
36
-    protected $documentMapper= null;
36
+    protected $documentMapper= NULL;
37 37
 
38
-    protected function redirectToList($message = null)
38
+    protected function redirectToList($message = NULL)
39 39
     {
40
-        $this->redirect('list', 'DocumentForm', null, array('message' => $message));
40
+        $this->redirect('list', 'DocumentForm', NULL, array('message' => $message));
41 41
     }
42 42
 
43 43
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newDocumentForm")
49 49
      * @return void
50 50
      */
51
-    public function newAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm = null, $returnDocumentId = 0)
51
+    public function newAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm = NULL, $returnDocumentId = 0)
52 52
     {
53 53
         $this->view->assign('documentForm', $newDocumentForm);
54 54
     }
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
             parent::createAction($newDocumentForm);
78 78
             $this->redirect(
79 79
                 'summary',
80
-                null,
81
-                null,
80
+                NULL,
81
+                NULL,
82 82
                 ['document' => $this->newDocument]
83 83
             );
84 84
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 
96 96
             $message[] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, 'dpf');
97 97
 
98
-            $this->addFlashMessage(implode(" ", $message), '', $severity,true);
99
-            $this->forward('new', 'DocumentForm', null, array('newDocumentForm' => $newDocumentForm));
98
+            $this->addFlashMessage(implode(" ", $message), '', $severity,TRUE);
99
+            $this->forward('new', 'DocumentForm', NULL, array('newDocumentForm' => $newDocumentForm));
100 100
         }
101 101
     }
102 102
 
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
             throw new \EWW\Dpf\Exceptions\DocumentMaxSizeErrorException("Maximum document size exceeded.");
146 146
         }
147 147
 
148
-        $updateDocument->setChanged(true);
148
+        $updateDocument->setChanged(TRUE);
149 149
         $this->documentRepository->update($updateDocument);
150 150
 
151 151
         $this->redirect(
152 152
             'summary',
153
-            null,
154
-            null,
153
+            NULL,
154
+            NULL,
155 155
             ['document' => $updateDocument]
156 156
         );
157 157
     }
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
         if (!$this->authorizationChecker->isGranted(DocumentVoter::REGISTER_ANONYMOUSLY, $document)) {
168 168
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_register.accessDenied';
169 169
             $this->flashMessage($document, $key, AbstractMessage::ERROR);
170
-            $this->redirect('summary', 'DocumentForm', null, ['document' => $document]);
171
-            return false;
170
+            $this->redirect('summary', 'DocumentForm', NULL, ['document' => $document]);
171
+            return FALSE;
172 172
         }
173 173
 
174 174
         $workflow = $this->objectManager->get(DocumentWorkflow::class)->getWorkflow();
175 175
         $workflow->apply($document, DocumentWorkflow::TRANSITION_REGISTER);
176 176
 
177
-        $document->setTemporary(false);
177
+        $document->setTemporary(FALSE);
178 178
         $this->documentRepository->update($document);
179 179
 
180 180
         $depositLicenseLog = $this->depositLicenseLogRepository->findOneByProcessNumber($document->getProcessNumber());
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         }
243 243
 
244 244
         $mapper = $this->objectManager->get(DocumentMapper::class);
245
-        $documentForm = $mapper->getDocumentForm($document, false);
245
+        $documentForm = $mapper->getDocumentForm($document, FALSE);
246 246
 
247 247
         $this->view->assign('documentForm', $documentForm);
248 248
         $this->view->assign('document', $document);
Please login to merge, or discard this patch.
Classes/Controller/AbstractController.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
22 22
 
23 23
 
24
-abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
25
-{
24
+abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
26 25
     /**
27 26
      * authorizationChecker
28 27
      *
@@ -71,14 +70,12 @@  discard block
 block discarded – undo
71 70
     protected $logger = null;
72 71
 
73 72
 
74
-    public function __construct()
75
-    {
73
+    public function __construct() {
76 74
         /** @var $logger \TYPO3\CMS\Core\Log\Logger */
77 75
         $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
78 76
     }
79 77
 
80
-    protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
81
-    {
78
+    protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) {
82 79
         parent::initializeView($view);
83 80
 
84 81
         $client = $this->clientRepository->findAll()->current();
@@ -104,8 +101,7 @@  discard block
 block discarded – undo
104 101
      * @param string $key
105 102
      * @param string $data
106 103
      */
107
-    public function setSessionData($key, $data)
108
-    {
104
+    public function setSessionData($key, $data) {
109 105
         if (!empty($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
110 106
 
111 107
             $userGlobals = $GLOBALS['TSFE']->fe_user;
@@ -128,8 +124,7 @@  discard block
 block discarded – undo
128 124
      *
129 125
      * @return
130 126
      */
131
-    public function getSessionData($key)
132
-    {
127
+    public function getSessionData($key) {
133 128
         if (!empty($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
134 129
 
135 130
             $userGlobals = $GLOBALS['TSFE']->fe_user;
@@ -150,8 +145,7 @@  discard block
 block discarded – undo
150 145
      *
151 146
      * @return null|string
152 147
      */
153
-    protected function getParametersSafely($parameterName)
154
-    {
148
+    protected function getParametersSafely($parameterName) {
155 149
         if ($this->request->hasArgument($parameterName)) {
156 150
             return $this->filterSafelyParameters($this->request->getArgument($parameterName));
157 151
         }
@@ -165,8 +159,7 @@  discard block
 block discarded – undo
165 159
      *
166 160
      * @return string
167 161
      */
168
-    protected function filterSafelyParameters($param)
169
-    {
162
+    protected function filterSafelyParameters($param) {
170 163
         if (is_array($param)) {
171 164
             foreach ($param as $key => $item) {
172 165
                 $param[$key] = $this->filterSafelyParameters($item);
@@ -179,8 +172,7 @@  discard block
 block discarded – undo
179 172
         }
180 173
     }
181 174
 
182
-    public function initializeAction()
183
-    {
175
+    public function initializeAction() {
184 176
         parent::initializeAction();
185 177
 
186 178
         $signalSlotDispatcher = GeneralUtility::makeInstance(Dispatcher::class);
@@ -188,13 +180,11 @@  discard block
 block discarded – undo
188 180
     }
189 181
 
190 182
 
191
-    public function getCurrentAction()
192
-    {
183
+    public function getCurrentAction() {
193 184
         return str_replace('Action', '', $this->actionMethodName);
194 185
     }
195 186
 
196
-    public function getCurrentController()
197
-    {
187
+    public function getCurrentController() {
198 188
         $controllerName = end(explode('\\', get_Class($this)));
199 189
         return str_replace('Controller', '', $controllerName);
200 190
     }
@@ -207,8 +197,7 @@  discard block
 block discarded – undo
207 197
      * @param int $severity
208 198
      * @param string $defaultMessage
209 199
      */
210
-    protected function flashMessage(Document $document, string $key, int $severity, $defaultMessage = "")
211
-    {
200
+    protected function flashMessage(Document $document, string $key, int $severity, $defaultMessage = "") {
212 201
         // Show success or failure of the action in a flash message
213 202
         $args = [];
214 203
         if ($document) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @var \EWW\Dpf\Security\AuthorizationChecker
30 30
      * @TYPO3\CMS\Extbase\Annotation\Inject
31 31
      */
32
-    protected $authorizationChecker = null;
32
+    protected $authorizationChecker = NULL;
33 33
 
34 34
     /**
35 35
      * security
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @var \EWW\Dpf\Security\Security
38 38
      * @TYPO3\CMS\Extbase\Annotation\Inject
39 39
      */
40
-    protected $security = null;
40
+    protected $security = NULL;
41 41
 
42 42
     /**
43 43
      * clientRepository
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @var \EWW\Dpf\Domain\Repository\ClientRepository
46 46
      * @TYPO3\CMS\Extbase\Annotation\Inject
47 47
      */
48
-    protected $clientRepository = null;
48
+    protected $clientRepository = NULL;
49 49
 
50 50
     /**
51 51
      * signalSlotDispatcher
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
54 54
      * @TYPO3\CMS\Extbase\Annotation\Inject
55 55
      */
56
-    protected $signalSlotDispatcher = null;
56
+    protected $signalSlotDispatcher = NULL;
57 57
 
58 58
     /**
59 59
      * session
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
      * @var \EWW\Dpf\Session\Session
62 62
      * @TYPO3\CMS\Extbase\Annotation\Inject
63 63
      */
64
-    protected $session = null;
64
+    protected $session = NULL;
65 65
 
66 66
     /**
67 67
      * logger
68 68
      *
69 69
      * @var \TYPO3\CMS\Core\Log\Logger
70 70
      */
71
-    protected $logger = null;
71
+    protected $logger = NULL;
72 72
 
73 73
 
74 74
     public function __construct()
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 $message,
92 92
                 $messageTitle = '',
93 93
                 $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING,
94
-                $storeInSession = true
94
+                $storeInSession = TRUE
95 95
             );
96 96
         } else {
97 97
             $view->assign('client', $client);
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         if ($this->request->hasArgument($parameterName)) {
156 156
             return $this->filterSafelyParameters($this->request->getArgument($parameterName));
157 157
         }
158
-        return null;
158
+        return NULL;
159 159
     }
160 160
 
161 161
     /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             $message,
224 224
             '',
225 225
             $severity,
226
-            true
226
+            TRUE
227 227
         );
228 228
     }
229 229
 
Please login to merge, or discard this patch.