Passed
Pull Request — master (#135)
by
unknown
10:50
created
Classes/ViewHelpers/IsUrnViewHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,16 +14,14 @@
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class IsUrnViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
18
-{
17
+class IsUrnViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
19 18
 
20 19
     /**
21 20
      *
22 21
      * @param string $value
23 22
      * @return string
24 23
      */
25
-    public function render($value)
26
-    {
24
+    public function render($value) {
27 25
 
28 26
         if (strpos(strtolower($value), 'urn') === 0) {
29 27
             return TRUE;
Please login to merge, or discard this patch.
Classes/Controller/SearchController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $objectIdentifiers = $this->documentRepository->getObjectIdentifiers();
58 58
 
59
-        $args          = $this->request->getArguments();
59
+        $args = $this->request->getArguments();
60 60
 
61 61
         // assign result list from elastic search
62 62
         $this->view->assign('searchList', $args['results']);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $results = $this->getResultList($query, $type);
93 93
 
94 94
             $this->view->assign('resultList', $results);
95
-            $this->view->assign('alreadyImported', array());
95
+            $this->view->assign('alreadyImported', array ());
96 96
         } catch (\Exception $exception) {
97 97
             $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR;
98 98
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         // show extended search template
123 123
         $objectIdentifiers = $this->documentRepository->getObjectIdentifiers();
124 124
 
125
-        $args          = $this->request->getArguments();
125
+        $args = $this->request->getArguments();
126 126
 
127 127
         // assign result list from elastic search
128 128
         $this->view->assign('searchList', $args['results']);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         }
167 167
 
168
-        $this->forward("list", null, null, array('results' => $results));
168
+        $this->forward("list", null, null, array ('results' => $results));
169 169
     }
170 170
 
171 171
     /**
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
 
233 233
         if ($extSearch) {
234 234
             // redirect to extended search view
235
-            $this->forward("extendedSearch", null, null, array('results' => $results, 'query' => $args['query']));
235
+            $this->forward("extendedSearch", null, null, array ('results' => $results, 'query' => $args['query']));
236 236
         } else {
237 237
             // redirect to list view
238
-            $this->forward("list", null, null, array('results' => $results, 'query' => $args['query']));
238
+            $this->forward("list", null, null, array ('results' => $results, 'query' => $args['query']));
239 239
         }
240 240
     }
241 241
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
             true
281 281
         );
282 282
 
283
-        $this->forward('updateIndex', null, null, array('documentObjectIdentifier' => $documentObjectIdentifier));
283
+        $this->forward('updateIndex', null, null, array ('documentObjectIdentifier' => $documentObjectIdentifier));
284 284
     }
285 285
 
286 286
     /**
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
             $results = $elasticSearch->search($query, '');
342 342
 
343
-            $searchList = array();
343
+            $searchList = array ();
344 344
 
345 345
             // filter out identical document from the search result list
346 346
             foreach ($results['hits'] as $entry) {
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $client = $this->clientRepository->findAll()->current();
397 397
 
398 398
         // get the latest documents /CREATED_DATE
399
-        $query['body']['sort'] = array('CREATED_DATE' => array('order' => 'desc'));
399
+        $query['body']['sort'] = array ('CREATED_DATE' => array ('order' => 'desc'));
400 400
 
401 401
         // add owner id
402 402
         $query['body']['query']['bool']['must']['term']['OWNER_ID'] = $client->getOwnerId(); // qucosa
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 1 patch
Braces   +55 added lines, -110 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
     }
@@ -148,8 +146,7 @@  discard block
 block discarded – undo
148 146
      *
149 147
      * @return void
150 148
      */
151
-    protected function initStorageObjects()
152
-    {
149
+    protected function initStorageObjects() {
153 150
         $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
154 151
     }
155 152
 
@@ -158,8 +155,7 @@  discard block
 block discarded – undo
158 155
      *
159 156
      * @return string $title
160 157
      */
161
-    public function getTitle()
162
-    {
158
+    public function getTitle() {
163 159
         return $this->title;
164 160
     }
165 161
 
@@ -169,8 +165,7 @@  discard block
 block discarded – undo
169 165
      * @param string $title
170 166
      * @return void
171 167
      */
172
-    public function setTitle($title)
173
-    {
168
+    public function setTitle($title) {
174 169
         $this->title = $title;
175 170
         //htmlspecialchars_decode($title,ENT_QUOTES);
176 171
     }
@@ -180,8 +175,7 @@  discard block
 block discarded – undo
180 175
      *
181 176
      * @return array $authors
182 177
      */
183
-    public function getAuthors()
184
-    {
178
+    public function getAuthors() {
185 179
         return array_map('trim', explode(";", $this->authors));
186 180
     }
187 181
 
@@ -191,8 +185,7 @@  discard block
 block discarded – undo
191 185
      * @param array $authors
192 186
      * @return void
193 187
      */
194
-    public function setAuthors($authors)
195
-    {
188
+    public function setAuthors($authors) {
196 189
         $authors       = implode("; ", $authors);
197 190
         $this->authors = $authors;
198 191
     }
@@ -202,8 +195,7 @@  discard block
 block discarded – undo
202 195
      *
203 196
      * @return string $xmlData
204 197
      */
205
-    public function getXmlData()
206
-    {
198
+    public function getXmlData() {
207 199
         return $this->xmlData;
208 200
     }
209 201
 
@@ -213,8 +205,7 @@  discard block
 block discarded – undo
213 205
      * @param string $xmlData
214 206
      * @return void
215 207
      */
216
-    public function setXmlData($xmlData)
217
-    {
208
+    public function setXmlData($xmlData) {
218 209
         $this->xmlData = $xmlData;
219 210
     }
220 211
 
@@ -223,8 +214,7 @@  discard block
 block discarded – undo
223 214
      *
224 215
      * @return string $slubInfoData
225 216
      */
226
-    public function getSlubInfoData()
227
-    {
217
+    public function getSlubInfoData() {
228 218
         return $this->slubInfoData;
229 219
     }
230 220
 
@@ -233,8 +223,7 @@  discard block
 block discarded – undo
233 223
      *
234 224
      * @return string $slubInfoData
235 225
      */
236
-    public function setSlubInfoData($slubInfoData)
237
-    {
226
+    public function setSlubInfoData($slubInfoData) {
238 227
         $this->slubInfoData = $slubInfoData;
239 228
     }
240 229
 
@@ -243,8 +232,7 @@  discard block
 block discarded – undo
243 232
      *
244 233
      * @return \EWW\Dpf\Domain\Model\DocumentType $documentType
245 234
      */
246
-    public function getDocumentType()
247
-    {
235
+    public function getDocumentType() {
248 236
         return $this->documentType;
249 237
     }
250 238
 
@@ -254,8 +242,7 @@  discard block
 block discarded – undo
254 242
      * @param \EWW\Dpf\Domain\Model\DocumentType $documentType
255 243
      * @return void
256 244
      */
257
-    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType)
258
-    {
245
+    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) {
259 246
         $this->documentType = $documentType;
260 247
     }
261 248
 
@@ -264,8 +251,7 @@  discard block
 block discarded – undo
264 251
      *
265 252
      * @return string
266 253
      */
267
-    public function getObjectIdentifier()
268
-    {
254
+    public function getObjectIdentifier() {
269 255
         return $this->objectIdentifier;
270 256
     }
271 257
 
@@ -275,8 +261,7 @@  discard block
 block discarded – undo
275 261
      * @param string $objectIdentifier
276 262
      * @return void
277 263
      */
278
-    public function setObjectIdentifier($objectIdentifier)
279
-    {
264
+    public function setObjectIdentifier($objectIdentifier) {
280 265
         $this->objectIdentifier = $objectIdentifier;
281 266
     }
282 267
 
@@ -285,8 +270,7 @@  discard block
 block discarded – undo
285 270
      *
286 271
      * @return string
287 272
      */
288
-    public function getReservedObjectIdentifier()
289
-    {
273
+    public function getReservedObjectIdentifier() {
290 274
         return $this->reservedObjectIdentifier;
291 275
     }
292 276
 
@@ -296,8 +280,7 @@  discard block
 block discarded – undo
296 280
      * @param string $reservedObjectIdentifier
297 281
      * @return void
298 282
      */
299
-    public function setReservedObjectIdentifier($reservedObjectIdentifier)
300
-    {
283
+    public function setReservedObjectIdentifier($reservedObjectIdentifier) {
301 284
         $this->reservedObjectIdentifier = $reservedObjectIdentifier;
302 285
     }
303 286
 
@@ -306,8 +289,7 @@  discard block
 block discarded – undo
306 289
      *
307 290
      * @return string
308 291
      */
309
-    public function getState()
310
-    {
292
+    public function getState() {
311 293
         return $this->state;
312 294
     }
313 295
 
@@ -317,8 +299,7 @@  discard block
 block discarded – undo
317 299
      * @param string $state
318 300
      * @return void
319 301
      */
320
-    public function setState($state)
321
-    {
302
+    public function setState($state) {
322 303
         $this->state = $state;
323 304
     }
324 305
 
@@ -327,8 +308,7 @@  discard block
 block discarded – undo
327 308
      *
328 309
      * @return string
329 310
      */
330
-    public function getTransferStatus()
331
-    {
311
+    public function getTransferStatus() {
332 312
         return $this->transferStatus;
333 313
     }
334 314
 
@@ -338,8 +318,7 @@  discard block
 block discarded – undo
338 318
      * @param string
339 319
      * @return void
340 320
      */
341
-    public function setTransferStatus($transferStatus)
342
-    {
321
+    public function setTransferStatus($transferStatus) {
343 322
         $this->transferStatus = $transferStatus;
344 323
     }
345 324
 
@@ -348,8 +327,7 @@  discard block
 block discarded – undo
348 327
      *
349 328
      * @return integer
350 329
      */
351
-    public function getTransferDate()
352
-    {
330
+    public function getTransferDate() {
353 331
         return $this->transferDate;
354 332
     }
355 333
 
@@ -359,8 +337,7 @@  discard block
 block discarded – undo
359 337
      * @param integer $transferDate
360 338
      * @return void
361 339
      */
362
-    public function setTransferDate($transferDate)
363
-    {
340
+    public function setTransferDate($transferDate) {
364 341
         $this->transferDate = $transferDate;
365 342
     }
366 343
 
@@ -369,8 +346,7 @@  discard block
 block discarded – undo
369 346
      *
370 347
      * @var integer
371 348
      */
372
-    public function getTransferErrorCode()
373
-    {
349
+    public function getTransferErrorCode() {
374 350
         return $this->transferErrorCode;
375 351
     }
376 352
 
@@ -380,8 +356,7 @@  discard block
 block discarded – undo
380 356
      * @param integer $transferErrorCode
381 357
      * @return void
382 358
      */
383
-    public function setTransferErrorCode($transferErrorCode)
384
-    {
359
+    public function setTransferErrorCode($transferErrorCode) {
385 360
         $this->transferErrorCode = $transferErrorCode;
386 361
     }
387 362
 
@@ -390,8 +365,7 @@  discard block
 block discarded – undo
390 365
      *
391 366
      * @var string
392 367
      */
393
-    public function getTransferResponse()
394
-    {
368
+    public function getTransferResponse() {
395 369
         return $this->transferResponse;
396 370
     }
397 371
 
@@ -401,8 +375,7 @@  discard block
 block discarded – undo
401 375
      * @param string $transferResponse
402 376
      * @return void
403 377
      */
404
-    public function setTransferResponse($transferResponse)
405
-    {
378
+    public function setTransferResponse($transferResponse) {
406 379
         $this->transferResponse = $transferResponse;
407 380
     }
408 381
 
@@ -411,8 +384,7 @@  discard block
 block discarded – undo
411 384
      *
412 385
      * @var integer
413 386
      */
414
-    public function getTransferHttpStatus()
415
-    {
387
+    public function getTransferHttpStatus() {
416 388
         return $this->transferHttpStatus;
417 389
     }
418 390
 
@@ -422,8 +394,7 @@  discard block
 block discarded – undo
422 394
      * @param integer $transferHttpStatus
423 395
      * @return void
424 396
      */
425
-    public function setTransferHttpStatus($transferHttpStatus)
426
-    {
397
+    public function setTransferHttpStatus($transferHttpStatus) {
427 398
         $this->transferHttpStatus = $transferHttpStatus;
428 399
     }
429 400
 
@@ -433,8 +404,7 @@  discard block
 block discarded – undo
433 404
      * @param \EWW\Dpf\Domain\Model\File $file
434 405
      * @return void
435 406
      */
436
-    public function addFile(\EWW\Dpf\Domain\Model\File $file)
437
-    {
407
+    public function addFile(\EWW\Dpf\Domain\Model\File $file) {
438 408
         $this->file->attach($file);
439 409
     }
440 410
 
@@ -444,8 +414,7 @@  discard block
 block discarded – undo
444 414
      * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed
445 415
      * @return void
446 416
      */
447
-    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove)
448
-    {
417
+    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) {
449 418
         $this->file->detach($fileToRemove);
450 419
     }
451 420
 
@@ -454,8 +423,7 @@  discard block
 block discarded – undo
454 423
      *
455 424
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
456 425
      */
457
-    public function getFile()
458
-    {
426
+    public function getFile() {
459 427
         return $this->file;
460 428
     }
461 429
 
@@ -465,8 +433,7 @@  discard block
 block discarded – undo
465 433
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
466 434
      * @return void
467 435
      */
468
-    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file)
469
-    {
436
+    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) {
470 437
         $this->file = $file;
471 438
     }
472 439
 
@@ -475,8 +442,7 @@  discard block
 block discarded – undo
475 442
      *
476 443
      * @return array
477 444
      */
478
-    public function getFileData()
479
-    {
445
+    public function getFileData() {
480 446
 
481 447
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
482 448
 
@@ -524,8 +490,7 @@  discard block
 block discarded – undo
524 490
      *
525 491
      * @return array
526 492
      */
527
-    public function getCurrentFileData()
528
-    {
493
+    public function getCurrentFileData() {
529 494
 
530 495
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
531 496
 
@@ -573,8 +538,7 @@  discard block
 block discarded – undo
573 538
      *
574 539
      * @return boolean $changed
575 540
      */
576
-    public function getChanged()
577
-    {
541
+    public function getChanged() {
578 542
         return $this->changed;
579 543
     }
580 544
 
@@ -584,8 +548,7 @@  discard block
 block discarded – undo
584 548
      * @param boolean $changed
585 549
      * @return void
586 550
      */
587
-    public function setChanged($changed)
588
-    {
551
+    public function setChanged($changed) {
589 552
         $this->changed = $changed;
590 553
     }
591 554
 
@@ -594,8 +557,7 @@  discard block
 block discarded – undo
594 557
      *
595 558
      * @return boolean $valid
596 559
      */
597
-    public function getValid()
598
-    {
560
+    public function getValid() {
599 561
         return $this->valid;
600 562
     }
601 563
 
@@ -605,8 +567,7 @@  discard block
 block discarded – undo
605 567
      * @param boolean $valid
606 568
      * @return void
607 569
      */
608
-    public function setValid($valid)
609
-    {
570
+    public function setValid($valid) {
610 571
         $this->valid = $valid;
611 572
     }
612 573
 
@@ -615,8 +576,7 @@  discard block
 block discarded – undo
615 576
      *
616 577
      * @return string
617 578
      */
618
-    public function getDateIssued()
619
-    {
579
+    public function getDateIssued() {
620 580
         return empty($this->dateIssued) ? '' : $this->dateIssued;
621 581
     }
622 582
 
@@ -626,8 +586,7 @@  discard block
 block discarded – undo
626 586
      * @param string $dateIssued
627 587
      * @return void
628 588
      */
629
-    public function setDateIssued($dateIssued)
630
-    {
589
+    public function setDateIssued($dateIssued) {
631 590
         $this->dateIssued = empty($dateIssued) ? '' : $dateIssued;
632 591
     }
633 592
 
@@ -636,8 +595,7 @@  discard block
 block discarded – undo
636 595
      *
637 596
      * @return boolean
638 597
      */
639
-    public function isDeleteAllowed()
640
-    {
598
+    public function isDeleteAllowed() {
641 599
         return ($this->state == self::OBJECT_STATE_INACTIVE ||
642 600
             $this->state == self::OBJECT_STATE_ACTIVE) &&
643 601
         !empty($this->objectIdentifier);
@@ -648,8 +606,7 @@  discard block
 block discarded – undo
648 606
      *
649 607
      * @return boolean
650 608
      */
651
-    public function isActive()
652
-    {
609
+    public function isActive() {
653 610
         return $this->state == self::OBJECT_STATE_ACTIVE ||
654 611
         $this->state == self::OBJECT_STATE_NEW ||
655 612
             ($this->state != self::OBJECT_STATE_INACTIVE &&
@@ -662,8 +619,7 @@  discard block
 block discarded – undo
662 619
      *
663 620
      * @return boolean
664 621
      */
665
-    public function isActivationChangeAllowed()
666
-    {
622
+    public function isActivationChangeAllowed() {
667 623
         return $this->state == self::OBJECT_STATE_INACTIVE ||
668 624
         $this->state == self::OBJECT_STATE_ACTIVE;
669 625
     }
@@ -673,8 +629,7 @@  discard block
 block discarded – undo
673 629
      *
674 630
      * @return boolean
675 631
      */
676
-    public function isDeleteRemote()
677
-    {
632
+    public function isDeleteRemote() {
678 633
         return $this->state == self::OBJECT_STATE_LOCALLY_DELETED;
679 634
     }
680 635
 
@@ -683,8 +638,7 @@  discard block
 block discarded – undo
683 638
      *
684 639
      * @return boolean
685 640
      */
686
-    public function isRestoreRemote()
687
-    {
641
+    public function isRestoreRemote() {
688 642
         return $this->state == self::OBJECT_STATE_DELETED;
689 643
     }
690 644
 
@@ -693,8 +647,7 @@  discard block
 block discarded – undo
693 647
      *
694 648
      * @return boolean
695 649
      */
696
-    public function isActivateRemote()
697
-    {
650
+    public function isActivateRemote() {
698 651
         return $this->state == self::OBJECT_STATE_INACTIVE;
699 652
     }
700 653
 
@@ -703,8 +656,7 @@  discard block
 block discarded – undo
703 656
      *
704 657
      * @return boolean
705 658
      */
706
-    public function isInactivateRemote()
707
-    {
659
+    public function isInactivateRemote() {
708 660
         return $this->state == self::OBJECT_STATE_ACTIVE;
709 661
     }
710 662
 
@@ -713,8 +665,7 @@  discard block
 block discarded – undo
713 665
      *
714 666
      * @return boolean
715 667
      */
716
-    public function isIngestRemote()
717
-    {
668
+    public function isIngestRemote() {
718 669
         return ($this->state == self::OBJECT_STATE_NEW || $this->state == self::OBJECT_STATE_ACTIVE) && empty($this->objectIdentifier);
719 670
     }
720 671
 
@@ -723,8 +674,7 @@  discard block
 block discarded – undo
723 674
      *
724 675
      * @return boolean
725 676
      */
726
-    public function isUpdateRemote()
727
-    {
677
+    public function isUpdateRemote() {
728 678
         return ($this->state == self::OBJECT_STATE_ACTIVE || $this->state == self::OBJECT_STATE_INACTIVE) && !empty($this->objectIdentifier);
729 679
     }
730 680
 
@@ -733,8 +683,7 @@  discard block
 block discarded – undo
733 683
      *
734 684
      * @return boolean
735 685
      */
736
-    public function getIsNew()
737
-    {
686
+    public function getIsNew() {
738 687
         return (!$this->changed) && (empty($this->objectIdentifier));
739 688
     }
740 689
 
@@ -744,8 +693,7 @@  discard block
 block discarded – undo
744 693
      *
745 694
      * @return string
746 695
      */
747
-    public function getProcessNumber()
748
-    {
696
+    public function getProcessNumber() {
749 697
         return $this->processNumber;
750 698
     }
751 699
 
@@ -755,8 +703,7 @@  discard block
 block discarded – undo
755 703
      * @param string $processNumber
756 704
      * @return void
757 705
      */
758
-    public function setProcessNumber($processNumber)
759
-    {
706
+    public function setProcessNumber($processNumber) {
760 707
         $this->processNumber = trim($processNumber);
761 708
     }
762 709
 
@@ -766,8 +713,7 @@  discard block
 block discarded – undo
766 713
      *
767 714
      * @return string
768 715
      */
769
-    public function getSubmitterName()
770
-    {
716
+    public function getSubmitterName() {
771 717
         try {
772 718
             $slub = new \EWW\Dpf\Helper\Slub($this->getSlubInfoData());
773 719
             return $slub->getSubmitterName();
@@ -781,8 +727,7 @@  discard block
 block discarded – undo
781 727
      *
782 728
      * @return string
783 729
      */
784
-    public function getQucosaUrn()
785
-    {
730
+    public function getQucosaUrn() {
786 731
         $mods = new \EWW\Dpf\Helper\Mods($this->getXmlData());
787 732
         return $mods->getQucosaUrn();
788 733
     }
Please login to merge, or discard this patch.