Passed
Pull Request — master (#166)
by
unknown
17:57
created
Classes/Domain/Repository/BookmarkRepository.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,15 +22,13 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * The repository for Bookmarks
24 24
  */
25
-class BookmarkRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
26
-{
25
+class BookmarkRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
27 26
     /**
28 27
      * @param int $feUserUid
29 28
      * @param string $identifier
30 29
      * @return object
31 30
      */
32
-    public function findBookmark($feUserUid, $identifier)
33
-    {
31
+    public function findBookmark($feUserUid, $identifier) {
34 32
         $query = $this->createQuery();
35 33
 
36 34
         $query->matching(
@@ -49,8 +47,7 @@  discard block
 block discarded – undo
49 47
      * @return bool
50 48
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
51 49
      */
52
-    public function removeBookmark($document, $feUserUid)
53
-    {
50
+    public function removeBookmark($document, $feUserUid) {
54 51
         $query = $this->createQuery();
55 52
 
56 53
         if ($document instanceof Document) {
@@ -82,8 +79,7 @@  discard block
 block discarded – undo
82 79
      * @return bool
83 80
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
84 81
      */
85
-    public function addBookmark($feUserUid, Document $document)
86
-    {
82
+    public function addBookmark($feUserUid, Document $document) {
87 83
         $identifier = $document->getDocumentIdentifier();
88 84
 
89 85
         $bookmark = $this->findBookmark($feUserUid, $identifier);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,10 +92,10 @@
 block discarded – undo
92 92
             $bookmark->setDocumentIdentifier($identifier);
93 93
             $bookmark->setFeUserUid($feUserUid);
94 94
             $this->add($bookmark);
95
-            return true;
95
+            return TRUE;
96 96
         }
97 97
 
98
-        return false;
98
+        return FALSE;
99 99
     }
100 100
 
101 101
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentRepository.php 3 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             case Security::ROLE_RESEARCHER:
45 45
                 $query->matching(
46 46
                     $query->logicalAnd(
47
-                        array(
47
+                        array (
48 48
                             $query->equals('suggestion', true),
49 49
                             $query->equals('creator', $creatorUid)
50 50
                         )
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $query = $this->createQuery();
65 65
 
66
-        $constraints = array(
66
+        $constraints = array (
67 67
             $query->logicalNot($query->equals('object_identifier', '')),
68 68
             $query->logicalNot($query->equals('object_identifier', NULL)));
69 69
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $result = $query->execute();
83 83
 
84
-        $objectIdentifiers = array();
84
+        $objectIdentifiers = array ();
85 85
 
86 86
         foreach ($result as $document) {
87 87
             $objectIdentifiers[$document->getObjectIdentifier()] = $document->getObjectIdentifier();
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
         $query = $this->createQuery();
102 102
         $query->getQuerySettings()->setRespectStoragePage(FALSE);
103 103
 
104
-        $constraints = array();
105
-        $constraints[] =  $query->equals('process_number', '');
106
-        $constraints[] =  $query->equals('process_number', NULL);
104
+        $constraints = array ();
105
+        $constraints[] = $query->equals('process_number', '');
106
+        $constraints[] = $query->equals('process_number', NULL);
107 107
 
108 108
         if (count($constraints)) {
109 109
             $query->matching(
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $query = $this->createQuery();
129 129
 
130
-        $dateTimeObj= new \DateTime();
131
-        $dateTimeObj->sub(new \DateInterval("PT".$timeout."S"));
130
+        $dateTimeObj = new \DateTime();
131
+        $dateTimeObj->sub(new \DateInterval("PT" . $timeout . "S"));
132 132
 
133
-        $constraints = array();
133
+        $constraints = array ();
134 134
         $constraints[] = $query->lessThan('tstamp', $dateTimeObj->getTimestamp());
135 135
 
136 136
         $query->matching(
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
     {
154 154
         $query = $this->createQuery();
155 155
 
156
-        $dateTimeObj= new \DateTime();
157
-        $dateTimeObj->sub(new \DateInterval("PT".$timeout."S"));
156
+        $dateTimeObj = new \DateTime();
157
+        $dateTimeObj->sub(new \DateInterval("PT" . $timeout . "S"));
158 158
 
159
-        $constraints = array();
159
+        $constraints = array ();
160 160
         $constraints[] = $query->lessThan('tstamp', $dateTimeObj->getTimestamp());
161 161
 
162 162
         $query->matching(
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $query = $this->createQuery();
180 180
 
181
-        $constraints = array(
181
+        $constraints = array (
182 182
             $query->equals('object_identifier', $objectIdentifier),
183 183
             $query->logicalNot($query->equals('temporary', TRUE)),
184 184
             $query->logicalNot($query->equals('suggestion', TRUE))
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     {
277 277
 
278 278
         $query = $this->createQuery();
279
-        $query->statement( "update tx_dpf_domain_model_document set creator = owner");
279
+        $query->statement("update tx_dpf_domain_model_document set creator = owner");
280 280
         $query->execute();
281 281
 
282 282
     }
Please login to merge, or discard this patch.
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * The repository for Documents
23 23
  */
24
-class DocumentRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
25
-{
24
+class DocumentRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
26 25
     /**
27 26
      * Finds all suggestion documents of the given user role filtered by creator feuser uid
28 27
      *
@@ -59,8 +58,7 @@  discard block
 block discarded – undo
59 58
      * @param boolean $temporary
60 59
      * @return array
61 60
      */
62
-    public function getObjectIdentifiers($temporary = FALSE)
63
-    {
61
+    public function getObjectIdentifiers($temporary = FALSE) {
64 62
         $query = $this->createQuery();
65 63
 
66 64
         $constraints = array(
@@ -96,8 +94,7 @@  discard block
 block discarded – undo
96 94
      *
97 95
      * @return array The found Document Objects
98 96
      */
99
-    public function findDocumentsWithoutProcessNumber()
100
-    {
97
+    public function findDocumentsWithoutProcessNumber() {
101 98
         $query = $this->createQuery();
102 99
         $query->getQuerySettings()->setRespectStoragePage(FALSE);
103 100
 
@@ -123,8 +120,7 @@  discard block
 block discarded – undo
123 120
      * @param integer $timeout : Time interval (in seconds) in which documents are not outdated.
124 121
      * @return array The found Document Objects
125 122
      */
126
-    public function findOutdatedTemporaryDocuments($timeout = 3600)
127
-    {
123
+    public function findOutdatedTemporaryDocuments($timeout = 3600) {
128 124
         $query = $this->createQuery();
129 125
 
130 126
         $dateTimeObj= new \DateTime();
@@ -149,8 +145,7 @@  discard block
 block discarded – undo
149 145
      * @param integer $timeout : Time interval (in seconds) in which documents are not outdated.
150 146
      * @return array The found Document Objects
151 147
      */
152
-    public function findOutdatedLockedDocuments($timeout = 3600)
153
-    {
148
+    public function findOutdatedLockedDocuments($timeout = 3600) {
154 149
         $query = $this->createQuery();
155 150
 
156 151
         $dateTimeObj= new \DateTime();
@@ -174,8 +169,7 @@  discard block
 block discarded – undo
174 169
      * @param string $objectIdentifier
175 170
      * @return array
176 171
      */
177
-    public function findWorkingCopyByObjectIdentifier($objectIdentifier)
178
-    {
172
+    public function findWorkingCopyByObjectIdentifier($objectIdentifier) {
179 173
         $query = $this->createQuery();
180 174
 
181 175
         $constraints = array(
@@ -193,8 +187,7 @@  discard block
 block discarded – undo
193 187
      * @param string $identifier
194 188
      * @return Document
195 189
      */
196
-    public function findByIdentifier($identifier)
197
-    {
190
+    public function findByIdentifier($identifier) {
198 191
         $query = $this->createQuery();
199 192
 
200 193
         if (is_numeric($identifier)) {
@@ -218,8 +211,7 @@  discard block
 block discarded – undo
218 211
      * @param bool $includeSuggestion
219 212
      * @return Document
220 213
      */
221
-    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false)
222
-    {
214
+    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false) {
223 215
         $query = $this->createQuery();
224 216
 
225 217
         if (is_numeric($identifier)) {
@@ -245,8 +237,7 @@  discard block
 block discarded – undo
245 237
      * @param object $modifiedObject The modified object
246 238
      * @throws \Exception
247 239
      */
248
-    public function update($modifiedObject)
249
-    {
240
+    public function update($modifiedObject) {
250 241
         /** @var Document $document */
251 242
         $document = $modifiedObject;
252 243
 
@@ -272,8 +263,7 @@  discard block
 block discarded – undo
272 263
 
273 264
 
274 265
 
275
-    public function updateCreator()
276
-    {
266
+    public function updateCreator() {
277 267
 
278 268
         $query = $this->createQuery();
279 269
         $query->statement( "update tx_dpf_domain_model_document set creator = owner");
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
             case Security::ROLE_LIBRARIAN:
39 39
                 $query->matching(
40
-                    $query->equals('suggestion', true)
40
+                    $query->equals('suggestion', TRUE)
41 41
                 );
42 42
                 break;
43 43
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 $query->matching(
46 46
                     $query->logicalAnd(
47 47
                         array(
48
-                            $query->equals('suggestion', true),
48
+                            $query->equals('suggestion', TRUE),
49 49
                             $query->equals('creator', $creatorUid)
50 50
                         )
51 51
                     )
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      * @param bool $includeSuggestion
219 219
      * @return Document
220 220
      */
221
-    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false)
221
+    public function findWorkingCopy($identifier, $includeTemporary = FALSE, $includeSuggestion = FALSE)
222 222
     {
223 223
         $query = $this->createQuery();
224 224
 
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
         if (trim($document->getObjectIdentifier()) && !$document->isTemporary() && !$document->isSuggestion()) {
254 254
             $query = $this->createQuery();
255 255
             $constraints[] = $query->equals('object_identifier', trim($document->getObjectIdentifier()));
256
-            $constraints[] = $query->equals('temporary', false);
257
-            $constraints[] = $query->equals('suggestion', false);
256
+            $constraints[] = $query->equals('temporary', FALSE);
257
+            $constraints[] = $query->equals('suggestion', FALSE);
258 258
             $query->matching($query->logicalAnd($constraints));
259 259
 
260 260
             /** @var Document $workingCopy */
Please login to merge, or discard this patch.
Classes/Domain/Repository/EditingLockRepository.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
     {
30 30
         $query = $this->createQuery();
31 31
 
32
-        $dateTimeObj= new \DateTime();
33
-        $dateTimeObj->sub(new \DateInterval("PT".$timeout."S"));
32
+        $dateTimeObj = new \DateTime();
33
+        $dateTimeObj->sub(new \DateInterval("PT" . $timeout . "S"));
34 34
 
35 35
         $query->matching(
36 36
             $query->lessThan('tstamp', $dateTimeObj->getTimestamp())
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,16 +17,14 @@
 block discarded – undo
17 17
 /**
18 18
  * The repository for editing lock objects
19 19
  */
20
-class EditingLockRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
21
-{
20
+class EditingLockRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
22 21
     /**
23 22
      * Finds all outdated locks,
24 23
      *
25 24
      * @param integer $timeout : Time interval (in seconds) in which locks are not outdated.
26 25
      * @return array The found Document Objects
27 26
      */
28
-    public function findOutdatedLocks($timeout)
29
-    {
27
+    public function findOutdatedLocks($timeout) {
30 28
         $query = $this->createQuery();
31 29
 
32 30
         $dateTimeObj= new \DateTime();
Please login to merge, or discard this patch.
Classes/Domain/Model/EditingLock.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @package EWW\Dpf\Domain\Model
23 23
  */
24
-class EditingLock extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
25
-{
24
+class EditingLock extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
26 25
     /**
27 26
      * documentIdentifier : A document uid or a qucosa object identifier.
28 27
      *
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      *
43 42
      * @return int
44 43
      */
45
-    public function getDocumentIdentifier()
46
-    {
44
+    public function getDocumentIdentifier() {
47 45
         return $this->documentIdentifier;
48 46
     }
49 47
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @param int $documentIdentifier
54 52
      */
55
-    public function setDocumentIdentifier($documentIdentifier)
56
-    {
53
+    public function setDocumentIdentifier($documentIdentifier) {
57 54
         $this->documentIdentifier = $documentIdentifier;
58 55
     }
59 56
 
@@ -62,8 +59,7 @@  discard block
 block discarded – undo
62 59
      *
63 60
      * @return int
64 61
      */
65
-    public function getEditorUid()
66
-    {
62
+    public function getEditorUid() {
67 63
         return $this->editorUid;
68 64
     }
69 65
 
@@ -72,8 +68,7 @@  discard block
 block discarded – undo
72 68
      *
73 69
      * @param int $editorUid
74 70
      */
75
-    public function setEditorUid($editorUid)
76
-    {
71
+    public function setEditorUid($editorUid) {
77 72
         $this->editorUid = $editorUid;
78 73
     }
79 74
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Bookmark.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @package EWW\Dpf\Domain\Model
22 22
  */
23
-class Bookmark extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
24
-{
23
+class Bookmark extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
25 24
     /**
26 25
      * documentIdentifier : A document uid or a qucosa object identifier.
27 26
      *
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
      *
42 41
      * @return int
43 42
      */
44
-    public function getDocumentIdentifier()
45
-    {
43
+    public function getDocumentIdentifier() {
46 44
         return $this->documentIdentifier;
47 45
     }
48 46
 
@@ -51,8 +49,7 @@  discard block
 block discarded – undo
51 49
      *
52 50
      * @param int $documentIdentifier
53 51
      */
54
-    public function setDocumentIdentifier($documentIdentifier)
55
-    {
52
+    public function setDocumentIdentifier($documentIdentifier) {
56 53
         $this->documentIdentifier = $documentIdentifier;
57 54
     }
58 55
 
@@ -61,8 +58,7 @@  discard block
 block discarded – undo
61 58
      *
62 59
      * @return int
63 60
      */
64
-    public function getFeUserUid()
65
-    {
61
+    public function getFeUserUid() {
66 62
         return $this->feUserUid;
67 63
     }
68 64
 
@@ -71,8 +67,7 @@  discard block
 block discarded – undo
71 67
      *
72 68
      * @param int $feUserUid
73 69
      */
74
-    public function setFeUserUid($feUserUid)
75
-    {
70
+    public function setFeUserUid($feUserUid) {
76 71
         $this->feUserUid = $feUserUid;
77 72
     }
78 73
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     public function setObjectIdentifier($objectIdentifier)
318 318
     {
319 319
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
320
-        $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
320
+        $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier;
321 321
     }
322 322
 
323 323
     /**
@@ -499,14 +499,14 @@  discard block
 block discarded – undo
499 499
 
500 500
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
501 501
 
502
-        $files = array();
502
+        $files = array ();
503 503
 
504 504
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
505 505
             foreach ($this->getFile() as $file) {
506 506
 
507 507
                 if (!$file->isFileGroupDeleted()) {
508 508
 
509
-                    $tmpFile = array(
509
+                    $tmpFile = array (
510 510
                         'path' => $file->getLink(),
511 511
                         'type' => $file->getContentType(),
512 512
                         'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -550,12 +550,12 @@  discard block
 block discarded – undo
550 550
 
551 551
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
552 552
 
553
-        $files = array();
553
+        $files = array ();
554 554
 
555 555
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
556 556
             foreach ($this->getFile() as $file) {
557 557
 
558
-                $tmpFile = array(
558
+                $tmpFile = array (
559 559
                     'path' => $file->getLink(),
560 560
                     'type' => $file->getContentType(),
561 561
                     'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
      */
709 709
     public function getCreator()
710 710
     {
711
-        return $this->creator? $this->creator : 0;
711
+        return $this->creator ? $this->creator : 0;
712 712
     }
713 713
 
714 714
     /**
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
 
855 855
         foreach ($availableProperties as $propertyName) {
856 856
             if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName)
857
-                && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
857
+                && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
858 858
 
859 859
                 $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName);
860 860
                 \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue);
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
      */
877 877
     public function getDocumentIdentifier()
878 878
     {
879
-        return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
879
+        return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid();
880 880
     }
881 881
 
882 882
     /**
@@ -909,8 +909,8 @@  discard block
 block discarded – undo
909 909
     public function getPublicationYear()
910 910
     {
911 911
         $mods = new Mods($this->getXmlData());
912
-        $year =  $mods->getPublishingYear();
913
-        return $year? $year : "";
912
+        $year = $mods->getPublishingYear();
913
+        return $year ? $year : "";
914 914
     }
915 915
 
916 916
     /**
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
     {
923 923
         $mods = new Mods($this->getXmlData());
924 924
         $title = $mods->getTitle();
925
-        return $title? $title : "";
925
+        return $title ? $title : "";
926 926
     }
927 927
 
928 928
 
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
     {
936 936
         if (array_key_exists($this->getState(), DocumentWorkflow::STATE_TO_SIMPLESTATE_MAPPING)) {
937 937
             return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
938
-                "manager.documentList.state.".DocumentWorkflow::STATE_TO_SIMPLESTATE_MAPPING[$this->getState()],
938
+                "manager.documentList.state." . DocumentWorkflow::STATE_TO_SIMPLESTATE_MAPPING[$this->getState()],
939 939
                 'dpf',
940 940
                 $arguments = null
941 941
             );
Please login to merge, or discard this patch.
Braces   +60 added lines, -120 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
 /**
21 21
  * Document
22 22
  */
23
-class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
24
-{
23
+class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
25 24
     /**
26 25
      * title
27 26
      *
@@ -176,8 +175,7 @@  discard block
 block discarded – undo
176 175
     /**
177 176
      * __construct
178 177
      */
179
-    public function __construct()
180
-    {
178
+    public function __construct() {
181 179
         //Do not remove the next line: It would break the functionality
182 180
         $this->initStorageObjects();
183 181
     }
@@ -187,8 +185,7 @@  discard block
 block discarded – undo
187 185
      *
188 186
      * @return void
189 187
      */
190
-    protected function initStorageObjects()
191
-    {
188
+    protected function initStorageObjects() {
192 189
         $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
193 190
     }
194 191
 
@@ -197,8 +194,7 @@  discard block
 block discarded – undo
197 194
      *
198 195
      * @return string $title
199 196
      */
200
-    public function getTitle()
201
-    {
197
+    public function getTitle() {
202 198
         return $this->title;
203 199
     }
204 200
 
@@ -208,8 +204,7 @@  discard block
 block discarded – undo
208 204
      * @param string $title
209 205
      * @return void
210 206
      */
211
-    public function setTitle($title)
212
-    {
207
+    public function setTitle($title) {
213 208
         $this->title = $title;
214 209
         //htmlspecialchars_decode($title,ENT_QUOTES);
215 210
     }
@@ -219,8 +214,7 @@  discard block
 block discarded – undo
219 214
      *
220 215
      * @return array $authors
221 216
      */
222
-    public function getAuthors()
223
-    {
217
+    public function getAuthors() {
224 218
         return array_map('trim', explode(";", $this->authors));
225 219
     }
226 220
 
@@ -230,8 +224,7 @@  discard block
 block discarded – undo
230 224
      * @param array $authors
231 225
      * @return void
232 226
      */
233
-    public function setAuthors($authors)
234
-    {
227
+    public function setAuthors($authors) {
235 228
         $authors = implode("; ", $authors);
236 229
         $this->authors = $authors;
237 230
     }
@@ -241,8 +234,7 @@  discard block
 block discarded – undo
241 234
      *
242 235
      * @return string $xmlData
243 236
      */
244
-    public function getXmlData()
245
-    {
237
+    public function getXmlData() {
246 238
         return $this->xmlData;
247 239
     }
248 240
 
@@ -252,8 +244,7 @@  discard block
 block discarded – undo
252 244
      * @param string $xmlData
253 245
      * @return void
254 246
      */
255
-    public function setXmlData($xmlData)
256
-    {
247
+    public function setXmlData($xmlData) {
257 248
         $this->xmlData = $xmlData;
258 249
     }
259 250
 
@@ -262,8 +253,7 @@  discard block
 block discarded – undo
262 253
      *
263 254
      * @return string $slubInfoData
264 255
      */
265
-    public function getSlubInfoData()
266
-    {
256
+    public function getSlubInfoData() {
267 257
         return $this->slubInfoData;
268 258
     }
269 259
 
@@ -272,8 +262,7 @@  discard block
 block discarded – undo
272 262
      *
273 263
      * @return string $slubInfoData
274 264
      */
275
-    public function setSlubInfoData($slubInfoData)
276
-    {
265
+    public function setSlubInfoData($slubInfoData) {
277 266
         $this->slubInfoData = $slubInfoData;
278 267
     }
279 268
 
@@ -282,8 +271,7 @@  discard block
 block discarded – undo
282 271
      *
283 272
      * @return \EWW\Dpf\Domain\Model\DocumentType $documentType
284 273
      */
285
-    public function getDocumentType()
286
-    {
274
+    public function getDocumentType() {
287 275
         return $this->documentType;
288 276
     }
289 277
 
@@ -293,8 +281,7 @@  discard block
 block discarded – undo
293 281
      * @param \EWW\Dpf\Domain\Model\DocumentType $documentType
294 282
      * @return void
295 283
      */
296
-    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType)
297
-    {
284
+    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) {
298 285
         $this->documentType = $documentType;
299 286
     }
300 287
 
@@ -303,8 +290,7 @@  discard block
 block discarded – undo
303 290
      *
304 291
      * @return string
305 292
      */
306
-    public function getObjectIdentifier()
307
-    {
293
+    public function getObjectIdentifier() {
308 294
         return $this->objectIdentifier;
309 295
     }
310 296
 
@@ -314,8 +300,7 @@  discard block
 block discarded – undo
314 300
      * @param string $objectIdentifier
315 301
      * @return void
316 302
      */
317
-    public function setObjectIdentifier($objectIdentifier)
318
-    {
303
+    public function setObjectIdentifier($objectIdentifier) {
319 304
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
320 305
         $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
321 306
     }
@@ -325,8 +310,7 @@  discard block
 block discarded – undo
325 310
      *
326 311
      * @return string
327 312
      */
328
-    public function getReservedObjectIdentifier()
329
-    {
313
+    public function getReservedObjectIdentifier() {
330 314
         return $this->reservedObjectIdentifier;
331 315
     }
332 316
 
@@ -336,8 +320,7 @@  discard block
 block discarded – undo
336 320
      * @param string $reservedObjectIdentifier
337 321
      * @return void
338 322
      */
339
-    public function setReservedObjectIdentifier($reservedObjectIdentifier)
340
-    {
323
+    public function setReservedObjectIdentifier($reservedObjectIdentifier) {
341 324
         $this->reservedObjectIdentifier = $reservedObjectIdentifier;
342 325
     }
343 326
 
@@ -346,8 +329,7 @@  discard block
 block discarded – undo
346 329
      *
347 330
      * @return string
348 331
      */
349
-    public function getTransferStatus()
350
-    {
332
+    public function getTransferStatus() {
351 333
         return $this->transferStatus;
352 334
     }
353 335
 
@@ -357,8 +339,7 @@  discard block
 block discarded – undo
357 339
      * @param string
358 340
      * @return void
359 341
      */
360
-    public function setTransferStatus($transferStatus)
361
-    {
342
+    public function setTransferStatus($transferStatus) {
362 343
         $this->transferStatus = $transferStatus;
363 344
     }
364 345
 
@@ -367,8 +348,7 @@  discard block
 block discarded – undo
367 348
      *
368 349
      * @return integer
369 350
      */
370
-    public function getTransferDate()
371
-    {
351
+    public function getTransferDate() {
372 352
         return $this->transferDate;
373 353
     }
374 354
 
@@ -378,8 +358,7 @@  discard block
 block discarded – undo
378 358
      * @param integer $transferDate
379 359
      * @return void
380 360
      */
381
-    public function setTransferDate($transferDate)
382
-    {
361
+    public function setTransferDate($transferDate) {
383 362
         $this->transferDate = $transferDate;
384 363
     }
385 364
 
@@ -388,8 +367,7 @@  discard block
 block discarded – undo
388 367
      *
389 368
      * @var integer
390 369
      */
391
-    public function getTransferErrorCode()
392
-    {
370
+    public function getTransferErrorCode() {
393 371
         return $this->transferErrorCode;
394 372
     }
395 373
 
@@ -399,8 +377,7 @@  discard block
 block discarded – undo
399 377
      * @param integer $transferErrorCode
400 378
      * @return void
401 379
      */
402
-    public function setTransferErrorCode($transferErrorCode)
403
-    {
380
+    public function setTransferErrorCode($transferErrorCode) {
404 381
         $this->transferErrorCode = $transferErrorCode;
405 382
     }
406 383
 
@@ -409,8 +386,7 @@  discard block
 block discarded – undo
409 386
      *
410 387
      * @var string
411 388
      */
412
-    public function getTransferResponse()
413
-    {
389
+    public function getTransferResponse() {
414 390
         return $this->transferResponse;
415 391
     }
416 392
 
@@ -420,8 +396,7 @@  discard block
 block discarded – undo
420 396
      * @param string $transferResponse
421 397
      * @return void
422 398
      */
423
-    public function setTransferResponse($transferResponse)
424
-    {
399
+    public function setTransferResponse($transferResponse) {
425 400
         $this->transferResponse = $transferResponse;
426 401
     }
427 402
 
@@ -430,8 +405,7 @@  discard block
 block discarded – undo
430 405
      *
431 406
      * @var integer
432 407
      */
433
-    public function getTransferHttpStatus()
434
-    {
408
+    public function getTransferHttpStatus() {
435 409
         return $this->transferHttpStatus;
436 410
     }
437 411
 
@@ -441,8 +415,7 @@  discard block
 block discarded – undo
441 415
      * @param integer $transferHttpStatus
442 416
      * @return void
443 417
      */
444
-    public function setTransferHttpStatus($transferHttpStatus)
445
-    {
418
+    public function setTransferHttpStatus($transferHttpStatus) {
446 419
         $this->transferHttpStatus = $transferHttpStatus;
447 420
     }
448 421
 
@@ -452,8 +425,7 @@  discard block
 block discarded – undo
452 425
      * @param \EWW\Dpf\Domain\Model\File $file
453 426
      * @return void
454 427
      */
455
-    public function addFile(\EWW\Dpf\Domain\Model\File $file)
456
-    {
428
+    public function addFile(\EWW\Dpf\Domain\Model\File $file) {
457 429
         $this->file->attach($file);
458 430
     }
459 431
 
@@ -463,8 +435,7 @@  discard block
 block discarded – undo
463 435
      * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed
464 436
      * @return void
465 437
      */
466
-    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove)
467
-    {
438
+    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) {
468 439
         $this->file->detach($fileToRemove);
469 440
     }
470 441
 
@@ -473,8 +444,7 @@  discard block
 block discarded – undo
473 444
      *
474 445
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
475 446
      */
476
-    public function getFile()
477
-    {
447
+    public function getFile() {
478 448
         return $this->file;
479 449
     }
480 450
 
@@ -484,8 +454,7 @@  discard block
 block discarded – undo
484 454
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
485 455
      * @return void
486 456
      */
487
-    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file)
488
-    {
457
+    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) {
489 458
         $this->file = $file;
490 459
     }
491 460
 
@@ -494,8 +463,7 @@  discard block
 block discarded – undo
494 463
      *
495 464
      * @return array
496 465
      */
497
-    public function getFileData()
498
-    {
466
+    public function getFileData() {
499 467
 
500 468
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
501 469
 
@@ -545,8 +513,7 @@  discard block
 block discarded – undo
545 513
      *
546 514
      * @return array
547 515
      */
548
-    public function getCurrentFileData()
549
-    {
516
+    public function getCurrentFileData() {
550 517
 
551 518
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
552 519
 
@@ -594,8 +561,7 @@  discard block
 block discarded – undo
594 561
      *
595 562
      * @return boolean $changed
596 563
      */
597
-    public function getChanged()
598
-    {
564
+    public function getChanged() {
599 565
         return $this->changed;
600 566
     }
601 567
 
@@ -605,8 +571,7 @@  discard block
 block discarded – undo
605 571
      * @param boolean $changed
606 572
      * @return void
607 573
      */
608
-    public function setChanged($changed)
609
-    {
574
+    public function setChanged($changed) {
610 575
         $this->changed = $changed;
611 576
     }
612 577
 
@@ -615,8 +580,7 @@  discard block
 block discarded – undo
615 580
      *
616 581
      * @return boolean $valid
617 582
      */
618
-    public function getValid()
619
-    {
583
+    public function getValid() {
620 584
         return $this->valid;
621 585
     }
622 586
 
@@ -626,8 +590,7 @@  discard block
 block discarded – undo
626 590
      * @param boolean $valid
627 591
      * @return void
628 592
      */
629
-    public function setValid($valid)
630
-    {
593
+    public function setValid($valid) {
631 594
         $this->valid = $valid;
632 595
     }
633 596
 
@@ -636,8 +599,7 @@  discard block
 block discarded – undo
636 599
      *
637 600
      * @return string
638 601
      */
639
-    public function getDateIssued()
640
-    {
602
+    public function getDateIssued() {
641 603
         return empty($this->dateIssued) ? '' : $this->dateIssued;
642 604
     }
643 605
 
@@ -647,8 +609,7 @@  discard block
 block discarded – undo
647 609
      * @param string $dateIssued
648 610
      * @return void
649 611
      */
650
-    public function setDateIssued($dateIssued)
651
-    {
612
+    public function setDateIssued($dateIssued) {
652 613
         $this->dateIssued = empty($dateIssued) ? '' : $dateIssued;
653 614
     }
654 615
 
@@ -658,8 +619,7 @@  discard block
 block discarded – undo
658 619
      *
659 620
      * @return string
660 621
      */
661
-    public function getProcessNumber()
662
-    {
622
+    public function getProcessNumber() {
663 623
         return $this->processNumber;
664 624
     }
665 625
 
@@ -669,8 +629,7 @@  discard block
 block discarded – undo
669 629
      * @param string $processNumber
670 630
      * @return void
671 631
      */
672
-    public function setProcessNumber($processNumber)
673
-    {
632
+    public function setProcessNumber($processNumber) {
674 633
         $this->processNumber = trim($processNumber);
675 634
     }
676 635
 
@@ -680,8 +639,7 @@  discard block
 block discarded – undo
680 639
      *
681 640
      * @return string
682 641
      */
683
-    public function getSubmitterName()
684
-    {
642
+    public function getSubmitterName() {
685 643
         try {
686 644
             $slub = new \EWW\Dpf\Helper\Slub($this->getSlubInfoData());
687 645
             return $slub->getSubmitterName();
@@ -695,8 +653,7 @@  discard block
 block discarded – undo
695 653
      *
696 654
      * @return string
697 655
      */
698
-    public function getQucosaUrn()
699
-    {
656
+    public function getQucosaUrn() {
700 657
         $mods = new \EWW\Dpf\Helper\Mods($this->getXmlData());
701 658
         return $mods->getQucosaUrn();
702 659
     }
@@ -706,8 +663,7 @@  discard block
 block discarded – undo
706 663
      *
707 664
      * @return int
708 665
      */
709
-    public function getCreator()
710
-    {
666
+    public function getCreator() {
711 667
         return $this->creator? $this->creator : 0;
712 668
     }
713 669
 
@@ -717,23 +673,19 @@  discard block
 block discarded – undo
717 673
      * @param int $creator
718 674
      * @return void
719 675
      */
720
-    public function setCreator($creator)
721
-    {
676
+    public function setCreator($creator) {
722 677
         $this->creator = $creator;
723 678
     }
724 679
 
725
-    public function getState()
726
-    {
680
+    public function getState() {
727 681
         return $this->state;
728 682
     }
729 683
 
730
-    public function setState($state)
731
-    {
684
+    public function setState($state) {
732 685
         $this->state = $state;
733 686
     }
734 687
 
735
-    public function getRemoteState()
736
-    {
688
+    public function getRemoteState() {
737 689
         $state = explode(':', $this->state);
738 690
         if (is_array($state) && array_key_exists(1, $state)) {
739 691
             return $state[1];
@@ -771,8 +723,7 @@  discard block
 block discarded – undo
771 723
     /**
772 724
      * @return string
773 725
      */
774
-    public function getRemoteLastModDate()
775
-    {
726
+    public function getRemoteLastModDate() {
776 727
         return $this->remoteLastModDate;
777 728
     }
778 729
 
@@ -780,16 +731,14 @@  discard block
 block discarded – undo
780 731
      * @param string $remoteLastModDate
781 732
      * @return void
782 733
      */
783
-    public function setRemoteLastModDate($remoteLastModDate)
784
-    {
734
+    public function setRemoteLastModDate($remoteLastModDate) {
785 735
         $this->remoteLastModDate = $remoteLastModDate;
786 736
     }
787 737
 
788 738
     /**
789 739
      * @return integer
790 740
      */
791
-    public function getTstamp()
792
-    {
741
+    public function getTstamp() {
793 742
         return $this->tstamp;
794 743
     }
795 744
 
@@ -804,8 +753,7 @@  discard block
 block discarded – undo
804 753
     /**
805 754
      * @param bool $suggestion
806 755
      */
807
-    public function setSuggestion(bool $suggestion)
808
-    {
756
+    public function setSuggestion(bool $suggestion) {
809 757
         $this->suggestion = $suggestion;
810 758
     }
811 759
 
@@ -820,8 +768,7 @@  discard block
 block discarded – undo
820 768
     /**
821 769
      * @param string $linkedUid
822 770
      */
823
-    public function setLinkedUid(string $linkedUid)
824
-    {
771
+    public function setLinkedUid(string $linkedUid) {
825 772
         $this->linkedUid = $linkedUid;
826 773
     }
827 774
 
@@ -836,8 +783,7 @@  discard block
 block discarded – undo
836 783
     /**
837 784
      * @param string $comment
838 785
      */
839
-    public function setComment(string $comment)
840
-    {
786
+    public function setComment(string $comment) {
841 787
         $this->comment = $comment;
842 788
     }
843 789
 
@@ -874,8 +820,7 @@  discard block
 block discarded – undo
874 820
      *
875 821
      * @return string|int
876 822
      */
877
-    public function getDocumentIdentifier()
878
-    {
823
+    public function getDocumentIdentifier() {
879 824
         return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
880 825
     }
881 826
 
@@ -884,8 +829,7 @@  discard block
 block discarded – undo
884 829
      *
885 830
      * @return bool
886 831
      */
887
-    public function isWorkingCopy()
888
-    {
832
+    public function isWorkingCopy() {
889 833
         return $this->getObjectIdentifier() && !$this->isTemporary() && !$this->isSuggestion();
890 834
     }
891 835
 
@@ -895,8 +839,7 @@  discard block
 block discarded – undo
895 839
      *
896 840
      * @return bool
897 841
      */
898
-    public function isTemporaryCopy()
899
-    {
842
+    public function isTemporaryCopy() {
900 843
         return $this->getObjectIdentifier() && $this->isTemporary() && !$this->isSuggestion();
901 844
     }
902 845
 
@@ -906,8 +849,7 @@  discard block
 block discarded – undo
906 849
      *
907 850
      * @return string|null
908 851
      */
909
-    public function getPublicationYear()
910
-    {
852
+    public function getPublicationYear() {
911 853
         $mods = new Mods($this->getXmlData());
912 854
         $year =  $mods->getPublishingYear();
913 855
         return $year? $year : "";
@@ -918,8 +860,7 @@  discard block
 block discarded – undo
918 860
      *
919 861
      * @return string|null
920 862
      */
921
-    public function getMainTitle()
922
-    {
863
+    public function getMainTitle() {
923 864
         $mods = new Mods($this->getXmlData());
924 865
         $title = $mods->getTitle();
925 866
         return $title? $title : "";
@@ -931,8 +872,7 @@  discard block
 block discarded – undo
931 872
      *
932 873
      * @return NULL|string
933 874
      */
934
-    public function getStateName_()
935
-    {
875
+    public function getStateName_() {
936 876
         if (array_key_exists($this->getState(), DocumentWorkflow::STATE_TO_SIMPLESTATE_MAPPING)) {
937 877
             return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
938 878
                 "manager.documentList.state.".DocumentWorkflow::STATE_TO_SIMPLESTATE_MAPPING[$this->getState()],
Please login to merge, or discard this patch.
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @var \EWW\Dpf\Domain\Model\DocumentType
57 57
      */
58
-    protected $documentType = null;
58
+    protected $documentType = NULL;
59 59
 
60 60
     /**
61 61
      * objectIdentifier
62 62
      *
63 63
      * @var string
64 64
      */
65
-    protected $objectIdentifier = null;
65
+    protected $objectIdentifier = NULL;
66 66
 
67 67
     /**
68 68
      * reservedObjectIdentifier
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @var boolean
92 92
      */
93
-    protected $changed = false;
93
+    protected $changed = FALSE;
94 94
 
95 95
     /**
96 96
      * valid
97 97
      *
98 98
      * @var boolean
99 99
      */
100
-    protected $valid = false;
100
+    protected $valid = FALSE;
101 101
 
102 102
     /**
103 103
      *
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     /**
115 115
      * @var bool $suggestion
116 116
      */
117
-    protected $suggestion = false;
117
+    protected $suggestion = FALSE;
118 118
 
119 119
     /**
120 120
      * creator
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File>
168 168
      * @cascade remove
169 169
      */
170
-    protected $file = null;
170
+    protected $file = NULL;
171 171
 
172 172
     const TRANSFER_ERROR = "ERROR";
173 173
     const TRANSFER_QUEUED = "QUEUED";
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     public function setObjectIdentifier($objectIdentifier)
318 318
     {
319 319
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
320
-        $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
320
+        $this->objectIdentifier = empty($objectIdentifier)? NULL : $objectIdentifier;
321 321
     }
322 322
 
323 323
     /**
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                         'download' => $file->getDownload(),
514 514
                         'archive' => $file->getArchive(),
515 515
                         'use' => '',
516
-                        'id' => null,
516
+                        'id' => NULL,
517 517
                         'hasFLocat' => ($file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_ADDED ||
518 518
                             $file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_CHANGED),
519 519
                     );
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
                     'download' => $file->getDownload(),
563 563
                     'archive' => $file->getArchive(),
564 564
                     'use' => '',
565
-                    'id' => null,
565
+                    'id' => NULL,
566 566
                     'hasFLocat' => ($file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_ADDED ||
567 567
                         $file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_CHANGED),
568 568
                 );
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
             return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
938 938
                 "manager.documentList.state.".DocumentWorkflow::STATE_TO_SIMPLESTATE_MAPPING[$this->getState()],
939 939
                 'dpf',
940
-                $arguments = null
940
+                $arguments = NULL
941 941
             );
942 942
         }
943 943
     }
Please login to merge, or discard this patch.
Classes/Domain/Workflow/DocumentWorkflow.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,30 +34,30 @@
 block discarded – undo
34 34
     const REMOTE_STATE_INACTIVE     = "INACTIVE";
35 35
     const REMOTE_STATE_DELETED      = "DELETED";
36 36
 
37
-    const STATE_NONE_NONE            = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_NONE;
37
+    const STATE_NONE_NONE            = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_NONE;
38 38
 
39 39
     // New
40
-    const STATE_NEW_NONE             = self::LOCAL_STATE_NEW.':'.self::REMOTE_STATE_NONE;
40
+    const STATE_NEW_NONE             = self::LOCAL_STATE_NEW . ':' . self::REMOTE_STATE_NONE;
41 41
 
42 42
     // Registered
43
-    const STATE_REGISTERED_NONE      = self::LOCAL_STATE_REGISTERED.':'.self::REMOTE_STATE_NONE;
43
+    const STATE_REGISTERED_NONE      = self::LOCAL_STATE_REGISTERED . ':' . self::REMOTE_STATE_NONE;
44 44
 
45 45
     // In progress
46
-    const STATE_IN_PROGRESS_NONE     = self::LOCAL_STATE_IN_PROGRESS.':'.self::REMOTE_STATE_NONE;
47
-    const STATE_IN_PROGRESS_ACTIVE   = self::LOCAL_STATE_IN_PROGRESS.":".self::REMOTE_STATE_ACTIVE;
48
-    const STATE_IN_PROGRESS_INACTIVE = self::LOCAL_STATE_IN_PROGRESS.":".self::REMOTE_STATE_INACTIVE;
49
-    const STATE_IN_PROGRESS_DELETED  = self::LOCAL_STATE_IN_PROGRESS.":".self::REMOTE_STATE_DELETED;
46
+    const STATE_IN_PROGRESS_NONE     = self::LOCAL_STATE_IN_PROGRESS . ':' . self::REMOTE_STATE_NONE;
47
+    const STATE_IN_PROGRESS_ACTIVE   = self::LOCAL_STATE_IN_PROGRESS . ":" . self::REMOTE_STATE_ACTIVE;
48
+    const STATE_IN_PROGRESS_INACTIVE = self::LOCAL_STATE_IN_PROGRESS . ":" . self::REMOTE_STATE_INACTIVE;
49
+    const STATE_IN_PROGRESS_DELETED  = self::LOCAL_STATE_IN_PROGRESS . ":" . self::REMOTE_STATE_DELETED;
50 50
 
51 51
     // Active
52
-    const STATE_NONE_ACTIVE          = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_ACTIVE;
52
+    const STATE_NONE_ACTIVE          = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_ACTIVE;
53 53
 
54 54
     // Postponed
55
-    const STATE_POSTPONED_NONE       = self::LOCAL_STATE_POSTPONED.':'.self::REMOTE_STATE_NONE;
56
-    const STATE_NONE_INACTIVE        = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_INACTIVE;
55
+    const STATE_POSTPONED_NONE       = self::LOCAL_STATE_POSTPONED . ':' . self::REMOTE_STATE_NONE;
56
+    const STATE_NONE_INACTIVE        = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_INACTIVE;
57 57
 
58 58
     // Discarded
59
-    const STATE_DISCARDED_NONE       = self::LOCAL_STATE_DISCARDED.':'.self::REMOTE_STATE_NONE;
60
-    const STATE_NONE_DELETED         = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_DELETED;
59
+    const STATE_DISCARDED_NONE       = self::LOCAL_STATE_DISCARDED . ':' . self::REMOTE_STATE_NONE;
60
+    const STATE_NONE_DELETED         = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_DELETED;
61 61
 
62 62
     const TRANSITION_CREATE              = "CREATE_TRANSITION";
63 63
     const TRANSITION_CREATE_REGISTER     = "CREATE_REGISTER_TRANSITION";
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
 use Symfony\Component\Workflow\Workflow;
21 21
 use Symfony\Component\Workflow\Registry;
22 22
 
23
-class DocumentWorkflow
24
-{
23
+class DocumentWorkflow {
25 24
     const LOCAL_STATE_NONE          = 'NONE';
26 25
     const LOCAL_STATE_NEW           = 'NEW';
27 26
     const LOCAL_STATE_REGISTERED    = 'REGISTERED';
@@ -264,8 +263,7 @@  discard block
 block discarded – undo
264 263
         ]
265 264
     ];
266 265
     
267
-    public static function getWorkflow()
268
-    {
266
+    public static function getWorkflow() {
269 267
         $definitionBuilder = new DefinitionBuilder();
270 268
 
271 269
         $definitionBuilder->addPlaces(self::PLACES);
Please login to merge, or discard this patch.
Classes/Services/Document/DocumentCleaner.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class DocumentCleaner
18
-{
17
+class DocumentCleaner {
19 18
 
20 19
     /**
21 20
      * clientRepository
@@ -55,8 +54,7 @@  discard block
 block discarded – undo
55 54
      * @param \EWW\Dpf\Domain\Model\Document $openedDocument
56 55
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
57 56
      */
58
-    public function cleanUpDocuments($actionMethodName, $controllerClass)
59
-    {
57
+    public function cleanUpDocuments($actionMethodName, $controllerClass) {
60 58
         $excludeActions = [
61 59
             \EWW\Dpf\Controller\DocumentController::class => [
62 60
                 'showDetailsAction',
@@ -103,8 +101,7 @@  discard block
 block discarded – undo
103 101
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
104 102
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException
105 103
      */
106
-    protected function cleanUpOutdatedTemporaryDocuments()
107
-    {
104
+    protected function cleanUpOutdatedTemporaryDocuments() {
108 105
         // Remove outdated temporary documents from the document table.
109 106
         $outdatedTemporaryDocuments = $this->documentRepository->findOutdatedTemporaryDocuments(3600);
110 107
         foreach ($outdatedTemporaryDocuments as $outdatedTemporaryDocument) {
@@ -117,8 +114,7 @@  discard block
 block discarded – undo
117 114
     /**
118 115
      * Unlocks all editing locks of the current user.
119 116
      */
120
-    protected function cleanUpEditingLocks($controllerClass, $actionMethodName)
121
-    {
117
+    protected function cleanUpEditingLocks($controllerClass, $actionMethodName) {
122 118
         $excludeActions = [
123 119
             \EWW\Dpf\Controller\DocumentController::class => [
124 120
             ],
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
24 24
      * @inject
25 25
      */
26
-    protected $documentRepository = null;
26
+    protected $documentRepository = NULL;
27 27
 
28 28
     /**
29 29
      * editingLockService
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @var \EWW\Dpf\Services\Document\EditingLockService
32 32
      * @inject
33 33
      */
34
-    protected $editingLockService = null;
34
+    protected $editingLockService = NULL;
35 35
 
36 36
     /**
37 37
      * persistence manager
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @var \EWW\Dpf\Security\Security
48 48
      * @inject
49 49
      */
50
-    protected $security = null;
50
+    protected $security = NULL;
51 51
 
52 52
     /**
53 53
      * @param string $actionMethodName
Please login to merge, or discard this patch.
Classes/Services/Document/EditingLockService.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 
124 124
     public function getLockedDocumentIdentifiersByUserUid($userUid)
125 125
     {
126
-        $identifiers = array();
126
+        $identifiers = array ();
127 127
 
128 128
         $locks = $this->editingLockRepository->findByEditorUid($userUid);
129 129
         /** @var  \EWW\Dpf\Domain\Model\EditingLock $lock */
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 use EWW\Dpf\Domain\Model\EditingLock;
18 18
 
19
-class EditingLockService
20
-{
19
+class EditingLockService {
21 20
     /**
22 21
      * editingLockRepository
23 22
      *
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
      * @param int $userUid
42 41
      * @return bool
43 42
      */
44
-    public function lock($documentIdentifier, $userUid)
45
-    {
43
+    public function lock($documentIdentifier, $userUid) {
46 44
         if ($this->editingLockRepository->findOneByDocumentIdentifier($documentIdentifier)) {
47 45
             return FALSE;
48 46
         }
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
      * @param string $documentIdentifier
64 62
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
65 63
      */
66
-    public function unlock($documentIdentifier)
67
-    {
64
+    public function unlock($documentIdentifier) {
68 65
         /** @var \EWW\Dpf\Domain\Model\EditingLock $editingLock */
69 66
         $editingLock = $this->editingLockRepository->findOneByDocumentIdentifyer($documentIdentifier);
70 67
         $this->editingLockRepository->remove($editingLock);
@@ -78,8 +75,7 @@  discard block
 block discarded – undo
78 75
      * @param int $userUid
79 76
      * @return bool
80 77
      */
81
-    public function isLocked($documentIdentifier, $userUid)
82
-    {
78
+    public function isLocked($documentIdentifier, $userUid) {
83 79
         $locks = $this->editingLockRepository->findByDocumentIdentifier($documentIdentifier);
84 80
 
85 81
         /** @var  \EWW\Dpf\Domain\Model\EditingLock $lock */
@@ -96,8 +92,7 @@  discard block
 block discarded – undo
96 92
      *
97 93
      * @param int $timeout : Time interval (in seconds) in which locks are not outdated, default is 1 hour.
98 94
      */
99
-    public function unlockOutdatedLocks($timeout = 3600)
100
-    {
95
+    public function unlockOutdatedLocks($timeout = 3600) {
101 96
         // Unlock outdated editing locks.
102 97
         $outdatedLocks = $this->editingLockRepository->findOutdatedLocks($timeout);
103 98
         foreach ($outdatedLocks as $outdatedLock) {
@@ -111,8 +106,7 @@  discard block
 block discarded – undo
111 106
      *
112 107
      * @param int $editorUid
113 108
      */
114
-    public function unlockAllByEditor($editorUid)
115
-    {
109
+    public function unlockAllByEditor($editorUid) {
116 110
         $locks = $this->editingLockRepository->findByEditorUid($editorUid);
117 111
         foreach ($locks as $lock) {
118 112
             $this->editingLockRepository->remove($lock);
@@ -121,8 +115,7 @@  discard block
 block discarded – undo
121 115
         $this->persistenceManager->persistAll();
122 116
     }
123 117
 
124
-    public function getLockedDocumentIdentifiersByUserUid($userUid)
125
-    {
118
+    public function getLockedDocumentIdentifiersByUserUid($userUid) {
126 119
         $identifiers = array();
127 120
 
128 121
         $locks = $this->editingLockRepository->findByEditorUid($userUid);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      * @var \EWW\Dpf\Domain\Repository\EditingLockRepository
25 25
      * @inject
26 26
      */
27
-    protected $editingLockRepository = null;
27
+    protected $editingLockRepository = NULL;
28 28
 
29 29
     /**
30 30
      * persistence manager
Please login to merge, or discard this patch.