Passed
Pull Request — master (#209)
by
unknown
10:39
created
Classes/Domain/Repository/FrontendUserRepository.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,15 +4,13 @@
 block discarded – undo
4 4
 use EWW\Dpf\Domain\Model\Document;
5 5
 use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
6 6
 
7
-class FrontendUserRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository
8
-{
7
+class FrontendUserRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository {
9 8
     /**
10 9
      * @param $feUserUid
11 10
      * @param $clientPid
12 11
      * @return bool
13 12
      */
14
-    public function isUserInClient($feUserUid, $clientPid)
15
-    {
13
+    public function isUserInClient($feUserUid, $clientPid) {
16 14
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
17 15
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
18 16
         $querySettings->setRespectStoragePage(false);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
17 17
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
18
-        $querySettings->setRespectStoragePage(false);
18
+        $querySettings->setRespectStoragePage(FALSE);
19 19
         $this->setDefaultQuerySettings($querySettings);
20 20
         $query = $this->createQuery();
21 21
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     public function setObjectIdentifier($objectIdentifier)
360 360
     {
361 361
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
362
-        $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
362
+        $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier;
363 363
     }
364 364
 
365 365
     /**
@@ -541,14 +541,14 @@  discard block
 block discarded – undo
541 541
 
542 542
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
543 543
 
544
-        $files = array();
544
+        $files = array ();
545 545
 
546 546
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
547 547
             foreach ($this->getFile() as $file) {
548 548
 
549 549
                 if (!$file->isFileGroupDeleted()) {
550 550
 
551
-                    $tmpFile = array(
551
+                    $tmpFile = array (
552 552
                         'path' => $file->getUrl(),
553 553
                         'type' => $file->getContentType(),
554 554
                         'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -592,12 +592,12 @@  discard block
 block discarded – undo
592 592
 
593 593
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
594 594
 
595
-        $files = array();
595
+        $files = array ();
596 596
 
597 597
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
598 598
             foreach ($this->getFile() as $file) {
599 599
 
600
-                $tmpFile = array(
600
+                $tmpFile = array (
601 601
                     'path' => $file->getUrl(),
602 602
                     'type' => $file->getContentType(),
603 603
                     'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
      */
750 750
     public function getCreator()
751 751
     {
752
-        return $this->creator? $this->creator : 0;
752
+        return $this->creator ? $this->creator : 0;
753 753
     }
754 754
 
755 755
     /**
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 
905 905
         foreach ($availableProperties as $propertyName) {
906 906
             if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName)
907
-                && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
907
+                && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
908 908
 
909 909
                 $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName);
910 910
                 \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue);
@@ -926,7 +926,7 @@  discard block
 block discarded – undo
926 926
      */
927 927
     public function getDocumentIdentifier()
928 928
     {
929
-        return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
929
+        return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid();
930 930
     }
931 931
 
932 932
     /**
@@ -959,8 +959,8 @@  discard block
 block discarded – undo
959 959
     public function getPublicationYear()
960 960
     {
961 961
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
962
-        $year =  $internalFormat->getPublishingYear();
963
-        return $year? $year : "";
962
+        $year = $internalFormat->getPublishingYear();
963
+        return $year ? $year : "";
964 964
     }
965 965
 
966 966
     /**
Please login to merge, or discard this patch.
Braces   +64 added lines, -128 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * Document
23 23
  */
24
-class Document extends AbstractEntity
25
-{
24
+class Document extends AbstractEntity {
26 25
     // xml data size ist limited to 64 KB
27 26
     const XML_DATA_SIZE_LIMIT = 64 * 1024;
28 27
 
@@ -213,8 +212,7 @@  discard block
 block discarded – undo
213 212
     /**
214 213
      * __construct
215 214
      */
216
-    public function __construct()
217
-    {
215
+    public function __construct() {
218 216
         //Do not remove the next line: It would break the functionality
219 217
         $this->initStorageObjects();
220 218
     }
@@ -224,8 +222,7 @@  discard block
 block discarded – undo
224 222
      *
225 223
      * @return void
226 224
      */
227
-    protected function initStorageObjects()
228
-    {
225
+    protected function initStorageObjects() {
229 226
         $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
230 227
         $this->initCreationDate();
231 228
     }
@@ -235,8 +232,7 @@  discard block
 block discarded – undo
235 232
      *
236 233
      * @return string $title
237 234
      */
238
-    public function getTitle()
239
-    {
235
+    public function getTitle() {
240 236
         return $this->title;
241 237
     }
242 238
 
@@ -246,8 +242,7 @@  discard block
 block discarded – undo
246 242
      * @param string $title
247 243
      * @return void
248 244
      */
249
-    public function setTitle($title)
250
-    {
245
+    public function setTitle($title) {
251 246
         $this->title = $title ?? '';
252 247
         //htmlspecialchars_decode($title,ENT_QUOTES);
253 248
     }
@@ -257,8 +252,7 @@  discard block
 block discarded – undo
257 252
      *
258 253
      * @return array $authors
259 254
      */
260
-    public function getAuthors()
261
-    {
255
+    public function getAuthors() {
262 256
         $authors = @unserialize($this->authors);
263 257
         if (is_array($authors)) {
264 258
             return $authors;
@@ -273,8 +267,7 @@  discard block
 block discarded – undo
273 267
      * @param array $authors
274 268
      * @return void
275 269
      */
276
-    public function setAuthors($authors)
277
-    {
270
+    public function setAuthors($authors) {
278 271
         $this->authors = serialize($authors);
279 272
     }
280 273
 
@@ -283,8 +276,7 @@  discard block
 block discarded – undo
283 276
      *
284 277
      * @return string $xmlData
285 278
      */
286
-    public function getXmlData()
287
-    {
279
+    public function getXmlData() {
288 280
         return $this->xmlData;
289 281
     }
290 282
 
@@ -294,8 +286,7 @@  discard block
 block discarded – undo
294 286
      * @param string $xmlData
295 287
      * @return void
296 288
      */
297
-    public function setXmlData($xmlData)
298
-    {
289
+    public function setXmlData($xmlData) {
299 290
         $this->xmlData = $xmlData;
300 291
     }
301 292
 
@@ -304,8 +295,7 @@  discard block
 block discarded – undo
304 295
      *
305 296
      * @return string $slubInfoData
306 297
      */
307
-    public function getSlubInfoData()
308
-    {
298
+    public function getSlubInfoData() {
309 299
         return $this->slubInfoData;
310 300
     }
311 301
 
@@ -314,8 +304,7 @@  discard block
 block discarded – undo
314 304
      *
315 305
      * @return string $slubInfoData
316 306
      */
317
-    public function setSlubInfoData($slubInfoData)
318
-    {
307
+    public function setSlubInfoData($slubInfoData) {
319 308
         $this->slubInfoData = $slubInfoData;
320 309
     }
321 310
 
@@ -324,8 +313,7 @@  discard block
 block discarded – undo
324 313
      *
325 314
      * @return \EWW\Dpf\Domain\Model\DocumentType $documentType
326 315
      */
327
-    public function getDocumentType()
328
-    {
316
+    public function getDocumentType() {
329 317
         return $this->documentType;
330 318
     }
331 319
 
@@ -335,8 +323,7 @@  discard block
 block discarded – undo
335 323
      * @param \EWW\Dpf\Domain\Model\DocumentType $documentType
336 324
      * @return void
337 325
      */
338
-    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType)
339
-    {
326
+    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) {
340 327
         $this->documentType = $documentType;
341 328
     }
342 329
 
@@ -345,8 +332,7 @@  discard block
 block discarded – undo
345 332
      *
346 333
      * @return string
347 334
      */
348
-    public function getObjectIdentifier()
349
-    {
335
+    public function getObjectIdentifier() {
350 336
         return $this->objectIdentifier;
351 337
     }
352 338
 
@@ -356,8 +342,7 @@  discard block
 block discarded – undo
356 342
      * @param string $objectIdentifier
357 343
      * @return void
358 344
      */
359
-    public function setObjectIdentifier($objectIdentifier)
360
-    {
345
+    public function setObjectIdentifier($objectIdentifier) {
361 346
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
362 347
         $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
363 348
     }
@@ -367,8 +352,7 @@  discard block
 block discarded – undo
367 352
      *
368 353
      * @return string
369 354
      */
370
-    public function getReservedObjectIdentifier()
371
-    {
355
+    public function getReservedObjectIdentifier() {
372 356
         return $this->reservedObjectIdentifier;
373 357
     }
374 358
 
@@ -378,8 +362,7 @@  discard block
 block discarded – undo
378 362
      * @param string $reservedObjectIdentifier
379 363
      * @return void
380 364
      */
381
-    public function setReservedObjectIdentifier($reservedObjectIdentifier)
382
-    {
365
+    public function setReservedObjectIdentifier($reservedObjectIdentifier) {
383 366
         $this->reservedObjectIdentifier = $reservedObjectIdentifier;
384 367
     }
385 368
 
@@ -388,8 +371,7 @@  discard block
 block discarded – undo
388 371
      *
389 372
      * @return string
390 373
      */
391
-    public function getTransferStatus()
392
-    {
374
+    public function getTransferStatus() {
393 375
         return $this->transferStatus;
394 376
     }
395 377
 
@@ -399,8 +381,7 @@  discard block
 block discarded – undo
399 381
      * @param string
400 382
      * @return void
401 383
      */
402
-    public function setTransferStatus($transferStatus)
403
-    {
384
+    public function setTransferStatus($transferStatus) {
404 385
         $this->transferStatus = $transferStatus;
405 386
     }
406 387
 
@@ -409,8 +390,7 @@  discard block
 block discarded – undo
409 390
      *
410 391
      * @return integer
411 392
      */
412
-    public function getTransferDate()
413
-    {
393
+    public function getTransferDate() {
414 394
         return $this->transferDate;
415 395
     }
416 396
 
@@ -420,8 +400,7 @@  discard block
 block discarded – undo
420 400
      * @param integer $transferDate
421 401
      * @return void
422 402
      */
423
-    public function setTransferDate($transferDate)
424
-    {
403
+    public function setTransferDate($transferDate) {
425 404
         $this->transferDate = $transferDate;
426 405
     }
427 406
 
@@ -430,8 +409,7 @@  discard block
 block discarded – undo
430 409
      *
431 410
      * @var integer
432 411
      */
433
-    public function getTransferErrorCode()
434
-    {
412
+    public function getTransferErrorCode() {
435 413
         return $this->transferErrorCode;
436 414
     }
437 415
 
@@ -441,8 +419,7 @@  discard block
 block discarded – undo
441 419
      * @param integer $transferErrorCode
442 420
      * @return void
443 421
      */
444
-    public function setTransferErrorCode($transferErrorCode)
445
-    {
422
+    public function setTransferErrorCode($transferErrorCode) {
446 423
         $this->transferErrorCode = $transferErrorCode;
447 424
     }
448 425
 
@@ -451,8 +428,7 @@  discard block
 block discarded – undo
451 428
      *
452 429
      * @var string
453 430
      */
454
-    public function getTransferResponse()
455
-    {
431
+    public function getTransferResponse() {
456 432
         return $this->transferResponse;
457 433
     }
458 434
 
@@ -462,8 +438,7 @@  discard block
 block discarded – undo
462 438
      * @param string $transferResponse
463 439
      * @return void
464 440
      */
465
-    public function setTransferResponse($transferResponse)
466
-    {
441
+    public function setTransferResponse($transferResponse) {
467 442
         $this->transferResponse = $transferResponse;
468 443
     }
469 444
 
@@ -472,8 +447,7 @@  discard block
 block discarded – undo
472 447
      *
473 448
      * @var integer
474 449
      */
475
-    public function getTransferHttpStatus()
476
-    {
450
+    public function getTransferHttpStatus() {
477 451
         return $this->transferHttpStatus;
478 452
     }
479 453
 
@@ -483,8 +457,7 @@  discard block
 block discarded – undo
483 457
      * @param integer $transferHttpStatus
484 458
      * @return void
485 459
      */
486
-    public function setTransferHttpStatus($transferHttpStatus)
487
-    {
460
+    public function setTransferHttpStatus($transferHttpStatus) {
488 461
         $this->transferHttpStatus = $transferHttpStatus;
489 462
     }
490 463
 
@@ -494,8 +467,7 @@  discard block
 block discarded – undo
494 467
      * @param \EWW\Dpf\Domain\Model\File $file
495 468
      * @return void
496 469
      */
497
-    public function addFile(\EWW\Dpf\Domain\Model\File $file)
498
-    {
470
+    public function addFile(\EWW\Dpf\Domain\Model\File $file) {
499 471
         $this->file->attach($file);
500 472
     }
501 473
 
@@ -505,8 +477,7 @@  discard block
 block discarded – undo
505 477
      * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed
506 478
      * @return void
507 479
      */
508
-    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove)
509
-    {
480
+    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) {
510 481
         $this->file->detach($fileToRemove);
511 482
     }
512 483
 
@@ -515,8 +486,7 @@  discard block
 block discarded – undo
515 486
      *
516 487
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
517 488
      */
518
-    public function getFile()
519
-    {
489
+    public function getFile() {
520 490
         return $this->file;
521 491
     }
522 492
 
@@ -526,8 +496,7 @@  discard block
 block discarded – undo
526 496
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
527 497
      * @return void
528 498
      */
529
-    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file)
530
-    {
499
+    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) {
531 500
         $this->file = $file;
532 501
     }
533 502
 
@@ -536,8 +505,7 @@  discard block
 block discarded – undo
536 505
      *
537 506
      * @return array
538 507
      */
539
-    public function getFileData()
540
-    {
508
+    public function getFileData() {
541 509
 
542 510
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
543 511
 
@@ -587,8 +555,7 @@  discard block
 block discarded – undo
587 555
      *
588 556
      * @return array
589 557
      */
590
-    public function getCurrentFileData()
591
-    {
558
+    public function getCurrentFileData() {
592 559
 
593 560
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
594 561
 
@@ -636,8 +603,7 @@  discard block
 block discarded – undo
636 603
      *
637 604
      * @return boolean $changed
638 605
      */
639
-    public function getChanged()
640
-    {
606
+    public function getChanged() {
641 607
         return $this->changed;
642 608
     }
643 609
 
@@ -647,8 +613,7 @@  discard block
 block discarded – undo
647 613
      * @param boolean $changed
648 614
      * @return void
649 615
      */
650
-    public function setChanged($changed)
651
-    {
616
+    public function setChanged($changed) {
652 617
         $this->changed = boolval($changed);
653 618
     }
654 619
 
@@ -657,8 +622,7 @@  discard block
 block discarded – undo
657 622
      *
658 623
      * @return boolean $valid
659 624
      */
660
-    public function getValid()
661
-    {
625
+    public function getValid() {
662 626
         return $this->valid;
663 627
     }
664 628
 
@@ -668,8 +632,7 @@  discard block
 block discarded – undo
668 632
      * @param boolean $valid
669 633
      * @return void
670 634
      */
671
-    public function setValid($valid)
672
-    {
635
+    public function setValid($valid) {
673 636
         $this->valid = boolval($valid);
674 637
     }
675 638
 
@@ -678,8 +641,7 @@  discard block
 block discarded – undo
678 641
      *
679 642
      * @return string
680 643
      */
681
-    public function getDateIssued()
682
-    {
644
+    public function getDateIssued() {
683 645
         return empty($this->dateIssued) ? '' : $this->dateIssued;
684 646
     }
685 647
 
@@ -689,8 +651,7 @@  discard block
 block discarded – undo
689 651
      * @param string $dateIssued
690 652
      * @return void
691 653
      */
692
-    public function setDateIssued($dateIssued)
693
-    {
654
+    public function setDateIssued($dateIssued) {
694 655
         $this->dateIssued = empty($dateIssued) ? '' : $dateIssued;
695 656
     }
696 657
 
@@ -700,8 +661,7 @@  discard block
 block discarded – undo
700 661
      *
701 662
      * @return string
702 663
      */
703
-    public function getProcessNumber()
704
-    {
664
+    public function getProcessNumber() {
705 665
         return $this->processNumber;
706 666
     }
707 667
 
@@ -711,8 +671,7 @@  discard block
 block discarded – undo
711 671
      * @param string $processNumber
712 672
      * @return void
713 673
      */
714
-    public function setProcessNumber($processNumber)
715
-    {
674
+    public function setProcessNumber($processNumber) {
716 675
         $this->processNumber = trim($processNumber);
717 676
     }
718 677
 
@@ -721,8 +680,7 @@  discard block
 block discarded – undo
721 680
      *
722 681
      * @return string
723 682
      */
724
-    public function getSubmitterName()
725
-    {
683
+    public function getSubmitterName() {
726 684
         try {
727 685
             $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
728 686
             return $internalFormat->getSubmitterName();
@@ -736,8 +694,7 @@  discard block
 block discarded – undo
736 694
      *
737 695
      * @return string
738 696
      */
739
-    public function getPrimaryUrn()
740
-    {
697
+    public function getPrimaryUrn() {
741 698
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
742 699
         return $internalFormat->getPrimaryUrn();
743 700
     }
@@ -747,8 +704,7 @@  discard block
 block discarded – undo
747 704
      *
748 705
      * @return int
749 706
      */
750
-    public function getCreator()
751
-    {
707
+    public function getCreator() {
752 708
         return $this->creator? $this->creator : 0;
753 709
     }
754 710
 
@@ -758,24 +714,20 @@  discard block
 block discarded – undo
758 714
      * @param int $creator
759 715
      * @return void
760 716
      */
761
-    public function setCreator($creator)
762
-    {
717
+    public function setCreator($creator) {
763 718
         $this->creator = $creator;
764 719
     }
765 720
 
766
-    public function getState()
767
-    {
721
+    public function getState() {
768 722
         return $this->state;
769 723
     }
770 724
 
771
-    public function setState($state)
772
-    {
725
+    public function setState($state) {
773 726
         $this->stateChange = $this->state != $state;
774 727
         $this->state = $state;
775 728
     }
776 729
 
777
-    public function getRemoteState()
778
-    {
730
+    public function getRemoteState() {
779 731
         $state = explode(':', $this->state);
780 732
         if (is_array($state) && array_key_exists(1, $state)) {
781 733
             return $state[1];
@@ -813,8 +765,7 @@  discard block
 block discarded – undo
813 765
     /**
814 766
      * @return string
815 767
      */
816
-    public function getRemoteLastModDate()
817
-    {
768
+    public function getRemoteLastModDate() {
818 769
         return $this->remoteLastModDate;
819 770
     }
820 771
 
@@ -822,24 +773,21 @@  discard block
 block discarded – undo
822 773
      * @param string $remoteLastModDate
823 774
      * @return void
824 775
      */
825
-    public function setRemoteLastModDate($remoteLastModDate)
826
-    {
776
+    public function setRemoteLastModDate($remoteLastModDate) {
827 777
         $this->remoteLastModDate = $remoteLastModDate;
828 778
     }
829 779
 
830 780
     /**
831 781
      * @return integer
832 782
      */
833
-    public function getTstamp()
834
-    {
783
+    public function getTstamp() {
835 784
         return $this->tstamp;
836 785
     }
837 786
 
838 787
     /**
839 788
      * @return integer
840 789
      */
841
-    public function getPid()
842
-    {
790
+    public function getPid() {
843 791
         return $this->pid;
844 792
     }
845 793
 
@@ -854,8 +802,7 @@  discard block
 block discarded – undo
854 802
     /**
855 803
      * @param bool $suggestion
856 804
      */
857
-    public function setSuggestion(bool $suggestion)
858
-    {
805
+    public function setSuggestion(bool $suggestion) {
859 806
         $this->suggestion = boolval($suggestion);
860 807
     }
861 808
 
@@ -870,8 +817,7 @@  discard block
 block discarded – undo
870 817
     /**
871 818
      * @param string $linkedUid
872 819
      */
873
-    public function setLinkedUid(string $linkedUid)
874
-    {
820
+    public function setLinkedUid(string $linkedUid) {
875 821
         $this->linkedUid = $linkedUid;
876 822
     }
877 823
 
@@ -886,8 +832,7 @@  discard block
 block discarded – undo
886 832
     /**
887 833
      * @param string $comment
888 834
      */
889
-    public function setComment(string $comment)
890
-    {
835
+    public function setComment(string $comment) {
891 836
         $this->comment = $comment;
892 837
     }
893 838
 
@@ -924,8 +869,7 @@  discard block
 block discarded – undo
924 869
      *
925 870
      * @return string|int
926 871
      */
927
-    public function getDocumentIdentifier()
928
-    {
872
+    public function getDocumentIdentifier() {
929 873
         return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
930 874
     }
931 875
 
@@ -934,8 +878,7 @@  discard block
 block discarded – undo
934 878
      *
935 879
      * @return bool
936 880
      */
937
-    public function isWorkingCopy()
938
-    {
881
+    public function isWorkingCopy() {
939 882
         return $this->getObjectIdentifier() && !$this->isTemporary() && !$this->isSuggestion();
940 883
     }
941 884
 
@@ -945,8 +888,7 @@  discard block
 block discarded – undo
945 888
      *
946 889
      * @return bool
947 890
      */
948
-    public function isTemporaryCopy()
949
-    {
891
+    public function isTemporaryCopy() {
950 892
         return $this->getObjectIdentifier() && $this->isTemporary() && !$this->isSuggestion();
951 893
     }
952 894
 
@@ -956,8 +898,7 @@  discard block
 block discarded – undo
956 898
      *
957 899
      * @return string|null
958 900
      */
959
-    public function getPublicationYear()
960
-    {
901
+    public function getPublicationYear() {
961 902
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
962 903
         $year =  $internalFormat->getPublishingYear();
963 904
         return $year? $year : "";
@@ -968,8 +909,7 @@  discard block
 block discarded – undo
968 909
      *
969 910
      * @return string|null
970 911
      */
971
-    public function getSourceDetails()
972
-    {
912
+    public function getSourceDetails() {
973 913
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
974 914
         $data = $internalFormat->getSourceDetails();
975 915
         return $data;
@@ -986,8 +926,7 @@  discard block
 block discarded – undo
986 926
     /**
987 927
      * @param \DateTime|null $embargoDate
988 928
      */
989
-    public function setEmbargoDate(?\DateTime $embargoDate)
990
-    {
929
+    public function setEmbargoDate(?\DateTime $embargoDate) {
991 930
         $this->embargoDate = $embargoDate;
992 931
     }
993 932
 
@@ -1010,8 +949,7 @@  discard block
 block discarded – undo
1010 949
     /**
1011 950
      * @return array
1012 951
      */
1013
-    public function getPreviouslyAssignedFobIdentifiers()
1014
-    {
952
+    public function getPreviouslyAssignedFobIdentifiers() {
1015 953
         return array_diff(
1016 954
             $this->getAssignedFobIdentifiers(), $this->getNewlyAssignedFobIdentifiers()
1017 955
         );
@@ -1037,8 +975,7 @@  discard block
 block discarded – undo
1037 975
     /**
1038 976
      * @return mixed
1039 977
      */
1040
-    public function getDepositLicense()
1041
-    {
978
+    public function getDepositLicense() {
1042 979
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
1043 980
         $data = $internalFormat->getDepositLicense();
1044 981
         return $data;
@@ -1081,8 +1018,7 @@  discard block
 block discarded – undo
1081 1018
     /**
1082 1019
      * @return bool
1083 1020
      */
1084
-    public function isClientChangeable()
1085
-    {
1021
+    public function isClientChangeable() {
1086 1022
         return (
1087 1023
             in_array(
1088 1024
                 $this->getState(),
Please login to merge, or discard this patch.
Classes/Controller/BackendAdminController.php 4 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -338,13 +338,13 @@
 block discarded – undo
338 338
     )
339 339
     {
340 340
         $messageHeader = LocalizationUtility::translate(
341
-            'LLL:EXT:dpf/Resources/Private/Language/locallang_mod.xlf:admin_module.'.$headerKey,
341
+            'LLL:EXT:dpf/Resources/Private/Language/locallang_mod.xlf:admin_module.' . $headerKey,
342 342
             'dpf',
343 343
             $headerArguments
344 344
         );
345 345
 
346 346
         $messageBody = LocalizationUtility::translate(
347
-            'LLL:EXT:dpf/Resources/Private/Language/locallang_mod.xlf:admin_module.'.$bodyKey,
347
+            'LLL:EXT:dpf/Resources/Private/Language/locallang_mod.xlf:admin_module.' . $bodyKey,
348 348
             'dpf',
349 349
             $bodyArguments
350 350
         );
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
     protected $clientRepository = null;
84 84
 
85 85
     /**
86
-    * Backend Template Container
87
-    *
88
-    * @var string
89
-    */
86
+     * Backend Template Container
87
+     *
88
+     * @var string
89
+     */
90 90
     protected $defaultViewObjectName = BackendTemplateView::class;
91 91
 
92 92
     /**
@@ -267,25 +267,25 @@  discard block
 block discarded – undo
267 267
                 $targetElasticSearch->index($document);
268 268
 
269 269
                 $this->flashMessage(
270
-                   'client_changed',
271
-                   'client_changed_message',
272
-                   AbstractMessage::OK,
273
-                   [],
274
-                   [$identifier]
270
+                    'client_changed',
271
+                    'client_changed_message',
272
+                    AbstractMessage::OK,
273
+                    [],
274
+                    [$identifier]
275 275
                 );
276
-           } else {
277
-               $this->flashMessage(
278
-                   'change_client_forbidden',
279
-                   'change_client_forbidden_message',
280
-                   AbstractMessage::ERROR,
281
-                   [],
282
-                   [$identifier]
283
-               );
284
-           }
285
-
286
-           $this->view->assign('currentClient', $client);
287
-           $this->view->assign('document', $document);
288
-       } else {
276
+            } else {
277
+                $this->flashMessage(
278
+                    'change_client_forbidden',
279
+                    'change_client_forbidden_message',
280
+                    AbstractMessage::ERROR,
281
+                    [],
282
+                    [$identifier]
283
+                );
284
+            }
285
+
286
+            $this->view->assign('currentClient', $client);
287
+            $this->view->assign('document', $document);
288
+        } else {
289 289
             $this->flashMessage(
290 290
                 'missing_document_type',
291 291
                 'missing_document_type_message',
@@ -295,15 +295,15 @@  discard block
 block discarded – undo
295 295
             );
296 296
 
297 297
             $this->forward(
298
-              'chooseNewClient',
299
-              null,
300
-              null,
301
-              [
302
-                  'document' => $document,
303
-                  'identifier' => $identifier
304
-              ]
298
+                'chooseNewClient',
299
+                null,
300
+                null,
301
+                [
302
+                    'document' => $document,
303
+                    'identifier' => $identifier
304
+                ]
305 305
             );
306
-       }
306
+        }
307 307
     }
308 308
 
309 309
     /**
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
 /**
33 33
 * Backend module user/group action controller
34 34
 */
35
-class BackendAdminController extends ActionController
36
-{
35
+class BackendAdminController extends ActionController {
37 36
     /**
38 37
      * documentRepository
39 38
      *
@@ -95,8 +94,7 @@  discard block
 block discarded – undo
95 94
      * @param ViewInterface $view
96 95
      * @return void
97 96
      */
98
-    protected function initializeView(ViewInterface $view)
99
-    {
97
+    protected function initializeView(ViewInterface $view) {
100 98
         /** @var BackendTemplateView $view */
101 99
         parent::initializeView($view);
102 100
         if ($this->actionMethodName == 'indexAction'
@@ -114,8 +112,7 @@  discard block
 block discarded – undo
114 112
     /**
115 113
      * @param string $identifier
116 114
      */
117
-    public function searchDocumentAction(string $identifier = '')
118
-    {
115
+    public function searchDocumentAction(string $identifier = '') {
119 116
         $identifier = trim($identifier);
120 117
         $this->view->assign('identifier', $identifier);
121 118
 
@@ -153,8 +150,7 @@  discard block
 block discarded – undo
153 150
      * @param Document $document
154 151
      * @param string $identifier
155 152
      */
156
-    public function chooseNewClientAction(Document $document, string $identifier)
157
-    {
153
+    public function chooseNewClientAction(Document $document, string $identifier) {
158 154
         if ($document) {
159 155
             if ($document->isClientChangeable()) {
160 156
                 /** @var Client $currentClient */
@@ -207,8 +203,7 @@  discard block
 block discarded – undo
207 203
      * @param string $identifier
208 204
      * @param DocumentType $documentType
209 205
      */
210
-    public function changeClientAction(Document $document, Client $client, string $identifier, DocumentType $documentType = null)
211
-    {
206
+    public function changeClientAction(Document $document, Client $client, string $identifier, DocumentType $documentType = null) {
212 207
         if ($documentType instanceof DocumentType) {
213 208
             if ($document->isClientChangeable()) {
214 209
 
@@ -323,8 +318,7 @@  discard block
 block discarded – undo
323 318
         array $headerArguments,
324 319
         array $bodyArguments,
325 320
         bool $storeInSession = false
326
-    )
327
-    {
321
+    ) {
328 322
         $messageHeader = LocalizationUtility::translate(
329 323
             'LLL:EXT:dpf/Resources/Private/Language/locallang_mod.xlf:admin_module.'.$headerKey,
330 324
             'dpf',
Please login to merge, or discard this patch.
Upper-Lower-Casing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
41 41
      * @TYPO3\CMS\Extbase\Annotation\Inject
42 42
      */
43
-    protected $documentRepository = null;
43
+    protected $documentRepository = NULL;
44 44
 
45 45
     /**
46 46
      * fileRepository
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @var \EWW\Dpf\Domain\Repository\FileRepository
49 49
      * @TYPO3\CMS\Extbase\Annotation\Inject
50 50
      */
51
-    protected $fileRepository = null;
51
+    protected $fileRepository = NULL;
52 52
 
53 53
     /**
54 54
      * documentTypeRepository
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
57 57
      * @TYPO3\CMS\Extbase\Annotation\Inject
58 58
      */
59
-    protected $documentTypeRepository = null;
59
+    protected $documentTypeRepository = NULL;
60 60
 
61 61
     /**
62 62
      * bookmarkRepository
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
65 65
      * @TYPO3\CMS\Extbase\Annotation\Inject
66 66
      */
67
-    protected $bookmarkRepository = null;
67
+    protected $bookmarkRepository = NULL;
68 68
 
69 69
     /**
70 70
      * frontendUserRepository
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @var \EWW\Dpf\Domain\Repository\FrontendUserRepository
73 73
      * @TYPO3\CMS\Extbase\Annotation\Inject
74 74
      */
75
-    protected $frontendUserRepository = null;
75
+    protected $frontendUserRepository = NULL;
76 76
 
77 77
     /**
78 78
      * clientRepository
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * @var \EWW\Dpf\Domain\Repository\ClientRepository
81 81
      * @TYPO3\CMS\Extbase\Annotation\Inject
82 82
      */
83
-    protected $clientRepository = null;
83
+    protected $clientRepository = NULL;
84 84
 
85 85
     /**
86 86
     * Backend Template Container
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         if ($identifier) {
123 123
 
124
-            $this->documentRepository->crossClient(true);
124
+            $this->documentRepository->crossClient(TRUE);
125 125
 
126 126
             $documents = $this->documentRepository->searchForIdentifier($identifier);
127 127
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 /** @var Client $currentClient */
161 161
                 $currentClient = $this->clientRepository->findAllByPid($document->getPid())->current();
162 162
 
163
-                $allClients = $this->clientRepository->crossClientFindAll(false);
163
+                $allClients = $this->clientRepository->crossClientFindAll(FALSE);
164 164
 
165 165
                 $documentTypes = [];
166 166
                 $clients = [];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 foreach ($allClients as $client) {
170 170
                     if ($client->getUid() != $currentClient->getUid()) {
171 171
                         $clients[] = $client;
172
-                        $this->documentTypeRepository->crossClient(true);
172
+                        $this->documentTypeRepository->crossClient(TRUE);
173 173
                         $documentTypes[$client->getPid()] = $this->documentTypeRepository->findByPid($client->getPid());
174 174
                     }
175 175
                 }
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
 
192 192
                 $this->forward(
193 193
                     'searchDocument',
194
-                    null,
195
-                    null,
194
+                    NULL,
195
+                    NULL,
196 196
                     [
197 197
                         'identifier' => $identifier
198 198
                     ]
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @param string $identifier
208 208
      * @param DocumentType $documentType
209 209
      */
210
-    public function changeClientAction(Document $document, Client $client, string $identifier, DocumentType $documentType = null)
210
+    public function changeClientAction(Document $document, Client $client, string $identifier, DocumentType $documentType = NULL)
211 211
     {
212 212
         if ($documentType instanceof DocumentType) {
213 213
             if ($document->isClientChangeable()) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
                 // If there are bookmarks, they have to be adjusted, depending on the existence of the related user
250 250
                 // inside the target client, and either deleted or moved to the target client.
251
-                $this->bookmarkRepository->crossClient(true);
251
+                $this->bookmarkRepository->crossClient(TRUE);
252 252
                 $bookmarks = $this->bookmarkRepository->findDocumentBookmarks($document);
253 253
                 /** @var Bookmark $bookmark */
254 254
                 foreach ($bookmarks as $bookmark) {
@@ -296,8 +296,8 @@  discard block
 block discarded – undo
296 296
 
297 297
             $this->forward(
298 298
               'chooseNewClient',
299
-              null,
300
-              null,
299
+              NULL,
300
+              NULL,
301 301
               [
302 302
                   'document' => $document,
303 303
                   'identifier' => $identifier
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
         int $severity = AbstractMessage::INFO,
323 323
         array $headerArguments,
324 324
         array $bodyArguments,
325
-        bool $storeInSession = false
325
+        bool $storeInSession = FALSE
326 326
     )
327 327
     {
328 328
         $messageHeader = LocalizationUtility::translate(
Please login to merge, or discard this patch.
Classes/Exceptions/ElasticSearchMissingIndexNameException.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,10 +14,8 @@
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class ElasticSearchMissingIndexNameException extends \Exception implements DPFExceptionInterface
18
-{
19
-    public function messageLanguageKey()
20
-    {
17
+class ElasticSearchMissingIndexNameException extends \Exception implements DPFExceptionInterface {
18
+    public function messageLanguageKey() {
21 19
         return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_transfer.elasticsearch_indexname_error';
22 20
     }
23 21
 }
Please login to merge, or discard this patch.
Classes/Services/ElasticSearch/ElasticSearch.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             throw new ElasticSearchMissingIndexNameException('Missing search index name.');
83 83
         }
84 84
 
85
-        $hosts = array(
85
+        $hosts = array (
86 86
             $this->server . ':' . $this->port,
87 87
         );
88 88
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             if ($notes && is_array($notes)) {
311 311
                 $data->notes = $notes;
312 312
             } else {
313
-                $data->notes = array();
313
+                $data->notes = array ();
314 314
             }
315 315
 
316 316
             $files = $document->getFile();
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
 use TYPO3\CMS\Core\Log\LogManager;
29 29
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
30 30
 
31
-class ElasticSearch
32
-{
31
+class ElasticSearch {
33 32
     /**
34 33
      * @var \EWW\Dpf\Configuration\ClientConfigurationManager
35 34
      */
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * @param int|null $clientPid
62 61
      * @throws ElasticSearchMissingIndexNameException
63 62
      */
64
-    public function __construct($clientPid = null)
65
-    {
63
+    public function __construct($clientPid = null) {
66 64
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
67 65
 
68 66
         $this->elasticsearchMapper = $objectManager->get(ElasticsearchMapper::class);
@@ -103,8 +101,7 @@  discard block
 block discarded – undo
103 101
     /**
104 102
      * @return string|null
105 103
      */
106
-    protected function getIndexName()
107
-    {
104
+    protected function getIndexName() {
108 105
         return $this->indexName;
109 106
     }
110 107
 
@@ -113,8 +110,7 @@  discard block
 block discarded – undo
113 110
      *
114 111
      * @param $indexName
115 112
      */
116
-    protected function initializeIndex($indexName)
117
-    {
113
+    protected function initializeIndex($indexName) {
118 114
         $paramsIndex = [
119 115
             'index' => $indexName,
120 116
             'body' => [
@@ -252,8 +248,7 @@  discard block
 block discarded – undo
252 248
      *
253 249
      * @param Document $document
254 250
      */
255
-    public function index($document)
256
-    {
251
+    public function index($document) {
257 252
         try {
258 253
             $data = json_decode($this->elasticsearchMapper->getElasticsearchJson($document));
259 254
         } catch (\Throwable $throwable) {
@@ -391,8 +386,7 @@  discard block
 block discarded – undo
391 386
      *
392 387
      * @param string $identifier
393 388
      */
394
-    public function delete($identifier)
395
-    {
389
+    public function delete($identifier) {
396 390
         try {
397 391
 
398 392
             $params = [
@@ -418,8 +412,7 @@  discard block
 block discarded – undo
418 412
     /**
419 413
      * @param $identifier
420 414
      */
421
-    public function getDocument($identifier)
422
-    {
415
+    public function getDocument($identifier) {
423 416
         $params = [
424 417
             'index' => $this->getIndexName(),
425 418
             'id'    => $identifier
@@ -434,8 +427,7 @@  discard block
 block discarded – undo
434 427
      * @param  array $query search query
435 428
      * @return array        result list
436 429
      */
437
-    public function search($query, $type = null)
438
-    {
430
+    public function search($query, $type = null) {
439 431
         try {
440 432
             // define type and index
441 433
             if (empty($query['index'])) {
@@ -467,8 +459,7 @@  discard block
 block discarded – undo
467 459
      * Get the results
468 460
      * @return mixed
469 461
      */
470
-    public function getResults()
471
-    {
462
+    public function getResults() {
472 463
         // return results from the last search request
473 464
         return $this->results;
474 465
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param int|null $clientPid
62 62
      * @throws ElasticSearchMissingIndexNameException
63 63
      */
64
-    public function __construct($clientPid = null)
64
+    public function __construct($clientPid = NULL)
65 65
     {
66 66
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
67 67
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 ],
153 153
                 'mappings' => [
154 154
                     '_source' => [
155
-                        'enabled' => true
155
+                        'enabled' => TRUE
156 156
                     ],
157 157
                     //'dynamic' => 'strict',
158 158
                     'properties' => [
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
                                 ],
216 216
                                 'fobId' => [
217 217
                                     //'type' => 'keyword'
218
-                                    'enabled' => false
218
+                                    'enabled' => FALSE
219 219
                                 ],
220 220
                                 'index' => [
221 221
                                     //'type' => 'integer'
222
-                                    'enabled' => false
222
+                                    'enabled' => FALSE
223 223
                                 ]
224 224
                             ]
225 225
                         ],
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             if ($document->getCreator()) {
282 282
                 $data->creator = $document->getCreator();
283 283
             } else {
284
-                $data->creator = null;
284
+                $data->creator = NULL;
285 285
             }
286 286
 
287 287
             if ($document->getCreator()) {
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
 
316 316
             $files = $document->getFile();
317 317
             if ($files->count() > 0) {
318
-                $data->hasFiles = true;
318
+                $data->hasFiles = TRUE;
319 319
             } else {
320
-                $data->hasFiles = false;
320
+                $data->hasFiles = FALSE;
321 321
             }
322 322
 
323 323
             $internalFormat = new \EWW\Dpf\Helper\InternalFormat($document->getXmlData(), $this->clientPid);
@@ -353,11 +353,11 @@  discard block
 block discarded – undo
353 353
 
354 354
             $data->source = $document->getSourceDetails();
355 355
 
356
-            $data->universityCollection = false;
356
+            $data->universityCollection = FALSE;
357 357
             if ($data->collections && is_array($data->collections)) {
358 358
                 foreach ($data->collections as $collection) {
359 359
                     if ($collection == $this->clientConfigurationManager->getUniversityCollection()) {
360
-                        $data->universityCollection = true;
360
+                        $data->universityCollection = TRUE;
361 361
                         break;
362 362
                     }
363 363
                 }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
             if ($embargoDate instanceof \DateTime) {
368 368
                 $data->embargoDate = $embargoDate->format("Y-m-d");
369 369
             } else {
370
-                $data->embargoDate = null;
370
+                $data->embargoDate = NULL;
371 371
             }
372 372
 
373 373
             $data->originalSourceTitle = $internalFormat->getOriginalSourceTitle();
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      * @param  array $query search query
435 435
      * @return array        result list
436 436
      */
437
-    public function search($query, $type = null)
437
+    public function search($query, $type = NULL)
438 438
     {
439 439
         try {
440 440
             // define type and index
Please login to merge, or discard this patch.
Classes/Services/ElasticSearch/QueryBuilder.php 3 patches
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             $query = [
123 123
                 'bool' => [
124 124
                     'must' => [
125
-                        'match_all' => (object)[]
125
+                        'match_all' => (object) []
126 126
                     ],
127 127
                     'filter' => $queryFilter
128 128
                 ]
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
                             'script' => [
165 165
                                 'lang' => 'painless',
166 166
                                 'source' =>
167
-                                    "for (int i = 0; i < doc['collections'].length; ++i) {".
168
-                                    "    if(doc['collections'][i] =='".
169
-                                    $this->clientConfigurationManager->getUniversityCollection() ."') {".
170
-                                    "        return 'true';".
171
-                                    "    }".
172
-                                    "}".
167
+                                    "for (int i = 0; i < doc['collections'].length; ++i) {" .
168
+                                    "    if(doc['collections'][i] =='" .
169
+                                    $this->clientConfigurationManager->getUniversityCollection() . "') {" .
170
+                                    "        return 'true';" .
171
+                                    "    }" .
172
+                                    "}" .
173 173
                                     "return 'false';"
174 174
                             ]
175 175
                         ]
@@ -185,23 +185,23 @@  discard block
 block discarded – undo
185 185
                             'script' => [
186 186
                                 'lang' => 'painless',
187 187
                                 'source' =>
188
-                                    "if (".
189
-                                    "    doc['creator'].size() > 0 &&".
190
-                                    "    doc['creator'].value == '".$this->security->getUser()->getUid()."') {".
191
-                                    "    return 'self';".
192
-                                    "}".
193
-                                    "if (".
194
-                                    "    doc['creatorRole'].size() > 0 &&".
195
-                                    "    doc['creatorRole'].value == '".Security::ROLE_LIBRARIAN."'".
196
-                                    ") {".
197
-                                    "    return 'librarian';".
198
-                                    "}".
199
-                                    "if (".
200
-                                    "    doc['creatorRole'].size() > 0 &&".
201
-                                    "    doc['creatorRole'].value == '".Security::ROLE_RESEARCHER."'".
202
-                                    ") {".
203
-                                    "    return 'user';".
204
-                                    "}".
188
+                                    "if (" .
189
+                                    "    doc['creator'].size() > 0 &&" .
190
+                                    "    doc['creator'].value == '" . $this->security->getUser()->getUid() . "') {" .
191
+                                    "    return 'self';" .
192
+                                    "}" .
193
+                                    "if (" .
194
+                                    "    doc['creatorRole'].size() > 0 &&" .
195
+                                    "    doc['creatorRole'].value == '" . Security::ROLE_LIBRARIAN . "'" .
196
+                                    ") {" .
197
+                                    "    return 'librarian';" .
198
+                                    "}" .
199
+                                    "if (" .
200
+                                    "    doc['creatorRole'].size() > 0 &&" .
201
+                                    "    doc['creatorRole'].value == '" . Security::ROLE_RESEARCHER . "'" .
202
+                                    ") {" .
203
+                                    "    return 'user';" .
204
+                                    "}" .
205 205
                                     "return 'unknown';"
206 206
                             ]
207 207
                         ]
@@ -414,8 +414,8 @@  discard block
 block discarded – undo
414 414
      */
415 415
     protected function buildSortQueryPart($sortField, $sortOrder) {
416 416
 
417
-        $sortField = ($sortField)? $sortField : 'title';
418
-        $sortOrder = ($sortOrder)? $sortOrder : 'asc';
417
+        $sortField = ($sortField) ? $sortField : 'title';
418
+        $sortOrder = ($sortOrder) ? $sortOrder : 'asc';
419 419
 
420 420
         // Build the sorting part.
421 421
         $script = "";
@@ -446,11 +446,11 @@  discard block
 block discarded – undo
446 446
             ];
447 447
         } else {
448 448
             if ($sortField == 'title') {
449
-                $sortField.= ".keyword";
449
+                $sortField .= ".keyword";
450 450
             }
451 451
 
452 452
             if ($sortField == 'personsSort') {
453
-                $sortField.= ".keyword";
453
+                $sortField .= ".keyword";
454 454
             }
455 455
 
456 456
             $sort = [
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     protected function getSortScriptUniversityCollection($collection)
468 468
     {
469 469
         $script  = "for (int i = 0; i < doc['collections'].length; ++i) {";
470
-        $script .= "    if (doc['collections'][i] == '".$collection."') {";
470
+        $script .= "    if (doc['collections'][i] == '" . $collection . "') {";
471 471
         $script .= "        return '1';";
472 472
         $script .= "    }";
473 473
         $script .= "}";
@@ -488,13 +488,13 @@  discard block
 block discarded – undo
488 488
 
489 489
     protected function getSortScriptCreatorRole($feUserUid)
490 490
     {
491
-        $script = "if (doc['creator'].value == '".$feUserUid."') {";
491
+        $script = "if (doc['creator'].value == '" . $feUserUid . "') {";
492 492
         $script .= "    return '1';";
493 493
         $script .= "}";
494
-        $script .= "if (doc['creatorRole'].value == '".Security::ROLE_LIBRARIAN."') {";
494
+        $script .= "if (doc['creatorRole'].value == '" . Security::ROLE_LIBRARIAN . "') {";
495 495
         $script .= "return '2';";
496 496
         $script .= "}";
497
-        $script .= "if (doc['creatorRole'].value == '".Security::ROLE_RESEARCHER."') {";
497
+        $script .= "if (doc['creatorRole'].value == '" . Security::ROLE_RESEARCHER . "') {";
498 498
         $script .= "    return '3';";
499 499
         $script .= "}";
500 500
         $script .= "return '4';";
@@ -509,15 +509,15 @@  discard block
 block discarded – undo
509 509
         foreach (DocumentWorkflow::PLACES as $state) {
510 510
             if (array_key_exists($state, DocumentWorkflow::STATE_TO_ALIASSTATE_MAPPING)) {
511 511
                 $aliasState = DocumentWorkflow::STATE_TO_ALIASSTATE_MAPPING[$state];
512
-                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:manager.documentList.state.'.$aliasState;
512
+                $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:manager.documentList.state.' . $aliasState;
513 513
                 $stateName = LocalizationUtility::translate($key, 'dpf');
514
-                $sortStates[] = "if (doc['state'].value == '".$state."') return '".$stateName."';";
514
+                $sortStates[] = "if (doc['state'].value == '" . $state . "') return '" . $stateName . "';";
515 515
             }
516 516
         }
517 517
 
518 518
         $sortStates = implode(" ", $sortStates);
519 519
 
520
-        return $sortStates." return '';";
520
+        return $sortStates . " return '';";
521 521
     }
522 522
 
523 523
 
@@ -526,14 +526,14 @@  discard block
 block discarded – undo
526 526
         $sortDoctypes = [];
527 527
         foreach ($this->documentTypeRepository->findAll() as $documentType) {
528 528
             if ($documentType->getName() && $documentType->getDisplayname()) {
529
-                $sortDoctypes[] = "if (doc['doctype'].value == '".$documentType->getName()."')"
530
-                    ." return '".$documentType->getDisplayname()."';";
529
+                $sortDoctypes[] = "if (doc['doctype'].value == '" . $documentType->getName() . "')"
530
+                    ." return '" . $documentType->getDisplayname() . "';";
531 531
             }
532 532
         }
533 533
 
534 534
         $sortDoctypes = implode(" ", $sortDoctypes);
535 535
 
536
-        return $sortDoctypes." return '';";
536
+        return $sortDoctypes . " return '';";
537 537
     }
538 538
 
539 539
 }
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 use EWW\Dpf\Security\Security;
20 20
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
21 21
 
22
-class QueryBuilder
23
-{
22
+class QueryBuilder {
24 23
     /**
25 24
      *
26 25
      * @var \EWW\Dpf\Configuration\ClientConfigurationManager
@@ -62,8 +61,7 @@  discard block
 block discarded – undo
62 61
     public function buildQuery(
63 62
         $itemsPerPage, $workspaceFilter, $from = 0, $bookmarkIdentifiers = [], $filters = [],
64 63
         $excludeFilters = [], $sortField = null, $sortOrder = null, $queryString = null
65
-    )
66
-    {
64
+    ) {
67 65
 
68 66
         if ($workspaceFilter) {
69 67
             $workspaceFilter = [0 => $workspaceFilter];
@@ -464,8 +462,7 @@  discard block
 block discarded – undo
464 462
     }
465 463
 
466 464
 
467
-    protected function getSortScriptUniversityCollection($collection)
468
-    {
465
+    protected function getSortScriptUniversityCollection($collection) {
469 466
         $script  = "for (int i = 0; i < doc['collections'].length; ++i) {";
470 467
         $script .= "    if (doc['collections'][i] == '".$collection."') {";
471 468
         $script .= "        return '1';";
@@ -476,8 +473,7 @@  discard block
 block discarded – undo
476 473
         return $script;
477 474
     }
478 475
 
479
-    protected function getSortScriptHasFiles()
480
-    {
476
+    protected function getSortScriptHasFiles() {
481 477
         $script = "if (doc['hasFiles'].value == 'true') {";
482 478
         $script .= "    return '1';";
483 479
         $script .= "}";
@@ -486,8 +482,7 @@  discard block
 block discarded – undo
486 482
         return $script;
487 483
     }
488 484
 
489
-    protected function getSortScriptCreatorRole($feUserUid)
490
-    {
485
+    protected function getSortScriptCreatorRole($feUserUid) {
491 486
         $script = "if (doc['creator'].value == '".$feUserUid."') {";
492 487
         $script .= "    return '1';";
493 488
         $script .= "}";
@@ -503,8 +498,7 @@  discard block
 block discarded – undo
503 498
     }
504 499
 
505 500
 
506
-    protected function getSortScriptState()
507
-    {
501
+    protected function getSortScriptState() {
508 502
         $sortStates = [];
509 503
         foreach (DocumentWorkflow::PLACES as $state) {
510 504
             if (array_key_exists($state, DocumentWorkflow::STATE_TO_ALIASSTATE_MAPPING)) {
@@ -521,8 +515,7 @@  discard block
 block discarded – undo
521 515
     }
522 516
 
523 517
 
524
-    protected function getSortScriptDoctype()
525
-    {
518
+    protected function getSortScriptDoctype() {
526 519
         $sortDoctypes = [];
527 520
         foreach ($this->documentTypeRepository->findAll() as $documentType) {
528 521
             if ($documentType->getName() && $documentType->getDisplayname()) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
35 35
      * @TYPO3\CMS\Extbase\Annotation\Inject
36 36
      */
37
-    protected $documentTypeRepository = null;
37
+    protected $documentTypeRepository = NULL;
38 38
 
39 39
     /**
40 40
      * security
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @var \EWW\Dpf\Security\Security
43 43
      * @TYPO3\CMS\Extbase\Annotation\Inject
44 44
      */
45
-    protected $security = null;
45
+    protected $security = NULL;
46 46
 
47 47
     /**
48 48
      * Builds the document list query.
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function buildQuery(
63 63
         $itemsPerPage, $workspaceFilter, $from = 0, $bookmarkIdentifiers = [], $filters = [],
64
-        $excludeFilters = [], $sortField = null, $sortOrder = null, $queryString = null
64
+        $excludeFilters = [], $sortField = NULL, $sortOrder = NULL, $queryString = NULL
65 65
     )
66 66
     {
67 67
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
             foreach ($filters as $key => $filterValues) {
240 240
                 $queryFilterPart = [];
241
-                if (in_array($key, $validKeys, true)) {
241
+                if (in_array($key, $validKeys, TRUE)) {
242 242
                     if ($key == 'universityCollection') {
243 243
                         if ($filterValues && is_array($filterValues)) {
244 244
                             if (in_array("true", $filterValues)) {
Please login to merge, or discard this patch.
Classes/Services/ParserGenerator.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
 /**
24 24
  * ParserGenerator
25 25
  */
26
-class ParserGenerator
27
-{
26
+class ParserGenerator {
28 27
     /**
29 28
      * clientConfigurationManager
30 29
      *
@@ -93,8 +92,7 @@  discard block
 block discarded – undo
93 92
      * ParserGenerator constructor.
94 93
      * @param int $clientPid
95 94
      */
96
-    public function __construct($clientPid = 0)
97
-    {
95
+    public function __construct($clientPid = 0) {
98 96
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
99 97
         $this->clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
100 98
 
@@ -128,16 +126,14 @@  discard block
 block discarded – undo
128 126
      * returns the mods xml string
129 127
      * @return string mods xml
130 128
      */
131
-    public function getXMLData()
132
-    {
129
+    public function getXMLData() {
133 130
         $xml = $this->xmlData->saveXML();
134 131
         $xml = preg_replace("/eww=\"\d-\d-\d\"/", '${1}${2}${3}', $xml);
135 132
 
136 133
         return $xml;
137 134
     }
138 135
 
139
-    public function transformInputXML($xml)
140
-    {
136
+    public function transformInputXML($xml) {
141 137
         $XSLTransformator = new XSLTransformator();
142 138
         return $XSLTransformator->transformInputXML($xml);
143 139
     }
@@ -146,8 +142,7 @@  discard block
 block discarded – undo
146 142
      * @param $document
147 143
      * @return string The transformed xml
148 144
      */
149
-    public function getTransformedOutputXML($document)
150
-    {
145
+    public function getTransformedOutputXML($document) {
151 146
         $XSLTransformator = new XSLTransformator();
152 147
         return $XSLTransformator->getTransformedOutputXML($document);
153 148
     }
@@ -157,8 +152,7 @@  discard block
 block discarded – undo
157 152
      * build mods from form array
158 153
      * @param array $array structured form data array
159 154
      */
160
-    public function buildXmlFromForm($array)
161
-    {
155
+    public function buildXmlFromForm($array) {
162 156
         $fedoraNamespace = $this->clientConfigurationManager->getFedoraNamespace();
163 157
 
164 158
         $this->xmlData = $this->xmlData;
@@ -241,8 +235,7 @@  discard block
 block discarded – undo
241 235
      * @param  xpath $xPath xPath expression
242 236
      * @return xml
243 237
      */
244
-    public function parseXPath($xPath)
245
-    {
238
+    public function parseXPath($xPath) {
246 239
 
247 240
         $this->parser->generateXmlFromXPath($xPath);
248 241
         $xml = $this->parser->getXML();
@@ -250,8 +243,7 @@  discard block
 block discarded – undo
250 243
         return $xml;
251 244
     }
252 245
 
253
-    public function parseXPathWrapped($xPath)
254
-    {
246
+    public function parseXPathWrapped($xPath) {
255 247
         $this->parser->generateXmlFromXPath($xPath);
256 248
         $xml = $this->parser->getXML();
257 249
 
@@ -266,8 +258,7 @@  discard block
 block discarded – undo
266 258
      * @param  string $value form value
267 259
      * @return xml    created xml
268 260
      */
269
-    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
270
-    {
261
+    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) {
271 262
         if (!$attributeOnly) {
272 263
             // Explode xPath
273 264
             $newPath = explode('%', $xPath);
@@ -466,8 +457,7 @@  discard block
 block discarded – undo
466 457
      * sets the file data and generates file xml
467 458
      * @param string $value
468 459
      */
469
-    public function setFileData($value = '')
470
-    {
460
+    public function setFileData($value = '') {
471 461
         $this->files = $value;
472 462
         $this->generateFileXML();
473 463
     }
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentRepository.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             case Security::ROLE_RESEARCHER:
47 47
                 $query->matching(
48 48
                     $query->logicalAnd(
49
-                        array(
49
+                        array (
50 50
                             $query->equals('suggestion', true),
51 51
                             $query->equals('creator', $creatorUid)
52 52
                         )
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $query = $this->createQuery();
67 67
 
68
-        $constraints = array(
68
+        $constraints = array (
69 69
             $query->logicalNot($query->equals('object_identifier', '')),
70 70
             $query->logicalNot($query->equals('object_identifier', null))
71 71
         );
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $result = $query->execute();
86 86
 
87
-        $objectIdentifiers = array();
87
+        $objectIdentifiers = array ();
88 88
 
89 89
         foreach ($result as $document) {
90 90
             $objectIdentifiers[$document->getObjectIdentifier()] = $document->getObjectIdentifier();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $query = $this->createQuery();
105 105
         $query->getQuerySettings()->setRespectStoragePage(false);
106 106
 
107
-        $constraints = array();
107
+        $constraints = array ();
108 108
         $constraints[] = $query->equals('process_number', '');
109 109
         $constraints[] = $query->equals('process_number', null);
110 110
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $dateTimeObj = new \DateTime();
134 134
         $dateTimeObj->sub(new \DateInterval("PT" . $timeout . "S"));
135 135
 
136
-        $constraints = array();
136
+        $constraints = array ();
137 137
         $constraints[] = $query->lessThan('tstamp', $dateTimeObj->getTimestamp());
138 138
 
139 139
         $query->matching(
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $dateTimeObj = new \DateTime();
160 160
         $dateTimeObj->sub(new \DateInterval("PT" . $timeout . "S"));
161 161
 
162
-        $constraints = array();
162
+        $constraints = array ();
163 163
         $constraints[] = $query->lessThan('tstamp', $dateTimeObj->getTimestamp());
164 164
 
165 165
         $query->matching(
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         $query = $this->createQuery();
183 183
 
184
-        $constraints = array(
184
+        $constraints = array (
185 185
             $query->equals('object_identifier', $objectIdentifier),
186 186
             $query->logicalNot($query->equals('temporary', true)),
187 187
             $query->logicalNot($query->equals('suggestion', true))
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             return null;
223 223
         }
224 224
 
225
-        $query->setOrderings(array("tstamp" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
225
+        $query->setOrderings(array ("tstamp" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
226 226
         $query->matching($query->logicalAnd($constraints));
227 227
 
228 228
         return $query->execute()->getFirst();
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
         $query = $this->createQuery();
310 310
         $query->matching(
311 311
             $query->logicalAnd(
312
-                array(
312
+                array (
313 313
                     $query->logicalNot(
314 314
                         $query->equals('embargo_date', 0)
315 315
                     )
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                     $query->equals('suggestion', false)
348 348
                 );
349 349
 
350
-        $query->setOrderings(array("tstamp" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
350
+        $query->setOrderings(array ("tstamp" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
351 351
         $query->matching($query->logicalOr($constraints));
352 352
 
353 353
         return $query->execute();
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * The repository for Documents
24 24
  */
25
-class DocumentRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
26
-{
25
+class DocumentRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
27 26
     /**
28 27
      * Finds all suggestion documents of the given user role filtered by creator feuser uid
29 28
      *
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
      * @param int $creatorUid
32 31
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
33 32
      */
34
-    public function findAllDocumentSuggestions($role, $creatorUid)
35
-    {
33
+    public function findAllDocumentSuggestions($role, $creatorUid) {
36 34
         $query = $this->createQuery();
37 35
 
38 36
         switch ($role) {
@@ -61,8 +59,7 @@  discard block
 block discarded – undo
61 59
      * @param boolean $temporary
62 60
      * @return array
63 61
      */
64
-    public function getObjectIdentifiers($temporary = false)
65
-    {
62
+    public function getObjectIdentifiers($temporary = false) {
66 63
         $query = $this->createQuery();
67 64
 
68 65
         $constraints = array(
@@ -99,8 +96,7 @@  discard block
 block discarded – undo
99 96
      *
100 97
      * @return array The found Document Objects
101 98
      */
102
-    public function findDocumentsWithoutProcessNumber()
103
-    {
99
+    public function findDocumentsWithoutProcessNumber() {
104 100
         $query = $this->createQuery();
105 101
         $query->getQuerySettings()->setRespectStoragePage(false);
106 102
 
@@ -126,8 +122,7 @@  discard block
 block discarded – undo
126 122
      * @param integer $timeout : Time interval (in seconds) in which documents are not outdated.
127 123
      * @return array The found Document Objects
128 124
      */
129
-    public function findOutdatedTemporaryDocuments($timeout = 3600)
130
-    {
125
+    public function findOutdatedTemporaryDocuments($timeout = 3600) {
131 126
         $query = $this->createQuery();
132 127
 
133 128
         $dateTimeObj = new \DateTime();
@@ -152,8 +147,7 @@  discard block
 block discarded – undo
152 147
      * @param integer $timeout : Time interval (in seconds) in which documents are not outdated.
153 148
      * @return array The found Document Objects
154 149
      */
155
-    public function findOutdatedLockedDocuments($timeout = 3600)
156
-    {
150
+    public function findOutdatedLockedDocuments($timeout = 3600) {
157 151
         $query = $this->createQuery();
158 152
 
159 153
         $dateTimeObj = new \DateTime();
@@ -177,8 +171,7 @@  discard block
 block discarded – undo
177 171
      * @param string $objectIdentifier
178 172
      * @return array
179 173
      */
180
-    public function findWorkingCopyByObjectIdentifier($objectIdentifier)
181
-    {
174
+    public function findWorkingCopyByObjectIdentifier($objectIdentifier) {
182 175
         $query = $this->createQuery();
183 176
 
184 177
         $constraints = array(
@@ -196,8 +189,7 @@  discard block
 block discarded – undo
196 189
      * @param string $identifier
197 190
      * @return Document
198 191
      */
199
-    public function findByIdentifier($identifier)
200
-    {
192
+    public function findByIdentifier($identifier) {
201 193
         $query = $this->createQuery();
202 194
 
203 195
         if (Identifier::isUid($identifier)) {
@@ -234,8 +226,7 @@  discard block
 block discarded – undo
234 226
      * @param bool $includeSuggestion
235 227
      * @return Document
236 228
      */
237
-    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false)
238
-    {
229
+    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false) {
239 230
         $query = $this->createQuery();
240 231
 
241 232
         if (is_numeric($identifier)) {
@@ -261,8 +252,7 @@  discard block
 block discarded – undo
261 252
      * @param object $modifiedObject The modified object
262 253
      * @throws \Exception
263 254
      */
264
-    public function update($modifiedObject)
265
-    {
255
+    public function update($modifiedObject) {
266 256
         /** @var Document $document */
267 257
         $document = $modifiedObject;
268 258
 
@@ -287,8 +277,7 @@  discard block
 block discarded – undo
287 277
     }
288 278
 
289 279
 
290
-    public function updateCreator()
291
-    {
280
+    public function updateCreator() {
292 281
 
293 282
         $query = $this->createQuery();
294 283
         $query->statement("update tx_dpf_domain_model_document set creator = owner");
@@ -300,8 +289,7 @@  discard block
 block discarded – undo
300 289
      * Finds all records with embargo date
301 290
      * @return mixed
302 291
      */
303
-    public function crossClientEmbargoFindAll()
304
-    {
292
+    public function crossClientEmbargoFindAll() {
305 293
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
306 294
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
307 295
         $querySettings->setRespectStoragePage(false);
@@ -323,8 +311,7 @@  discard block
 block discarded – undo
323 311
      * @param string $identifier
324 312
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
325 313
      */
326
-    public function searchForIdentifier(string $identifier)
327
-    {
314
+    public function searchForIdentifier(string $identifier) {
328 315
         $identifier = str_replace("*", "%", $identifier);
329 316
 
330 317
         $query = $this->createQuery();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
             case Security::ROLE_LIBRARIAN:
41 41
                 $query->matching(
42
-                    $query->equals('suggestion', true)
42
+                    $query->equals('suggestion', TRUE)
43 43
                 );
44 44
                 break;
45 45
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 $query->matching(
48 48
                     $query->logicalAnd(
49 49
                         array(
50
-                            $query->equals('suggestion', true),
50
+                            $query->equals('suggestion', TRUE),
51 51
                             $query->equals('creator', $creatorUid)
52 52
                         )
53 53
                     )
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
      * @param boolean $temporary
62 62
      * @return array
63 63
      */
64
-    public function getObjectIdentifiers($temporary = false)
64
+    public function getObjectIdentifiers($temporary = FALSE)
65 65
     {
66 66
         $query = $this->createQuery();
67 67
 
68 68
         $constraints = array(
69 69
             $query->logicalNot($query->equals('object_identifier', '')),
70
-            $query->logicalNot($query->equals('object_identifier', null))
70
+            $query->logicalNot($query->equals('object_identifier', NULL))
71 71
         );
72 72
 
73 73
         if (count($constraints)) {
74 74
             $constraints[] = $query->logicalAnd(
75 75
                 $query->logicalNot(
76 76
                     $query->logicalOr(
77
-                        $query->equals('temporary', true),
78
-                        $query->equals('suggestion', true)
77
+                        $query->equals('temporary', TRUE),
78
+                        $query->equals('suggestion', TRUE)
79 79
                     )
80 80
                 )
81 81
             );
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
     public function findDocumentsWithoutProcessNumber()
103 103
     {
104 104
         $query = $this->createQuery();
105
-        $query->getQuerySettings()->setRespectStoragePage(false);
105
+        $query->getQuerySettings()->setRespectStoragePage(FALSE);
106 106
 
107 107
         $constraints = array();
108 108
         $constraints[] = $query->equals('process_number', '');
109
-        $constraints[] = $query->equals('process_number', null);
109
+        $constraints[] = $query->equals('process_number', NULL);
110 110
 
111 111
         if (count($constraints)) {
112 112
             $query->matching(
113 113
                 $query->logicalAnd(
114
-                    $query->equals('temporary', false),
114
+                    $query->equals('temporary', FALSE),
115 115
                     $query->logicalOr($constraints)
116 116
                 )
117 117
             );
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $query->matching(
140 140
             $query->logicalAnd(
141
-                $query->equals('temporary', true),
141
+                $query->equals('temporary', TRUE),
142 142
                 $query->logicalOr($constraints)
143 143
             )
144 144
         );
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
 
184 184
         $constraints = array(
185 185
             $query->equals('object_identifier', $objectIdentifier),
186
-            $query->logicalNot($query->equals('temporary', true)),
187
-            $query->logicalNot($query->equals('suggestion', true))
186
+            $query->logicalNot($query->equals('temporary', TRUE)),
187
+            $query->logicalNot($query->equals('suggestion', TRUE))
188 188
         );
189 189
 
190 190
         $query->matching($query->logicalAnd($constraints));
@@ -208,18 +208,18 @@  discard block
 block discarded – undo
208 208
             $constraints = [
209 209
                 $query->logicalAnd(
210 210
                     $query->equals('object_identifier', $identifier),
211
-                    $query->equals('suggestion', false)
211
+                    $query->equals('suggestion', FALSE)
212 212
                 )
213 213
             ];
214 214
         } elseif (Identifier::isProcessNumber($identifier)) {
215 215
             $constraints = [
216 216
                 $query->logicalAnd(
217 217
                     $query->equals('process_number', $identifier),
218
-                    $query->equals('suggestion', false)
218
+                    $query->equals('suggestion', FALSE)
219 219
                 )
220 220
             ];
221 221
         } else {
222
-            return null;
222
+            return NULL;
223 223
         }
224 224
 
225 225
         $query->setOrderings(array("tstamp" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      * @param bool $includeSuggestion
235 235
      * @return Document
236 236
      */
237
-    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false)
237
+    public function findWorkingCopy($identifier, $includeTemporary = FALSE, $includeSuggestion = FALSE)
238 238
     {
239 239
         $query = $this->createQuery();
240 240
 
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
         if (trim($document->getObjectIdentifier()) && !$document->isTemporary() && !$document->isSuggestion()) {
270 270
             $query = $this->createQuery();
271 271
             $constraints[] = $query->equals('object_identifier', trim($document->getObjectIdentifier()));
272
-            $constraints[] = $query->equals('temporary', false);
273
-            $constraints[] = $query->equals('suggestion', false);
272
+            $constraints[] = $query->equals('temporary', FALSE);
273
+            $constraints[] = $query->equals('suggestion', FALSE);
274 274
             $query->matching($query->logicalAnd($constraints));
275 275
 
276 276
             /** @var Document $workingCopy */
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     {
305 305
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
306 306
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
307
-        $querySettings->setRespectStoragePage(false);
307
+        $querySettings->setRespectStoragePage(FALSE);
308 308
         $this->setDefaultQuerySettings($querySettings);
309 309
         $query = $this->createQuery();
310 310
         $query->matching(
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
             $constraints[] =
333 333
                 $query->logicalAnd(
334 334
                     $query->like('uid', $identifier),
335
-                    $query->equals('suggestion', false)
335
+                    $query->equals('suggestion', FALSE)
336 336
                 );
337 337
 
338 338
             $constraints[] =
339 339
                 $query->logicalAnd(
340 340
                     $query->like('object_identifier', $identifier),
341
-                    $query->equals('suggestion', false)
341
+                    $query->equals('suggestion', FALSE)
342 342
                 );
343 343
 
344 344
             $constraints[] =
345 345
                 $query->logicalAnd(
346 346
                     $query->like('process_number', $identifier),
347
-                    $query->equals('suggestion', false)
347
+                    $query->equals('suggestion', FALSE)
348 348
                 );
349 349
 
350 350
         $query->setOrderings(array("tstamp" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
Please login to merge, or discard this patch.