Passed
Pull Request — master (#99)
by Ralf
03:46
created
Classes/Domain/Repository/DocumentRepository.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         $result = $query->execute();
32 32
 
33
-        $objectIdentifiers = array();
33
+        $objectIdentifiers = array ();
34 34
 
35 35
         foreach ($result as $document) {
36 36
             $objectIdentifiers[$document->getObjectIdentifier()] = $document->getObjectIdentifier();
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $query = $this->createQuery();
51 51
 
52
-        $constraints = array(
52
+        $constraints = array (
53 53
                 $query->equals('object_identifier', ''),
54 54
                 $query->equals('changed', false));
55 55
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         // order by start_date -> start_time...
61 61
         $query->setOrderings(
62
-            array('transfer_date' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
62
+            array ('transfer_date' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
63 63
         );
64 64
 
65 65
         return $query->execute();
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         $query = $this->createQuery();
77 77
         
78
-        $constraints = array(
78
+        $constraints = array (
79 79
                 $query->like('object_identifier', 'qucosa%'),
80 80
                 $query->equals('changed', true));
81 81
 
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
         $query = $this->createQuery();
99 99
         $query->getQuerySettings()->setRespectStoragePage(FALSE);
100 100
 
101
-        $constraints = array();
102
-        $constraints[] =  $query->equals('process_number', '');
103
-        $constraints[] =  $query->equals('process_number', NULL);
101
+        $constraints = array ();
102
+        $constraints[] = $query->equals('process_number', '');
103
+        $constraints[] = $query->equals('process_number', NULL);
104 104
 
105 105
         if (count($constraints)) {
106 106
             $query->matching($query->logicalOr($constraints));
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         $constraints = array(
53 53
                 $query->equals('object_identifier', ''),
54
-                $query->equals('changed', false));
54
+                $query->equals('changed', FALSE));
55 55
 
56 56
         if (count($constraints)) {
57 57
             $query->matching($query->logicalAnd($constraints));
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         
78 78
         $constraints = array(
79 79
                 $query->like('object_identifier', 'qucosa%'),
80
-                $query->equals('changed', true));
80
+                $query->equals('changed', TRUE));
81 81
 
82 82
         if (count($constraints)) {
83 83
             $query->matching($query->logicalOr($constraints));
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 1 patch
Braces   +53 added lines, -106 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * Document
19 19
  */
20
-class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
21
-{
20
+class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
22 21
 
23 22
     /**
24 23
      * title
@@ -137,8 +136,7 @@  discard block
 block discarded – undo
137 136
     /**
138 137
      * __construct
139 138
      */
140
-    public function __construct()
141
-    {
139
+    public function __construct() {
142 140
         //Do not remove the next line: It would break the functionality
143 141
         $this->initStorageObjects();
144 142
     }
@@ -151,8 +149,7 @@  discard block
 block discarded – undo
151 149
      *
152 150
      * @return void
153 151
      */
154
-    protected function initStorageObjects()
155
-    {
152
+    protected function initStorageObjects() {
156 153
         $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
157 154
     }
158 155
 
@@ -161,8 +158,7 @@  discard block
 block discarded – undo
161 158
      *
162 159
      * @return string $title
163 160
      */
164
-    public function getTitle()
165
-    {
161
+    public function getTitle() {
166 162
         return $this->title;
167 163
     }
168 164
 
@@ -172,8 +168,7 @@  discard block
 block discarded – undo
172 168
      * @param string $title
173 169
      * @return void
174 170
      */
175
-    public function setTitle($title)
176
-    {
171
+    public function setTitle($title) {
177 172
         $this->title = $title;
178 173
         //htmlspecialchars_decode($title,ENT_QUOTES);
179 174
     }
@@ -183,8 +178,7 @@  discard block
 block discarded – undo
183 178
      *
184 179
      * @return array $authors
185 180
      */
186
-    public function getAuthors()
187
-    {
181
+    public function getAuthors() {
188 182
         return array_map('trim', explode(";", $this->authors));
189 183
     }
190 184
 
@@ -194,8 +188,7 @@  discard block
 block discarded – undo
194 188
      * @param array $authors
195 189
      * @return void
196 190
      */
197
-    public function setAuthors($authors)
198
-    {
191
+    public function setAuthors($authors) {
199 192
         $authors       = implode("; ", $authors);
200 193
         $this->authors = $authors;
201 194
         //htmlspecialchars_decode($authors,ENT_QUOTES);
@@ -206,8 +199,7 @@  discard block
 block discarded – undo
206 199
      *
207 200
      * @return string $xmlData
208 201
      */
209
-    public function getXmlData()
210
-    {
202
+    public function getXmlData() {
211 203
         return $this->xmlData;
212 204
     }
213 205
 
@@ -217,8 +209,7 @@  discard block
 block discarded – undo
217 209
      * @param string $xmlData
218 210
      * @return void
219 211
      */
220
-    public function setXmlData($xmlData)
221
-    {
212
+    public function setXmlData($xmlData) {
222 213
         $this->xmlData = $xmlData;
223 214
     }
224 215
 
@@ -227,8 +218,7 @@  discard block
 block discarded – undo
227 218
      *
228 219
      * @return string $slubInfoData
229 220
      */
230
-    public function getSlubInfoData()
231
-    {
221
+    public function getSlubInfoData() {
232 222
         return $this->slubInfoData;
233 223
     }
234 224
 
@@ -237,8 +227,7 @@  discard block
 block discarded – undo
237 227
      *
238 228
      * @return string $slubInfoData
239 229
      */
240
-    public function setSlubInfoData($slubInfoData)
241
-    {
230
+    public function setSlubInfoData($slubInfoData) {
242 231
         $this->slubInfoData = $slubInfoData;
243 232
     }
244 233
 
@@ -247,8 +236,7 @@  discard block
 block discarded – undo
247 236
      *
248 237
      * @return \EWW\Dpf\Domain\Model\DocumentType $documentType
249 238
      */
250
-    public function getDocumentType()
251
-    {
239
+    public function getDocumentType() {
252 240
         return $this->documentType;
253 241
     }
254 242
 
@@ -258,8 +246,7 @@  discard block
 block discarded – undo
258 246
      * @param \EWW\Dpf\Domain\Model\DocumentType $documentType
259 247
      * @return void
260 248
      */
261
-    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType)
262
-    {
249
+    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) {
263 250
         $this->documentType = $documentType;
264 251
     }
265 252
 
@@ -268,8 +255,7 @@  discard block
 block discarded – undo
268 255
      *
269 256
      * @return string
270 257
      */
271
-    public function getObjectIdentifier()
272
-    {
258
+    public function getObjectIdentifier() {
273 259
         return $this->objectIdentifier;
274 260
     }
275 261
 
@@ -279,8 +265,7 @@  discard block
 block discarded – undo
279 265
      * @param string $objectIdentifier
280 266
      * @return void
281 267
      */
282
-    public function setObjectIdentifier($objectIdentifier)
283
-    {
268
+    public function setObjectIdentifier($objectIdentifier) {
284 269
         $this->objectIdentifier = $objectIdentifier;
285 270
     }
286 271
 
@@ -289,8 +274,7 @@  discard block
 block discarded – undo
289 274
      *
290 275
      * @return string
291 276
      */
292
-    public function getReservedObjectIdentifier()
293
-    {
277
+    public function getReservedObjectIdentifier() {
294 278
         return $this->reservedObjectIdentifier;
295 279
     }
296 280
 
@@ -300,8 +284,7 @@  discard block
 block discarded – undo
300 284
      * @param string $reservedObjectIdentifier
301 285
      * @return void
302 286
      */
303
-    public function setReservedObjectIdentifier($reservedObjectIdentifier)
304
-    {
287
+    public function setReservedObjectIdentifier($reservedObjectIdentifier) {
305 288
         $this->reservedObjectIdentifier = $reservedObjectIdentifier;
306 289
     }
307 290
 
@@ -310,8 +293,7 @@  discard block
 block discarded – undo
310 293
      *
311 294
      * @return string
312 295
      */
313
-    public function getState()
314
-    {
296
+    public function getState() {
315 297
         return $this->state;
316 298
     }
317 299
 
@@ -321,8 +303,7 @@  discard block
 block discarded – undo
321 303
      * @param string $state
322 304
      * @return void
323 305
      */
324
-    public function setState($state)
325
-    {
306
+    public function setState($state) {
326 307
         $this->state = $state;
327 308
     }
328 309
 
@@ -331,8 +312,7 @@  discard block
 block discarded – undo
331 312
      *
332 313
      * @return string
333 314
      */
334
-    public function getTransferStatus()
335
-    {
315
+    public function getTransferStatus() {
336 316
         return $this->transferStatus;
337 317
     }
338 318
 
@@ -342,8 +322,7 @@  discard block
 block discarded – undo
342 322
      * @param string
343 323
      * @return void
344 324
      */
345
-    public function setTransferStatus($transferStatus)
346
-    {
325
+    public function setTransferStatus($transferStatus) {
347 326
         $this->transferStatus = $transferStatus;
348 327
     }
349 328
 
@@ -352,8 +331,7 @@  discard block
 block discarded – undo
352 331
      *
353 332
      * @return integer
354 333
      */
355
-    public function getTransferDate()
356
-    {
334
+    public function getTransferDate() {
357 335
         return $this->transferDate;
358 336
     }
359 337
 
@@ -363,8 +341,7 @@  discard block
 block discarded – undo
363 341
      * @param integer $transferDate
364 342
      * @return void
365 343
      */
366
-    public function setTransferDate($transferDate)
367
-    {
344
+    public function setTransferDate($transferDate) {
368 345
         $this->transferDate = $transferDate;
369 346
     }
370 347
 
@@ -373,8 +350,7 @@  discard block
 block discarded – undo
373 350
      *
374 351
      * @var integer
375 352
      */
376
-    public function getTransferErrorCode()
377
-    {
353
+    public function getTransferErrorCode() {
378 354
         return $this->transferErrorCode;
379 355
     }
380 356
 
@@ -384,8 +360,7 @@  discard block
 block discarded – undo
384 360
      * @param integer $transferErrorCode
385 361
      * @return void
386 362
      */
387
-    public function setTransferErrorCode($transferErrorCode)
388
-    {
363
+    public function setTransferErrorCode($transferErrorCode) {
389 364
         $this->transferErrorCode = $transferErrorCode;
390 365
     }
391 366
 
@@ -394,8 +369,7 @@  discard block
 block discarded – undo
394 369
      *
395 370
      * @var string
396 371
      */
397
-    public function getTransferResponse()
398
-    {
372
+    public function getTransferResponse() {
399 373
         return $this->transferResponse;
400 374
     }
401 375
 
@@ -405,8 +379,7 @@  discard block
 block discarded – undo
405 379
      * @param string $transferResponse
406 380
      * @return void
407 381
      */
408
-    public function setTransferResponse($transferResponse)
409
-    {
382
+    public function setTransferResponse($transferResponse) {
410 383
         $this->transferResponse = $transferResponse;
411 384
     }
412 385
 
@@ -415,8 +388,7 @@  discard block
 block discarded – undo
415 388
      *
416 389
      * @var integer
417 390
      */
418
-    public function getTransferHttpStatus()
419
-    {
391
+    public function getTransferHttpStatus() {
420 392
         return $this->transferHttpStatus;
421 393
     }
422 394
 
@@ -426,8 +398,7 @@  discard block
 block discarded – undo
426 398
      * @param integer $transferHttpStatus
427 399
      * @return void
428 400
      */
429
-    public function setTransferHttpStatus($transferHttpStatus)
430
-    {
401
+    public function setTransferHttpStatus($transferHttpStatus) {
431 402
         $this->transferHttpStatus = $transferHttpStatus;
432 403
     }
433 404
 
@@ -437,8 +408,7 @@  discard block
 block discarded – undo
437 408
      * @param \EWW\Dpf\Domain\Model\File $file
438 409
      * @return void
439 410
      */
440
-    public function addFile(\EWW\Dpf\Domain\Model\File $file)
441
-    {
411
+    public function addFile(\EWW\Dpf\Domain\Model\File $file) {
442 412
         $this->file->attach($file);
443 413
     }
444 414
 
@@ -448,8 +418,7 @@  discard block
 block discarded – undo
448 418
      * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed
449 419
      * @return void
450 420
      */
451
-    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove)
452
-    {
421
+    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) {
453 422
         $this->file->detach($fileToRemove);
454 423
     }
455 424
 
@@ -458,8 +427,7 @@  discard block
 block discarded – undo
458 427
      *
459 428
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
460 429
      */
461
-    public function getFile()
462
-    {
430
+    public function getFile() {
463 431
         return $this->file;
464 432
     }
465 433
 
@@ -469,8 +437,7 @@  discard block
 block discarded – undo
469 437
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
470 438
      * @return void
471 439
      */
472
-    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file)
473
-    {
440
+    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) {
474 441
         $this->file = $file;
475 442
     }
476 443
 
@@ -479,8 +446,7 @@  discard block
 block discarded – undo
479 446
      *
480 447
      * @return array
481 448
      */
482
-    public function getFileData()
483
-    {
449
+    public function getFileData() {
484 450
 
485 451
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
486 452
 
@@ -528,8 +494,7 @@  discard block
 block discarded – undo
528 494
      *
529 495
      * @return array
530 496
      */
531
-    public function getCurrentFileData()
532
-    {
497
+    public function getCurrentFileData() {
533 498
 
534 499
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
535 500
 
@@ -577,8 +542,7 @@  discard block
 block discarded – undo
577 542
      *
578 543
      * @return boolean $changed
579 544
      */
580
-    public function getChanged()
581
-    {
545
+    public function getChanged() {
582 546
         return $this->changed;
583 547
     }
584 548
 
@@ -588,8 +552,7 @@  discard block
 block discarded – undo
588 552
      * @param boolean $changed
589 553
      * @return void
590 554
      */
591
-    public function setChanged($changed)
592
-    {
555
+    public function setChanged($changed) {
593 556
         $this->changed = $changed;
594 557
     }
595 558
 
@@ -598,8 +561,7 @@  discard block
 block discarded – undo
598 561
      *
599 562
      * @return boolean $valid
600 563
      */
601
-    public function getValid()
602
-    {
564
+    public function getValid() {
603 565
         return $this->valid;
604 566
     }
605 567
 
@@ -609,8 +571,7 @@  discard block
 block discarded – undo
609 571
      * @param boolean $valid
610 572
      * @return void
611 573
      */
612
-    public function setValid($valid)
613
-    {
574
+    public function setValid($valid) {
614 575
         $this->valid = $valid;
615 576
     }
616 577
 
@@ -619,8 +580,7 @@  discard block
 block discarded – undo
619 580
      *
620 581
      * @return string
621 582
      */
622
-    public function getDateIssued()
623
-    {
583
+    public function getDateIssued() {
624 584
         if (empty($this->dateIssued)) {
625 585
             return '';
626 586
         }
@@ -633,8 +593,7 @@  discard block
 block discarded – undo
633 593
      * @param string $dateIssued
634 594
      * @return void
635 595
      */
636
-    public function setDateIssued($dateIssued)
637
-    {
596
+    public function setDateIssued($dateIssued) {
638 597
         $this->dateIssued = $dateIssued;
639 598
     }
640 599
 
@@ -643,8 +602,7 @@  discard block
 block discarded – undo
643 602
      *
644 603
      * @return boolean
645 604
      */
646
-    public function isDeleteAllowed()
647
-    {
605
+    public function isDeleteAllowed() {
648 606
         return ($this->state == self::OBJECT_STATE_INACTIVE ||
649 607
             $this->state == self::OBJECT_STATE_ACTIVE) &&
650 608
         !empty($this->objectIdentifier);
@@ -655,8 +613,7 @@  discard block
 block discarded – undo
655 613
      *
656 614
      * @return boolean
657 615
      */
658
-    public function isActive()
659
-    {
616
+    public function isActive() {
660 617
         return $this->state == self::OBJECT_STATE_ACTIVE ||
661 618
         $this->state == self::OBJECT_STATE_NEW ||
662 619
             ($this->state != self::OBJECT_STATE_INACTIVE &&
@@ -669,8 +626,7 @@  discard block
 block discarded – undo
669 626
      *
670 627
      * @return boolean
671 628
      */
672
-    public function isActivationChangeAllowed()
673
-    {
629
+    public function isActivationChangeAllowed() {
674 630
         return $this->state == self::OBJECT_STATE_INACTIVE ||
675 631
         $this->state == self::OBJECT_STATE_ACTIVE;
676 632
     }
@@ -680,8 +636,7 @@  discard block
 block discarded – undo
680 636
      *
681 637
      * @return boolean
682 638
      */
683
-    public function isDeleteRemote()
684
-    {
639
+    public function isDeleteRemote() {
685 640
         return $this->state == self::OBJECT_STATE_LOCALLY_DELETED;
686 641
     }
687 642
 
@@ -690,8 +645,7 @@  discard block
 block discarded – undo
690 645
      *
691 646
      * @return boolean
692 647
      */
693
-    public function isRestoreRemote()
694
-    {
648
+    public function isRestoreRemote() {
695 649
         return $this->state == self::OBJECT_STATE_DELETED;
696 650
     }
697 651
 
@@ -700,8 +654,7 @@  discard block
 block discarded – undo
700 654
      *
701 655
      * @return boolean
702 656
      */
703
-    public function isActivateRemote()
704
-    {
657
+    public function isActivateRemote() {
705 658
         return $this->state == self::OBJECT_STATE_INACTIVE;
706 659
     }
707 660
 
@@ -710,8 +663,7 @@  discard block
 block discarded – undo
710 663
      *
711 664
      * @return boolean
712 665
      */
713
-    public function isInactivateRemote()
714
-    {
666
+    public function isInactivateRemote() {
715 667
         return $this->state == self::OBJECT_STATE_ACTIVE;
716 668
     }
717 669
 
@@ -720,8 +672,7 @@  discard block
 block discarded – undo
720 672
      *
721 673
      * @return boolean
722 674
      */
723
-    public function isIngestRemote()
724
-    {
675
+    public function isIngestRemote() {
725 676
         return ($this->state == self::OBJECT_STATE_NEW || $this->state == self::OBJECT_STATE_ACTIVE) && empty($this->objectIdentifier);
726 677
     }
727 678
 
@@ -730,8 +681,7 @@  discard block
 block discarded – undo
730 681
      *
731 682
      * @return boolean
732 683
      */
733
-    public function isUpdateRemote()
734
-    {
684
+    public function isUpdateRemote() {
735 685
         return ($this->state == self::OBJECT_STATE_ACTIVE || $this->state == self::OBJECT_STATE_INACTIVE) && !empty($this->objectIdentifier);
736 686
     }
737 687
 
@@ -740,8 +690,7 @@  discard block
 block discarded – undo
740 690
      *
741 691
      * @return boolean
742 692
      */
743
-    public function getIsNew()
744
-    {
693
+    public function getIsNew() {
745 694
         return (!$this->changed) && (empty($this->objectIdentifier));
746 695
     }
747 696
 
@@ -751,8 +700,7 @@  discard block
 block discarded – undo
751 700
      *
752 701
      * @return string
753 702
      */
754
-    public function getProcessNumber()
755
-    {
703
+    public function getProcessNumber() {
756 704
         return $this->processNumber;
757 705
     }
758 706
 
@@ -762,8 +710,7 @@  discard block
 block discarded – undo
762 710
      * @param string $processNumber
763 711
      * @return void
764 712
      */
765
-    public function setProcessNumber($processNumber)
766
-    {
713
+    public function setProcessNumber($processNumber) {
767 714
         $this->processNumber = trim($processNumber);
768 715
     }
769 716
 }
Please login to merge, or discard this patch.