Passed
Pull Request — master (#207)
by
unknown
16:03 queued 05:02
created
Classes/Domain/Repository/FileRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,6 +17,5 @@
 block discarded – undo
17 17
 /**
18 18
  * The repository for Files
19 19
  */
20
-class FileRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
21
-{
20
+class FileRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
22 21
 }
Please login to merge, or discard this patch.
Classes/Domain/Model/DocumentFormField.php 1 patch
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class DocumentFormField extends AbstractFormElement
18
-{
17
+class DocumentFormField extends AbstractFormElement {
19 18
     protected $file;
20 19
 
21 20
     protected $value;
@@ -63,13 +62,11 @@  discard block
 block discarded – undo
63 62
      */
64 63
     protected $objectType = '';
65 64
 
66
-    public function getValue()
67
-    {
65
+    public function getValue() {
68 66
         return $this->value;
69 67
     }
70 68
 
71
-    public function setValue($value, $defaultValue = '')
72
-    {
69
+    public function setValue($value, $defaultValue = '') {
73 70
 
74 71
         $this->hasDefaultValue = !empty($defaultValue);
75 72
 
@@ -100,13 +97,11 @@  discard block
 block discarded – undo
100 97
         }
101 98
     }
102 99
 
103
-    public function getInputField()
104
-    {
100
+    public function getInputField() {
105 101
         return $this->inputField;
106 102
     }
107 103
 
108
-    public function setInputField($inputField)
109
-    {
104
+    public function setInputField($inputField) {
110 105
         $this->inputField = $inputField;
111 106
     }
112 107
 
@@ -114,8 +109,7 @@  discard block
 block discarded – undo
114 109
      *
115 110
      * @return array
116 111
      */
117
-    public function getInputOptions()
118
-    {
112
+    public function getInputOptions() {
119 113
         return $this->inputOptions;
120 114
     }
121 115
 
@@ -123,8 +117,7 @@  discard block
 block discarded – undo
123 117
      *
124 118
      * @param \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList
125 119
      */
126
-    public function setInputOptions(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList = null)
127
-    {
120
+    public function setInputOptions(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList = null) {
128 121
 
129 122
         $this->inputOptions = array();
130 123
 
@@ -144,8 +137,7 @@  discard block
 block discarded – undo
144 137
      *
145 138
      * @return string $fillOutService
146 139
      */
147
-    public function getFillOutService()
148
-    {
140
+    public function getFillOutService() {
149 141
         return $this->fillOutService;
150 142
     }
151 143
 
@@ -155,8 +147,7 @@  discard block
 block discarded – undo
155 147
      * @param string $fillOutService
156 148
      * @return void
157 149
      */
158
-    public function setFillOutService($fillOutService)
159
-    {
150
+    public function setFillOutService($fillOutService) {
160 151
         $this->fillOutService = $fillOutService;
161 152
     }
162 153
 
@@ -165,8 +156,7 @@  discard block
 block discarded – undo
165 156
      *
166 157
      * @return boolean $consent
167 158
      */
168
-    public function getConsent()
169
-    {
159
+    public function getConsent() {
170 160
         return $this->consent;
171 161
     }
172 162
 
@@ -176,23 +166,19 @@  discard block
 block discarded – undo
176 166
      * @param boolean $consent
177 167
      * @return void
178 168
      */
179
-    public function setConsent($consent)
180
-    {
169
+    public function setConsent($consent) {
181 170
         $this->consent = boolval($consent);
182 171
     }
183 172
 
184
-    public function getHasDefaultValue()
185
-    {
173
+    public function getHasDefaultValue() {
186 174
         return $this->hasDefaultValue;
187 175
     }
188 176
 
189
-    public function getValidation()
190
-    {
177
+    public function getValidation() {
191 178
         return $this->validation;
192 179
     }
193 180
 
194
-    public function setValidation($validation)
195
-    {
181
+    public function setValidation($validation) {
196 182
         $this->validation = $validation;
197 183
     }
198 184
 
@@ -201,8 +187,7 @@  discard block
 block discarded – undo
201 187
      *
202 188
      * @return string
203 189
      */
204
-    public function getDataType()
205
-    {
190
+    public function getDataType() {
206 191
         return $this->dataType;
207 192
     }
208 193
 
@@ -212,8 +197,7 @@  discard block
 block discarded – undo
212 197
      * @param string $dataType
213 198
      * @return void
214 199
      */
215
-    public function setDataType($dataType)
216
-    {
200
+    public function setDataType($dataType) {
217 201
         $this->dataType = $dataType;
218 202
     }
219 203
 
@@ -275,8 +259,7 @@  discard block
 block discarded – undo
275 259
     /**
276 260
      * @return mixed
277 261
      */
278
-    public function getDepositLicense()
279
-    {
262
+    public function getDepositLicense() {
280 263
         return $this->depositLicense;
281 264
     }
282 265
 
@@ -291,8 +274,7 @@  discard block
 block discarded – undo
291 274
     /**
292 275
      * @return mixed
293 276
      */
294
-    public function getFile()
295
-    {
277
+    public function getFile() {
296 278
         return $this->file;
297 279
     }
298 280
 
Please login to merge, or discard this patch.
Classes/Domain/Model/MetadataObject.php 1 patch
Braces   +42 added lines, -84 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * MetadataObject
19 19
  */
20
-class MetadataObject extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface
21
-{
20
+class MetadataObject extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface {
22 21
 
23 22
     /**
24 23
      * name
@@ -229,8 +228,7 @@  discard block
 block discarded – undo
229 228
      *
230 229
      * @return string $name
231 230
      */
232
-    public function getName()
233
-    {
231
+    public function getName() {
234 232
         return $this->name;
235 233
     }
236 234
 
@@ -240,8 +238,7 @@  discard block
 block discarded – undo
240 238
      * @param string $name
241 239
      * @return void
242 240
      */
243
-    public function setName($name)
244
-    {
241
+    public function setName($name) {
245 242
         $this->name = $name;
246 243
     }
247 244
 
@@ -250,8 +247,7 @@  discard block
 block discarded – undo
250 247
      *
251 248
      * @return string $displayName
252 249
      */
253
-    public function getDisplayName()
254
-    {
250
+    public function getDisplayName() {
255 251
         return $this->displayName;
256 252
     }
257 253
 
@@ -261,8 +257,7 @@  discard block
 block discarded – undo
261 257
      * @param string $displayName
262 258
      * @return void
263 259
      */
264
-    public function setDisplayName($displayName)
265
-    {
260
+    public function setDisplayName($displayName) {
266 261
         $this->displayName = $displayName;
267 262
     }
268 263
 
@@ -271,8 +266,7 @@  discard block
 block discarded – undo
271 266
      *
272 267
      * @return integer $maxIteration
273 268
      */
274
-    public function getMaxIteration()
275
-    {
269
+    public function getMaxIteration() {
276 270
         if ($this->isRepeatable()) {
277 271
             return $this->maxIteration;
278 272
         }
@@ -285,8 +279,7 @@  discard block
 block discarded – undo
285 279
      * @param integer $maxIteration
286 280
      * @return void
287 281
      */
288
-    public function setMaxIteration($maxIteration)
289
-    {
282
+    public function setMaxIteration($maxIteration) {
290 283
         if ($this->isRepeatable()) {
291 284
             $this->maxIteration = $maxIteration;
292 285
         } else {
@@ -299,8 +292,7 @@  discard block
 block discarded – undo
299 292
      *
300 293
      * @return string $mandatory
301 294
      */
302
-    public function getMandatory()
303
-    {
295
+    public function getMandatory() {
304 296
         return $this->mandatory;
305 297
     }
306 298
 
@@ -310,8 +302,7 @@  discard block
 block discarded – undo
310 302
      * @param string $mandatory
311 303
      * @return void
312 304
      */
313
-    public function setMandatory($mandatory)
314
-    {
305
+    public function setMandatory($mandatory) {
315 306
         $this->mandatory = $mandatory;
316 307
     }
317 308
 
@@ -320,8 +311,7 @@  discard block
 block discarded – undo
320 311
      *
321 312
      * @return boolean $modsExtension
322 313
      */
323
-    public function getModsExtension()
324
-    {
314
+    public function getModsExtension() {
325 315
         return $this->modsExtension;
326 316
     }
327 317
 
@@ -331,8 +321,7 @@  discard block
 block discarded – undo
331 321
      * @param boolean $modsExtension
332 322
      * @return void
333 323
      */
334
-    public function setModsExtension($modsExtension)
335
-    {
324
+    public function setModsExtension($modsExtension) {
336 325
         $this->modsExtension = boolval($modsExtension);
337 326
     }
338 327
 
@@ -341,8 +330,7 @@  discard block
 block discarded – undo
341 330
      *
342 331
      * @return boolean
343 332
      */
344
-    public function isModsExtension()
345
-    {
333
+    public function isModsExtension() {
346 334
         return $this->modsExtension;
347 335
     }
348 336
 
@@ -351,8 +339,7 @@  discard block
 block discarded – undo
351 339
      *
352 340
      * @return string $mapping
353 341
      */
354
-    public function getMapping()
355
-    {
342
+    public function getMapping() {
356 343
         return $this->mapping;
357 344
     }
358 345
 
@@ -362,8 +349,7 @@  discard block
 block discarded – undo
362 349
      * @param string $mapping
363 350
      * @return void
364 351
      */
365
-    public function setMapping($mapping)
366
-    {
352
+    public function setMapping($mapping) {
367 353
         $this->mapping = $mapping;
368 354
     }
369 355
 
@@ -372,8 +358,7 @@  discard block
 block discarded – undo
372 358
      *
373 359
      * @return string $relativeMapping
374 360
      */
375
-    public function getRelativeMapping()
376
-    {
361
+    public function getRelativeMapping() {
377 362
         return trim($this->mapping, " /");
378 363
     }
379 364
 
@@ -382,8 +367,7 @@  discard block
 block discarded – undo
382 367
      *
383 368
      * @return integer $inputField
384 369
      */
385
-    public function getInputField()
386
-    {
370
+    public function getInputField() {
387 371
         return $this->inputField;
388 372
     }
389 373
 
@@ -393,8 +377,7 @@  discard block
 block discarded – undo
393 377
      * @param integer $inputField
394 378
      * @return void
395 379
      */
396
-    public function setInputField($inputField)
397
-    {
380
+    public function setInputField($inputField) {
398 381
         $this->inputField = $inputField;
399 382
     }
400 383
 
@@ -403,8 +386,7 @@  discard block
 block discarded – undo
403 386
      *
404 387
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
405 388
      */
406
-    public function getChildren()
407
-    {
389
+    public function getChildren() {
408 390
         return null;
409 391
     }
410 392
 
@@ -413,8 +395,7 @@  discard block
 block discarded – undo
413 395
      *
414 396
      * @return \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList
415 397
      */
416
-    public function getInputOptionList()
417
-    {
398
+    public function getInputOptionList() {
418 399
         return $this->inputOptionList;
419 400
     }
420 401
 
@@ -424,8 +405,7 @@  discard block
 block discarded – undo
424 405
      * @param \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList
425 406
      * @return void
426 407
      */
427
-    public function setInputOptionList(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList)
428
-    {
408
+    public function setInputOptionList(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList) {
429 409
         $this->inputOptionList = $inputOptionList;
430 410
     }
431 411
 
@@ -434,8 +414,7 @@  discard block
 block discarded – undo
434 414
      *
435 415
      * @return string $fillOutService
436 416
      */
437
-    public function getFillOutService()
438
-    {
417
+    public function getFillOutService() {
439 418
         return $this->fillOutService;
440 419
     }
441 420
 
@@ -445,8 +424,7 @@  discard block
 block discarded – undo
445 424
      * @param string $fillOutService
446 425
      * @return void
447 426
      */
448
-    public function setFillOutService($fillOutService)
449
-    {
427
+    public function setFillOutService($fillOutService) {
450 428
         $this->fillOutService = $fillOutService;
451 429
     }
452 430
 
@@ -455,8 +433,7 @@  discard block
 block discarded – undo
455 433
      *
456 434
      * @return array $accessRestrictionRoles
457 435
      */
458
-    public function getAccessRestrictionRoles()
459
-    {
436
+    public function getAccessRestrictionRoles() {
460 437
         if ($this->accessRestrictionRoles) {
461 438
             return array_map('trim', explode(',', $this->accessRestrictionRoles));
462 439
         } else {
@@ -470,8 +447,7 @@  discard block
 block discarded – undo
470 447
      * @param array $accessRestrictionRoles
471 448
      * @return void
472 449
      */
473
-    public function setAccessRestrictionRoles($accessRestrictionRoles)
474
-    {
450
+    public function setAccessRestrictionRoles($accessRestrictionRoles) {
475 451
         $this->accessRestrictionRoles = implode(',', $accessRestrictionRoles);
476 452
     }
477 453
 
@@ -480,8 +456,7 @@  discard block
 block discarded – undo
480 456
      *
481 457
      * @return boolean $consent
482 458
      */
483
-    public function getConsent()
484
-    {
459
+    public function getConsent() {
485 460
         return $this->consent;
486 461
     }
487 462
 
@@ -491,8 +466,7 @@  discard block
 block discarded – undo
491 466
      * @param boolean $consent
492 467
      * @return void
493 468
      */
494
-    public function setConsent($consent)
495
-    {
469
+    public function setConsent($consent) {
496 470
         $this->consent = boolval($consent);
497 471
     }
498 472
 
@@ -501,8 +475,7 @@  discard block
 block discarded – undo
501 475
      *
502 476
      * @return string $defaultValue
503 477
      */
504
-    public function getDefaultValue()
505
-    {
478
+    public function getDefaultValue() {
506 479
         return $this->defaultValue;
507 480
     }
508 481
 
@@ -512,8 +485,7 @@  discard block
 block discarded – undo
512 485
      * @param string $defaultValue
513 486
      * @return void
514 487
      */
515
-    public function setDefaultValue($defaultValue)
516
-    {
488
+    public function setDefaultValue($defaultValue) {
517 489
         $this->defaultValue = $defaultValue;
518 490
     }
519 491
 
@@ -522,8 +494,7 @@  discard block
 block discarded – undo
522 494
      *
523 495
      * @return string $validation
524 496
      */
525
-    public function getValidation()
526
-    {
497
+    public function getValidation() {
527 498
         return $this->validation;
528 499
     }
529 500
 
@@ -533,8 +504,7 @@  discard block
 block discarded – undo
533 504
      * @param string $validation
534 505
      * @return void
535 506
      */
536
-    public function setValidation($validation)
537
-    {
507
+    public function setValidation($validation) {
538 508
         $this->validation = $validation;
539 509
     }
540 510
 
@@ -543,8 +513,7 @@  discard block
 block discarded – undo
543 513
      *
544 514
      * @return string $dataType
545 515
      */
546
-    public function getDataType()
547
-    {
516
+    public function getDataType() {
548 517
         return $this->dataType;
549 518
     }
550 519
 
@@ -554,32 +523,28 @@  discard block
 block discarded – undo
554 523
      * @param string $dataType
555 524
      * @return void
556 525
      */
557
-    public function setDataType($dataType)
558
-    {
526
+    public function setDataType($dataType) {
559 527
         $this->dataType = $dataType;
560 528
     }
561 529
 
562 530
     /**
563 531
      * @return string
564 532
      */
565
-    public function getGndFieldUid()
566
-    {
533
+    public function getGndFieldUid() {
567 534
         return $this->gndFieldUid;
568 535
     }
569 536
 
570 537
     /**
571 538
      * @param string $gndFieldUid
572 539
      */
573
-    public function setGndFieldUid($gndFieldUid)
574
-    {
540
+    public function setGndFieldUid($gndFieldUid) {
575 541
         $this->gndFieldUid = $gndFieldUid;
576 542
     }
577 543
 
578 544
     /**
579 545
      * @return integer
580 546
      */
581
-    public function getMaxInputLength()
582
-    {
547
+    public function getMaxInputLength() {
583 548
         if ($this->maxInputLength == 0) {
584 549
             if ($this->inputField == self::input) {
585 550
                 return 255;
@@ -594,8 +559,7 @@  discard block
 block discarded – undo
594 559
     /**
595 560
      * @return integer
596 561
      */
597
-    public function setMaxInputLength($maxInputLength)
598
-    {
562
+    public function setMaxInputLength($maxInputLength) {
599 563
         $this->maxInputLength = $maxInputLength;
600 564
     }
601 565
 
@@ -610,8 +574,7 @@  discard block
 block discarded – undo
610 574
     /**
611 575
      * @param bool $embargo
612 576
      */
613
-    public function setEmbargo(bool $embargo)
614
-    {
577
+    public function setEmbargo(bool $embargo) {
615 578
         $this->embargo = boolval($embargo);
616 579
     }
617 580
 
@@ -658,8 +621,7 @@  discard block
 block discarded – undo
658 621
     /**
659 622
      * @param string $rorMapping
660 623
      */
661
-    public function setRorMapping(string $rorMapping)
662
-    {
624
+    public function setRorMapping(string $rorMapping) {
663 625
         $this->rorMapping = $rorMapping;
664 626
     }
665 627
 
@@ -797,32 +759,28 @@  discard block
 block discarded – undo
797 759
     /**
798 760
      * @return bool
799 761
      */
800
-    public function isUploadField()
801
-    {
762
+    public function isUploadField() {
802 763
         return $this->getInputField() == self::FILE_UPLOAD;
803 764
     }
804 765
 
805 766
     /**
806 767
      * @return bool
807 768
      */
808
-    public function isFileLabelField()
809
-    {
769
+    public function isFileLabelField() {
810 770
         return $this->getObjectType() == 'fileLabel';
811 771
     }
812 772
 
813 773
     /**
814 774
      * @return bool
815 775
      */
816
-    public function isFileDownloadField()
817
-    {
776
+    public function isFileDownloadField() {
818 777
         return $this->getObjectType() == 'fileDownload';
819 778
     }
820 779
 
821 780
     /**
822 781
      * @return bool
823 782
      */
824
-    public function isFileArchiveField()
825
-    {
783
+    public function isFileArchiveField() {
826 784
         return $this->getObjectType() == 'fileArchive';
827 785
     }
828 786
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 1 patch
Braces   +62 added lines, -124 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * Document
24 24
  */
25
-class Document extends AbstractEntity
26
-{
25
+class Document extends AbstractEntity {
27 26
     // xml data size ist limited to 64 KB
28 27
     const XML_DATA_SIZE_LIMIT = 64 * 1024;
29 28
 
@@ -214,8 +213,7 @@  discard block
 block discarded – undo
214 213
     /**
215 214
      * __construct
216 215
      */
217
-    public function __construct()
218
-    {
216
+    public function __construct() {
219 217
         //Do not remove the next line: It would break the functionality
220 218
         $this->initStorageObjects();
221 219
     }
@@ -225,8 +223,7 @@  discard block
 block discarded – undo
225 223
      *
226 224
      * @return void
227 225
      */
228
-    protected function initStorageObjects()
229
-    {
226
+    protected function initStorageObjects() {
230 227
         $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
231 228
         $this->initCreationDate();
232 229
     }
@@ -236,8 +233,7 @@  discard block
 block discarded – undo
236 233
      *
237 234
      * @return string $title
238 235
      */
239
-    public function getTitle()
240
-    {
236
+    public function getTitle() {
241 237
         return $this->title;
242 238
     }
243 239
 
@@ -247,8 +243,7 @@  discard block
 block discarded – undo
247 243
      * @param string $title
248 244
      * @return void
249 245
      */
250
-    public function setTitle($title)
251
-    {
246
+    public function setTitle($title) {
252 247
         $this->title = $title ?? '';
253 248
         //htmlspecialchars_decode($title,ENT_QUOTES);
254 249
     }
@@ -258,8 +253,7 @@  discard block
 block discarded – undo
258 253
      *
259 254
      * @return array $authors
260 255
      */
261
-    public function getAuthors()
262
-    {
256
+    public function getAuthors() {
263 257
         $authors = @unserialize($this->authors);
264 258
         if (is_array($authors)) {
265 259
             return $authors;
@@ -274,8 +268,7 @@  discard block
 block discarded – undo
274 268
      * @param array $authors
275 269
      * @return void
276 270
      */
277
-    public function setAuthors($authors)
278
-    {
271
+    public function setAuthors($authors) {
279 272
         $this->authors = serialize($authors);
280 273
     }
281 274
 
@@ -284,8 +277,7 @@  discard block
 block discarded – undo
284 277
      *
285 278
      * @return string $xmlData
286 279
      */
287
-    public function getXmlData()
288
-    {
280
+    public function getXmlData() {
289 281
         return $this->xmlData;
290 282
     }
291 283
 
@@ -295,8 +287,7 @@  discard block
 block discarded – undo
295 287
      * @param string $xmlData
296 288
      * @return void
297 289
      */
298
-    public function setXmlData($xmlData)
299
-    {
290
+    public function setXmlData($xmlData) {
300 291
         $this->xmlData = $xmlData;
301 292
     }
302 293
 
@@ -323,8 +314,7 @@  discard block
 block discarded – undo
323 314
      *
324 315
      * @return string $slubInfoData
325 316
      */
326
-    public function getSlubInfoData()
327
-    {
317
+    public function getSlubInfoData() {
328 318
         return $this->slubInfoData;
329 319
     }
330 320
 
@@ -333,8 +323,7 @@  discard block
 block discarded – undo
333 323
      *
334 324
      * @return string $slubInfoData
335 325
      */
336
-    public function setSlubInfoData($slubInfoData)
337
-    {
326
+    public function setSlubInfoData($slubInfoData) {
338 327
         $this->slubInfoData = $slubInfoData;
339 328
     }
340 329
 
@@ -343,8 +332,7 @@  discard block
 block discarded – undo
343 332
      *
344 333
      * @return \EWW\Dpf\Domain\Model\DocumentType $documentType
345 334
      */
346
-    public function getDocumentType()
347
-    {
335
+    public function getDocumentType() {
348 336
         return $this->documentType;
349 337
     }
350 338
 
@@ -354,8 +342,7 @@  discard block
 block discarded – undo
354 342
      * @param \EWW\Dpf\Domain\Model\DocumentType $documentType
355 343
      * @return void
356 344
      */
357
-    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType)
358
-    {
345
+    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) {
359 346
         $this->documentType = $documentType;
360 347
     }
361 348
 
@@ -364,8 +351,7 @@  discard block
 block discarded – undo
364 351
      *
365 352
      * @return string
366 353
      */
367
-    public function getObjectIdentifier()
368
-    {
354
+    public function getObjectIdentifier() {
369 355
         return $this->objectIdentifier;
370 356
     }
371 357
 
@@ -375,8 +361,7 @@  discard block
 block discarded – undo
375 361
      * @param string $objectIdentifier
376 362
      * @return void
377 363
      */
378
-    public function setObjectIdentifier($objectIdentifier)
379
-    {
364
+    public function setObjectIdentifier($objectIdentifier) {
380 365
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
381 366
         $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
382 367
     }
@@ -386,8 +371,7 @@  discard block
 block discarded – undo
386 371
      *
387 372
      * @return string
388 373
      */
389
-    public function getReservedObjectIdentifier()
390
-    {
374
+    public function getReservedObjectIdentifier() {
391 375
         return $this->reservedObjectIdentifier;
392 376
     }
393 377
 
@@ -397,8 +381,7 @@  discard block
 block discarded – undo
397 381
      * @param string $reservedObjectIdentifier
398 382
      * @return void
399 383
      */
400
-    public function setReservedObjectIdentifier($reservedObjectIdentifier)
401
-    {
384
+    public function setReservedObjectIdentifier($reservedObjectIdentifier) {
402 385
         $this->reservedObjectIdentifier = $reservedObjectIdentifier;
403 386
     }
404 387
 
@@ -407,8 +390,7 @@  discard block
 block discarded – undo
407 390
      *
408 391
      * @return string
409 392
      */
410
-    public function getTransferStatus()
411
-    {
393
+    public function getTransferStatus() {
412 394
         return $this->transferStatus;
413 395
     }
414 396
 
@@ -418,8 +400,7 @@  discard block
 block discarded – undo
418 400
      * @param string
419 401
      * @return void
420 402
      */
421
-    public function setTransferStatus($transferStatus)
422
-    {
403
+    public function setTransferStatus($transferStatus) {
423 404
         $this->transferStatus = $transferStatus;
424 405
     }
425 406
 
@@ -428,8 +409,7 @@  discard block
 block discarded – undo
428 409
      *
429 410
      * @return integer
430 411
      */
431
-    public function getTransferDate()
432
-    {
412
+    public function getTransferDate() {
433 413
         return $this->transferDate;
434 414
     }
435 415
 
@@ -439,8 +419,7 @@  discard block
 block discarded – undo
439 419
      * @param integer $transferDate
440 420
      * @return void
441 421
      */
442
-    public function setTransferDate($transferDate)
443
-    {
422
+    public function setTransferDate($transferDate) {
444 423
         $this->transferDate = $transferDate;
445 424
     }
446 425
 
@@ -449,8 +428,7 @@  discard block
 block discarded – undo
449 428
      *
450 429
      * @var integer
451 430
      */
452
-    public function getTransferErrorCode()
453
-    {
431
+    public function getTransferErrorCode() {
454 432
         return $this->transferErrorCode;
455 433
     }
456 434
 
@@ -460,8 +438,7 @@  discard block
 block discarded – undo
460 438
      * @param integer $transferErrorCode
461 439
      * @return void
462 440
      */
463
-    public function setTransferErrorCode($transferErrorCode)
464
-    {
441
+    public function setTransferErrorCode($transferErrorCode) {
465 442
         $this->transferErrorCode = $transferErrorCode;
466 443
     }
467 444
 
@@ -470,8 +447,7 @@  discard block
 block discarded – undo
470 447
      *
471 448
      * @var string
472 449
      */
473
-    public function getTransferResponse()
474
-    {
450
+    public function getTransferResponse() {
475 451
         return $this->transferResponse;
476 452
     }
477 453
 
@@ -481,8 +457,7 @@  discard block
 block discarded – undo
481 457
      * @param string $transferResponse
482 458
      * @return void
483 459
      */
484
-    public function setTransferResponse($transferResponse)
485
-    {
460
+    public function setTransferResponse($transferResponse) {
486 461
         $this->transferResponse = $transferResponse;
487 462
     }
488 463
 
@@ -491,8 +466,7 @@  discard block
 block discarded – undo
491 466
      *
492 467
      * @var integer
493 468
      */
494
-    public function getTransferHttpStatus()
495
-    {
469
+    public function getTransferHttpStatus() {
496 470
         return $this->transferHttpStatus;
497 471
     }
498 472
 
@@ -502,8 +476,7 @@  discard block
 block discarded – undo
502 476
      * @param integer $transferHttpStatus
503 477
      * @return void
504 478
      */
505
-    public function setTransferHttpStatus($transferHttpStatus)
506
-    {
479
+    public function setTransferHttpStatus($transferHttpStatus) {
507 480
         $this->transferHttpStatus = $transferHttpStatus;
508 481
     }
509 482
 
@@ -513,8 +486,7 @@  discard block
 block discarded – undo
513 486
      * @param \EWW\Dpf\Domain\Model\File $file
514 487
      * @return void
515 488
      */
516
-    public function addFile(\EWW\Dpf\Domain\Model\File $file)
517
-    {
489
+    public function addFile(\EWW\Dpf\Domain\Model\File $file) {
518 490
         $this->file->attach($file);
519 491
     }
520 492
 
@@ -524,8 +496,7 @@  discard block
 block discarded – undo
524 496
      * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed
525 497
      * @return void
526 498
      */
527
-    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove)
528
-    {
499
+    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) {
529 500
         $this->file->detach($fileToRemove);
530 501
     }
531 502
 
@@ -534,8 +505,7 @@  discard block
 block discarded – undo
534 505
      *
535 506
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
536 507
      */
537
-    public function getFile()
538
-    {
508
+    public function getFile() {
539 509
         return $this->file;
540 510
     }
541 511
 
@@ -545,8 +515,7 @@  discard block
 block discarded – undo
545 515
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
546 516
      * @return void
547 517
      */
548
-    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file)
549
-    {
518
+    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) {
550 519
         $this->file = $file;
551 520
     }
552 521
 
@@ -581,8 +550,7 @@  discard block
 block discarded – undo
581 550
     /**
582 551
      * Has files
583 552
      */
584
-    public function hasFiles()
585
-    {
553
+    public function hasFiles() {
586 554
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
587 555
             foreach ($this->getFile() as $file) {
588 556
                 /** @var File $file */
@@ -600,8 +568,7 @@  discard block
 block discarded – undo
600 568
      *
601 569
      * @return boolean $changed
602 570
      */
603
-    public function getChanged()
604
-    {
571
+    public function getChanged() {
605 572
         return $this->changed;
606 573
     }
607 574
 
@@ -611,8 +578,7 @@  discard block
 block discarded – undo
611 578
      * @param boolean $changed
612 579
      * @return void
613 580
      */
614
-    public function setChanged($changed)
615
-    {
581
+    public function setChanged($changed) {
616 582
         $this->changed = boolval($changed);
617 583
     }
618 584
 
@@ -621,8 +587,7 @@  discard block
 block discarded – undo
621 587
      *
622 588
      * @return boolean $valid
623 589
      */
624
-    public function getValid()
625
-    {
590
+    public function getValid() {
626 591
         return $this->valid;
627 592
     }
628 593
 
@@ -632,8 +597,7 @@  discard block
 block discarded – undo
632 597
      * @param boolean $valid
633 598
      * @return void
634 599
      */
635
-    public function setValid($valid)
636
-    {
600
+    public function setValid($valid) {
637 601
         $this->valid = boolval($valid);
638 602
     }
639 603
 
@@ -642,8 +606,7 @@  discard block
 block discarded – undo
642 606
      *
643 607
      * @return string
644 608
      */
645
-    public function getDateIssued()
646
-    {
609
+    public function getDateIssued() {
647 610
         return empty($this->dateIssued) ? '' : $this->dateIssued;
648 611
     }
649 612
 
@@ -653,8 +616,7 @@  discard block
 block discarded – undo
653 616
      * @param string $dateIssued
654 617
      * @return void
655 618
      */
656
-    public function setDateIssued($dateIssued)
657
-    {
619
+    public function setDateIssued($dateIssued) {
658 620
         $this->dateIssued = empty($dateIssued) ? '' : $dateIssued;
659 621
     }
660 622
 
@@ -664,8 +626,7 @@  discard block
 block discarded – undo
664 626
      *
665 627
      * @return string
666 628
      */
667
-    public function getProcessNumber()
668
-    {
629
+    public function getProcessNumber() {
669 630
         return $this->processNumber;
670 631
     }
671 632
 
@@ -675,8 +636,7 @@  discard block
 block discarded – undo
675 636
      * @param string $processNumber
676 637
      * @return void
677 638
      */
678
-    public function setProcessNumber($processNumber)
679
-    {
639
+    public function setProcessNumber($processNumber) {
680 640
         $this->processNumber = trim($processNumber);
681 641
     }
682 642
 
@@ -686,8 +646,7 @@  discard block
 block discarded – undo
686 646
      *
687 647
      * @return string
688 648
      */
689
-    public function getSubmitterName()
690
-    {
649
+    public function getSubmitterName() {
691 650
         try {
692 651
             $internalFormat = new InternalFormat($this->getXmlData());
693 652
             return $internalFormat->getSubmitterName();
@@ -701,8 +660,7 @@  discard block
 block discarded – undo
701 660
      *
702 661
      * @return string
703 662
      */
704
-    public function getPrimaryUrn()
705
-    {
663
+    public function getPrimaryUrn() {
706 664
         $internalFormat = new InternalFormat($this->getXmlData());
707 665
         return $internalFormat->getPrimaryUrn();
708 666
     }
@@ -712,8 +670,7 @@  discard block
 block discarded – undo
712 670
      *
713 671
      * @return int
714 672
      */
715
-    public function getCreator()
716
-    {
673
+    public function getCreator() {
717 674
         return $this->creator? $this->creator : 0;
718 675
     }
719 676
 
@@ -723,24 +680,20 @@  discard block
 block discarded – undo
723 680
      * @param int $creator
724 681
      * @return void
725 682
      */
726
-    public function setCreator($creator)
727
-    {
683
+    public function setCreator($creator) {
728 684
         $this->creator = $creator;
729 685
     }
730 686
 
731
-    public function getState()
732
-    {
687
+    public function getState() {
733 688
         return $this->state;
734 689
     }
735 690
 
736
-    public function setState($state)
737
-    {
691
+    public function setState($state) {
738 692
         $this->stateChange = $this->state != $state;
739 693
         $this->state = $state;
740 694
     }
741 695
 
742
-    public function getRemoteState()
743
-    {
696
+    public function getRemoteState() {
744 697
         $state = explode(':', $this->state);
745 698
         if (is_array($state) && array_key_exists(1, $state)) {
746 699
             return $state[1];
@@ -778,8 +731,7 @@  discard block
 block discarded – undo
778 731
     /**
779 732
      * @return string
780 733
      */
781
-    public function getRemoteLastModDate()
782
-    {
734
+    public function getRemoteLastModDate() {
783 735
         return $this->remoteLastModDate;
784 736
     }
785 737
 
@@ -787,24 +739,21 @@  discard block
 block discarded – undo
787 739
      * @param string $remoteLastModDate
788 740
      * @return void
789 741
      */
790
-    public function setRemoteLastModDate($remoteLastModDate)
791
-    {
742
+    public function setRemoteLastModDate($remoteLastModDate) {
792 743
         $this->remoteLastModDate = $remoteLastModDate;
793 744
     }
794 745
 
795 746
     /**
796 747
      * @return integer
797 748
      */
798
-    public function getTstamp()
799
-    {
749
+    public function getTstamp() {
800 750
         return $this->tstamp;
801 751
     }
802 752
 
803 753
     /**
804 754
      * @return integer
805 755
      */
806
-    public function getCrdate()
807
-    {
756
+    public function getCrdate() {
808 757
         return $this->crdate;
809 758
     }
810 759
 
@@ -819,8 +768,7 @@  discard block
 block discarded – undo
819 768
     /**
820 769
      * @param bool $suggestion
821 770
      */
822
-    public function setSuggestion(bool $suggestion)
823
-    {
771
+    public function setSuggestion(bool $suggestion) {
824 772
         $this->suggestion = boolval($suggestion);
825 773
     }
826 774
 
@@ -835,8 +783,7 @@  discard block
 block discarded – undo
835 783
     /**
836 784
      * @param string $linkedUid
837 785
      */
838
-    public function setLinkedUid(string $linkedUid)
839
-    {
786
+    public function setLinkedUid(string $linkedUid) {
840 787
         $this->linkedUid = $linkedUid;
841 788
     }
842 789
 
@@ -851,8 +798,7 @@  discard block
 block discarded – undo
851 798
     /**
852 799
      * @param string $comment
853 800
      */
854
-    public function setComment(string $comment)
855
-    {
801
+    public function setComment(string $comment) {
856 802
         $this->comment = $comment;
857 803
     }
858 804
 
@@ -889,8 +835,7 @@  discard block
 block discarded – undo
889 835
      *
890 836
      * @return string|int
891 837
      */
892
-    public function getDocumentIdentifier()
893
-    {
838
+    public function getDocumentIdentifier() {
894 839
         return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
895 840
     }
896 841
 
@@ -899,8 +844,7 @@  discard block
 block discarded – undo
899 844
      *
900 845
      * @return bool
901 846
      */
902
-    public function isWorkingCopy()
903
-    {
847
+    public function isWorkingCopy() {
904 848
         return $this->getObjectIdentifier() && !$this->isTemporary() && !$this->isSuggestion();
905 849
     }
906 850
 
@@ -910,8 +854,7 @@  discard block
 block discarded – undo
910 854
      *
911 855
      * @return bool
912 856
      */
913
-    public function isTemporaryCopy()
914
-    {
857
+    public function isTemporaryCopy() {
915 858
         return $this->getObjectIdentifier() && $this->isTemporary() && !$this->isSuggestion();
916 859
     }
917 860
 
@@ -921,8 +864,7 @@  discard block
 block discarded – undo
921 864
      *
922 865
      * @return string|null
923 866
      */
924
-    public function getPublicationYear()
925
-    {
867
+    public function getPublicationYear() {
926 868
         $internalFormat = new InternalFormat($this->getXmlData());
927 869
         $year =  $internalFormat->getPublishingYear();
928 870
         return $year? $year : "";
@@ -934,8 +876,7 @@  discard block
 block discarded – undo
934 876
      *
935 877
      * @return string|null
936 878
      */
937
-    public function getSourceDetails()
938
-    {
879
+    public function getSourceDetails() {
939 880
         $internalFormat = new InternalFormat($this->getXmlData());
940 881
         $data = $internalFormat->getSourceDetails();
941 882
         return $data;
@@ -952,8 +893,7 @@  discard block
 block discarded – undo
952 893
     /**
953 894
      * @param \DateTime|null $embargoDate
954 895
      */
955
-    public function setEmbargoDate(?\DateTime $embargoDate)
956
-    {
896
+    public function setEmbargoDate(?\DateTime $embargoDate) {
957 897
         $this->embargoDate = $embargoDate;
958 898
     }
959 899
 
@@ -976,8 +916,7 @@  discard block
 block discarded – undo
976 916
     /**
977 917
      * @return array
978 918
      */
979
-    public function getPreviouslyAssignedFobIdentifiers()
980
-    {
919
+    public function getPreviouslyAssignedFobIdentifiers() {
981 920
         return array_diff(
982 921
             $this->getAssignedFobIdentifiers(), $this->getNewlyAssignedFobIdentifiers()
983 922
         );
@@ -1003,8 +942,7 @@  discard block
 block discarded – undo
1003 942
     /**
1004 943
      * @return mixed
1005 944
      */
1006
-    public function getDepositLicense()
1007
-    {
945
+    public function getDepositLicense() {
1008 946
         $internalFormat = new InternalFormat($this->getXmlData());
1009 947
         $data = $internalFormat->getDepositLicense();
1010 948
         return $data;
Please login to merge, or discard this patch.
Classes/Domain/Model/DocumentForm.php 1 patch
Braces   +24 added lines, -48 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  * The TYPO3 project - inspiring people to share!
20 20
  */
21 21
 
22
-class DocumentForm extends AbstractFormElement
23
-{
22
+class DocumentForm extends AbstractFormElement {
24 23
 
25 24
     /**
26 25
      * @var string CSRF token for this form
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
      *
85 84
      * @param string $csrfToken
86 85
      */
87
-    public function generateCsrfToken()
88
-    {
86
+    public function generateCsrfToken() {
89 87
         $formProtection = FormProtectionFactory::get();
90 88
         $this->csrfToken = $formProtection->generateToken('DocumentForm', 'construct', 'DocumentForm');
91 89
         $formProtection->persistSessionToken();
@@ -100,10 +98,8 @@  discard block
 block discarded – undo
100 98
      * @throws Exception if the given string is empty.
101 99
      * @throws TypeError if the given string is null
102 100
      */
103
-    public function setCsrfToken(string $csrfToken)
104
-    {
105
-        if ($csrfToken === "")
106
-        {
101
+    public function setCsrfToken(string $csrfToken) {
102
+        if ($csrfToken === "") {
107 103
             throw new Exception("A forms CSRF token cannot be empty");
108 104
         }
109 105
         $this->csrfToken = $csrfToken;
@@ -115,8 +111,7 @@  discard block
 block discarded – undo
115 111
      *
116 112
      * @return string CSRF token for this form
117 113
      */
118
-    public function getCsrfToken()
119
-    {
114
+    public function getCsrfToken() {
120 115
         return $this->csrfToken;
121 116
     }
122 117
 
@@ -126,8 +121,7 @@  discard block
 block discarded – undo
126 121
      *
127 122
      * @return bool True, is CSRF token is considered valid. False if the token is invalid or missing.
128 123
      */
129
-    public function hasValidCsrfToken()
130
-    {
124
+    public function hasValidCsrfToken() {
131 125
         $formProtection = FormProtectionFactory::get();
132 126
         return $formProtection->validateToken($this->csrfToken, 'DocumentForm', 'construct', 'DocumentForm');
133 127
     }
@@ -136,8 +130,7 @@  discard block
 block discarded – undo
136 130
      *
137 131
      * @return integer
138 132
      */
139
-    public function getDocumentUid()
140
-    {
133
+    public function getDocumentUid() {
141 134
         return $this->documentUid;
142 135
     }
143 136
 
@@ -145,8 +138,7 @@  discard block
 block discarded – undo
145 138
      *
146 139
      * @param integer $documentUid
147 140
      */
148
-    public function setDocumentUid($documentUid)
149
-    {
141
+    public function setDocumentUid($documentUid) {
150 142
         $this->documentUid = $documentUid;
151 143
     }
152 144
 
@@ -154,8 +146,7 @@  discard block
 block discarded – undo
154 146
      *
155 147
      * @return boolean
156 148
      */
157
-    public function getPrimaryFileMandatory()
158
-    {
149
+    public function getPrimaryFileMandatory() {
159 150
         return $this->primaryFileMandatory;
160 151
     }
161 152
 
@@ -163,8 +154,7 @@  discard block
 block discarded – undo
163 154
      *
164 155
      * @param boolean $primaryFileMandatory
165 156
      */
166
-    public function setPrimaryFileMandatory($primaryFileMandatory)
167
-    {
157
+    public function setPrimaryFileMandatory($primaryFileMandatory) {
168 158
         $this->primaryFileMandatory = boolval($primaryFileMandatory);
169 159
     }
170 160
 
@@ -172,8 +162,7 @@  discard block
 block discarded – undo
172 162
      *
173 163
      * @return string
174 164
      */
175
-    public function getFedoraPid()
176
-    {
165
+    public function getFedoraPid() {
177 166
         return $this->fedoraPid;
178 167
     }
179 168
 
@@ -181,44 +170,37 @@  discard block
 block discarded – undo
181 170
      *
182 171
      * @param string $fedoraPid
183 172
      */
184
-    public function setFedoraPid($fedoraPid)
185
-    {
173
+    public function setFedoraPid($fedoraPid) {
186 174
         $this->fedoraPid = $fedoraPid;
187 175
     }
188 176
 
189
-    public function getFiles()
190
-    {
177
+    public function getFiles() {
191 178
         return $this->files;
192 179
     }
193 180
 
194
-    public function setFiles($files)
195
-    {
181
+    public function setFiles($files) {
196 182
         $this->files = $files;
197 183
     }
198 184
 
199
-    public function addFile($file)
200
-    {
185
+    public function addFile($file) {
201 186
         $this->files[] = $file;
202 187
     }
203 188
 
204 189
     /**
205 190
      * @return bool
206 191
      */
207
-    public function getValid()
208
-    {
192
+    public function getValid() {
209 193
         return $this->valid;
210 194
     }
211 195
 
212 196
     /**
213 197
      * @param bool $valid
214 198
      */
215
-    public function setValid($valid)
216
-    {
199
+    public function setValid($valid) {
217 200
         $this->valid = boolval($valid);
218 201
     }
219 202
 
220
-    public function getFileNames()
221
-    {
203
+    public function getFileNames() {
222 204
         $fileNames = array();
223 205
         foreach ($this->getFiles() as $file) {
224 206
             $fileNames[] = $file->getTitle();
@@ -231,8 +213,7 @@  discard block
 block discarded – undo
231 213
      *
232 214
      * @return string
233 215
      */
234
-    public function getProcessNumber()
235
-    {
216
+    public function getProcessNumber() {
236 217
         return $this->processNumber;
237 218
     }
238 219
 
@@ -241,8 +222,7 @@  discard block
 block discarded – undo
241 222
      *
242 223
      * @param string $processNumber
243 224
      */
244
-    public function setProcessNumber($processNumber)
245
-    {
225
+    public function setProcessNumber($processNumber) {
246 226
         $this->processNumber = $processNumber;
247 227
     }
248 228
 
@@ -251,8 +231,7 @@  discard block
 block discarded – undo
251 231
      *
252 232
      * @return bool
253 233
      */
254
-    public function isTemporary()
255
-    {
234
+    public function isTemporary() {
256 235
         return $this->temporary;
257 236
     }
258 237
 
@@ -260,24 +239,21 @@  discard block
 block discarded – undo
260 239
      * Sets if a document is a temporary document or not.
261 240
      * @param bool $temporary
262 241
      */
263
-    public function setTemporary($temporary)
264
-    {
242
+    public function setTemporary($temporary) {
265 243
         $this->temporary = boolval($temporary);
266 244
     }
267 245
 
268 246
     /**
269 247
      * @return string
270 248
      */
271
-    public function getComment()
272
-    {
249
+    public function getComment() {
273 250
         return $this->comment;
274 251
     }
275 252
 
276 253
     /**
277 254
      * @param string $comment
278 255
      */
279
-    public function setComment($comment)
280
-    {
256
+    public function setComment($comment) {
281 257
         $this->comment = $comment;
282 258
     }
283 259
 }
Please login to merge, or discard this patch.
Classes/Domain/Model/DocumentFormGroup.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class DocumentFormGroup extends AbstractFormElement
18
-{
17
+class DocumentFormGroup extends AbstractFormElement {
19 18
 
20 19
     /**
21 20
      * infoText
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
      *
50 49
      * @return string $infoText
51 50
      */
52
-    public function getInfoText()
53
-    {
51
+    public function getInfoText() {
54 52
         return $this->infoText;
55 53
     }
56 54
 
@@ -60,24 +58,21 @@  discard block
 block discarded – undo
60 58
      * @param string $infoText
61 59
      * @return void
62 60
      */
63
-    public function setInfoText($infoText)
64
-    {
61
+    public function setInfoText($infoText) {
65 62
         $this->infoText = $infoText;
66 63
     }
67 64
 
68 65
     /**
69 66
      * @return mixed
70 67
      */
71
-    public function getGroupType()
72
-    {
68
+    public function getGroupType() {
73 69
         return $this->groupType;
74 70
     }
75 71
 
76 72
     /**
77 73
      * @param mixed $groupType
78 74
      */
79
-    public function setGroupType($groupType)
80
-    {
75
+    public function setGroupType($groupType) {
81 76
         $this->groupType = $groupType;
82 77
     }
83 78
 
@@ -132,8 +127,7 @@  discard block
 block discarded – undo
132 127
     /**
133 128
      * @param mixed $groupType
134 129
      */
135
-    public function isPrimaryFileGroup()
136
-    {
130
+    public function isPrimaryFileGroup() {
137 131
         return $this->groupType == 'primary_file';
138 132
     }
139 133
 
Please login to merge, or discard this patch.
Classes/Domain/Model/MetadataGroup.php 1 patch
Braces   +40 added lines, -80 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * MetadataGroup
19 19
  */
20
-class MetadataGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface
21
-{
20
+class MetadataGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface {
22 21
 
23 22
     /**
24 23
      * name
@@ -124,8 +123,7 @@  discard block
 block discarded – undo
124 123
     /**
125 124
      * __construct
126 125
      */
127
-    public function __construct()
128
-    {
126
+    public function __construct() {
129 127
         //Do not remove the next line: It would break the functionality
130 128
         $this->initStorageObjects();
131 129
     }
@@ -135,8 +133,7 @@  discard block
 block discarded – undo
135 133
      *
136 134
      * @return void
137 135
      */
138
-    protected function initStorageObjects()
139
-    {
136
+    protected function initStorageObjects() {
140 137
         $this->metadataObject = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
141 138
     }
142 139
 
@@ -145,8 +142,7 @@  discard block
 block discarded – undo
145 142
      *
146 143
      * @return string $name
147 144
      */
148
-    public function getName()
149
-    {
145
+    public function getName() {
150 146
         return $this->name;
151 147
     }
152 148
 
@@ -156,8 +152,7 @@  discard block
 block discarded – undo
156 152
      * @param string $name
157 153
      * @return void
158 154
      */
159
-    public function setName($name)
160
-    {
155
+    public function setName($name) {
161 156
         $this->name = $name;
162 157
     }
163 158
 
@@ -166,8 +161,7 @@  discard block
 block discarded – undo
166 161
      *
167 162
      * @return string $displayName
168 163
      */
169
-    public function getDisplayName()
170
-    {
164
+    public function getDisplayName() {
171 165
         return $this->displayName;
172 166
     }
173 167
 
@@ -177,8 +171,7 @@  discard block
 block discarded – undo
177 171
      * @param string $displayName
178 172
      * @return void
179 173
      */
180
-    public function setDisplayName($displayName)
181
-    {
174
+    public function setDisplayName($displayName) {
182 175
         $this->displayName = $displayName;
183 176
     }
184 177
 
@@ -187,8 +180,7 @@  discard block
 block discarded – undo
187 180
      *
188 181
      * @return string $mandatory
189 182
      */
190
-    public function getMandatory()
191
-    {
183
+    public function getMandatory() {
192 184
         return $this->mandatory;
193 185
     }
194 186
 
@@ -198,8 +190,7 @@  discard block
 block discarded – undo
198 190
      * @param string $mandatory
199 191
      * @return void
200 192
      */
201
-    public function setMandatory($mandatory)
202
-    {
193
+    public function setMandatory($mandatory) {
203 194
         $this->mandatory = $mandatory;
204 195
     }
205 196
 
@@ -208,8 +199,7 @@  discard block
 block discarded – undo
208 199
      *
209 200
      * @return string $mapping
210 201
      */
211
-    public function getMapping()
212
-    {
202
+    public function getMapping() {
213 203
         return $this->mapping;
214 204
     }
215 205
 
@@ -219,8 +209,7 @@  discard block
 block discarded – undo
219 209
      * @param string $mapping
220 210
      * @return void
221 211
      */
222
-    public function setMapping($mapping)
223
-    {
212
+    public function setMapping($mapping) {
224 213
         $this->mapping = $mapping;
225 214
     }
226 215
 
@@ -229,8 +218,7 @@  discard block
 block discarded – undo
229 218
      *
230 219
      * @return string $mappingForReading
231 220
      */
232
-    public function getMappingForReading()
233
-    {
221
+    public function getMappingForReading() {
234 222
         return $this->mappingForReading;
235 223
     }
236 224
 
@@ -240,8 +228,7 @@  discard block
 block discarded – undo
240 228
      * @param string $mappingForReading
241 229
      * @return void
242 230
      */
243
-    public function setMappingForReading($mappingForReading)
244
-    {
231
+    public function setMappingForReading($mappingForReading) {
245 232
         $this->mappingForReading = $mappingForReading;
246 233
     }
247 234
 
@@ -250,8 +237,7 @@  discard block
 block discarded – undo
250 237
      *
251 238
      * @return bool
252 239
      */
253
-    public function hasMappingForReading()
254
-    {
240
+    public function hasMappingForReading() {
255 241
         $mapping = trim($this->mappingForReading);
256 242
         return !empty($mapping);
257 243
     }
@@ -262,8 +248,7 @@  discard block
 block discarded – undo
262 248
      * @param $mapping
263 249
      * @return string $relativeMapping
264 250
      */
265
-    protected function relativeMapping($mapping)
266
-    {
251
+    protected function relativeMapping($mapping) {
267 252
         return trim($mapping, " /");
268 253
     }
269 254
 
@@ -272,8 +257,7 @@  discard block
 block discarded – undo
272 257
      *
273 258
      * @return string $relativeMappingForWriting
274 259
      */
275
-    public function getRelativeMapping()
276
-    {
260
+    public function getRelativeMapping() {
277 261
         return $this->relativeMapping($this->mapping);
278 262
     }
279 263
 
@@ -282,8 +266,7 @@  discard block
 block discarded – undo
282 266
      *
283 267
      * @return string $relativeMappingForReading
284 268
      */
285
-    public function getRelativeMappingForReading()
286
-    {
269
+    public function getRelativeMappingForReading() {
287 270
         return $this->relativeMapping($this->mappingForReading);
288 271
     }
289 272
 
@@ -292,8 +275,7 @@  discard block
 block discarded – undo
292 275
      *
293 276
      * @return string $absoluteMappingForWriting
294 277
      */
295
-    public function getAbsoluteMapping()
296
-    {
278
+    public function getAbsoluteMapping() {
297 279
         return "/data/" . $this->getRelativeMapping();
298 280
     }
299 281
 
@@ -302,8 +284,7 @@  discard block
 block discarded – undo
302 284
      *
303 285
      * @return string $absoluteMappingForReading
304 286
      */
305
-    public function getAbsoluteMappingForReading()
306
-    {
287
+    public function getAbsoluteMappingForReading() {
307 288
         return "/data/" . $this->getRelativeMappingForReading();
308 289
     }
309 290
 
@@ -312,8 +293,7 @@  discard block
 block discarded – undo
312 293
      *
313 294
      * @return string $modsExtensionMapping
314 295
      */
315
-    public function getModsExtensionMapping()
316
-    {
296
+    public function getModsExtensionMapping() {
317 297
         return $this->modsExtensionMapping;
318 298
     }
319 299
 
@@ -323,8 +303,7 @@  discard block
 block discarded – undo
323 303
      * @param string $modsExtensionMapping
324 304
      * @return void
325 305
      */
326
-    public function setModsExtensionMapping($modsExtensionMapping)
327
-    {
306
+    public function setModsExtensionMapping($modsExtensionMapping) {
328 307
         $this->modsExtensionMapping = $modsExtensionMapping;
329 308
     }
330 309
 
@@ -333,8 +312,7 @@  discard block
 block discarded – undo
333 312
      *
334 313
      * @return string $relativeModsExtensionMapping
335 314
      */
336
-    public function getRelativeModsExtensionMapping()
337
-    {
315
+    public function getRelativeModsExtensionMapping() {
338 316
 //        $modsRegExp = "/^.*?mods:mods/i";
339 317
 //        $mapping    = preg_replace($modsRegExp, "", $this->modsExtensionMapping);
340 318
         return trim($this->modsExtensionMapping, " /");
@@ -345,8 +323,7 @@  discard block
 block discarded – undo
345 323
      *
346 324
      * @return string $absoluteModsExtensionMapping
347 325
      */
348
-    public function getAbsoluteModsExtensionMapping()
349
-    {
326
+    public function getAbsoluteModsExtensionMapping() {
350 327
         return "/data/" . $this->getRelativeModsExtensionMapping();
351 328
     }
352 329
 
@@ -356,8 +333,7 @@  discard block
 block discarded – undo
356 333
      * @param string $modsExtensionReference
357 334
      * @return void
358 335
      */
359
-    public function setModsExtensionReference($modsExtensionReference)
360
-    {
336
+    public function setModsExtensionReference($modsExtensionReference) {
361 337
         $this->modsExtensionReference = $modsExtensionReference;
362 338
     }
363 339
 
@@ -366,8 +342,7 @@  discard block
 block discarded – undo
366 342
      *
367 343
      * @return string $modsExtensionReference
368 344
      */
369
-    public function getModsExtensionReference()
370
-    {
345
+    public function getModsExtensionReference() {
371 346
         return $this->modsExtensionReference;
372 347
     }
373 348
 
@@ -376,8 +351,7 @@  discard block
 block discarded – undo
376 351
      *
377 352
      * @return integer $maxIteration
378 353
      */
379
-    public function getMaxIteration()
380
-    {
354
+    public function getMaxIteration() {
381 355
         if ($this->isPrimaryFileGroup()) {
382 356
             return 1;
383 357
         }
@@ -390,8 +364,7 @@  discard block
 block discarded – undo
390 364
      * @param integer $maxIteration
391 365
      * @return void
392 366
      */
393
-    public function setMaxIteration($maxIteration)
394
-    {
367
+    public function setMaxIteration($maxIteration) {
395 368
         if ($this->isPrimaryFileGroup()) {
396 369
             $maxIteration = 1;
397 370
         }
@@ -404,8 +377,7 @@  discard block
 block discarded – undo
404 377
      * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObject
405 378
      * @return void
406 379
      */
407
-    public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject)
408
-    {
380
+    public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject) {
409 381
         $this->metadataObject->attach($metadataObject);
410 382
     }
411 383
 
@@ -415,8 +387,7 @@  discard block
 block discarded – undo
415 387
      * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove The MetadataObject to be removed
416 388
      * @return void
417 389
      */
418
-    public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove)
419
-    {
390
+    public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove) {
420 391
         $this->metadataObject->detach($metadataObjectToRemove);
421 392
     }
422 393
 
@@ -425,8 +396,7 @@  discard block
 block discarded – undo
425 396
      *
426 397
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
427 398
      */
428
-    public function getMetadataObject()
429
-    {
399
+    public function getMetadataObject() {
430 400
         return $this->metadataObject;
431 401
     }
432 402
 
@@ -436,8 +406,7 @@  discard block
 block discarded – undo
436 406
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
437 407
      * @return void
438 408
      */
439
-    public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject)
440
-    {
409
+    public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject) {
441 410
         $this->metadataObject = $metadataObject;
442 411
     }
443 412
 
@@ -446,8 +415,7 @@  discard block
 block discarded – undo
446 415
      *
447 416
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
448 417
      */
449
-    public function getChildren()
450
-    {
418
+    public function getChildren() {
451 419
         return $this->getMetadataObject();
452 420
     }
453 421
 
@@ -456,8 +424,7 @@  discard block
 block discarded – undo
456 424
      *
457 425
      * @return array $accessRestrictionRoles
458 426
      */
459
-    public function getAccessRestrictionRoles()
460
-    {
427
+    public function getAccessRestrictionRoles() {
461 428
         if ($this->accessRestrictionRoles) {
462 429
             return array_map('trim', explode(',', $this->accessRestrictionRoles));
463 430
         } else {
@@ -471,8 +438,7 @@  discard block
 block discarded – undo
471 438
      * @param array $accessRestrictionRoles
472 439
      * @return void
473 440
      */
474
-    public function setAccessRestrictionRoles($accessRestrictionRoles)
475
-    {
441
+    public function setAccessRestrictionRoles($accessRestrictionRoles) {
476 442
         $this->accessRestrictionRoles = implode(',', $accessRestrictionRoles);
477 443
     }
478 444
 
@@ -481,8 +447,7 @@  discard block
 block discarded – undo
481 447
      *
482 448
      * @return string $infoText
483 449
      */
484
-    public function getInfoText()
485
-    {
450
+    public function getInfoText() {
486 451
         return $this->infoText;
487 452
     }
488 453
 
@@ -492,8 +457,7 @@  discard block
 block discarded – undo
492 457
      * @param string $infoText
493 458
      * @return void
494 459
      */
495
-    public function setInfoText($infoText)
496
-    {
460
+    public function setInfoText($infoText) {
497 461
         $this->infoText = $infoText;
498 462
     }
499 463
 
@@ -508,23 +472,19 @@  discard block
 block discarded – undo
508 472
     /**
509 473
      * @param string $groupType
510 474
      */
511
-    public function setGroupType(string $groupType)
512
-    {
475
+    public function setGroupType(string $groupType) {
513 476
         $this->groupType = $groupType;
514 477
     }
515 478
 
516
-    public function isFileGroup()
517
-    {
479
+    public function isFileGroup() {
518 480
         return $this->isPrimaryFileGroup() || $this->isSecondaryFileGroup();
519 481
     }
520 482
 
521
-    public function isPrimaryFileGroup()
522
-    {
483
+    public function isPrimaryFileGroup() {
523 484
         return $this->getGroupType() == 'primary_file';
524 485
     }
525 486
 
526
-    public function isSecondaryFileGroup()
527
-    {
487
+    public function isSecondaryFileGroup() {
528 488
         return $this->getGroupType() == 'secondary_file';
529 489
     }
530 490
 
Please login to merge, or discard this patch.
Classes/Controller/DocumentFormBackofficeController.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
32 32
 
33
-class DocumentFormBackofficeController extends AbstractDocumentFormController
34
-{
33
+class DocumentFormBackofficeController extends AbstractDocumentFormController {
35 34
     /**
36 35
      * documentTransferManager
37 36
      *
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
     /**
82 81
      * DocumentController constructor.
83 82
      */
84
-    public function __construct()
85
-    {
83
+    public function __construct() {
86 84
         parent::__construct();
87 85
 
88 86
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
         $activeGroup = '',
130 128
         $activeGroupIndex = 0,
131 129
         $addCurrentFeUser = true
132
-    )
133
-    {
130
+    ) {
134 131
         /** @var \EWW\Dpf\Domain\Model\Document $document */
135 132
         $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
136 133
 
@@ -179,8 +176,7 @@  discard block
 block discarded – undo
179 176
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
180 177
      * @param bool $restore
181 178
      */
182
-    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE)
183
-    {
179
+    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE) {
184 180
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
185 181
 
186 182
         $workingCopy = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -288,8 +284,7 @@  discard block
 block discarded – undo
288 284
     }
289 285
 
290 286
 
291
-    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm)
292
-    {
287
+    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm) {
293 288
         if ($this->request->getArgument('documentData')['suggestMod']) {
294 289
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
295 290
             $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
@@ -326,8 +321,7 @@  discard block
 block discarded – undo
326 321
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
327 322
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
328 323
      */
329
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false)
330
-    {
324
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false) {
331 325
         try {
332 326
             /** @var \EWW\Dpf\Domain\Model\Document $document */
333 327
             $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -517,8 +511,7 @@  discard block
 block discarded – undo
517 511
         }
518 512
     }
519 513
 
520
-    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm)
521
-    {
514
+    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) {
522 515
         /** @var \EWW\Dpf\Helper\DocumentMapper $documentMapper */
523 516
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
524 517
 
@@ -584,8 +577,7 @@  discard block
 block discarded – undo
584 577
      *
585 578
      * @return void
586 579
      */
587
-    public function cancelEditAction($documentUid = 0, $backToList = false)
588
-    {
580
+    public function cancelEditAction($documentUid = 0, $backToList = false) {
589 581
         if (empty($documentUid) || $backToList) {
590 582
             $this->redirectToDocumentList();
591 583
         }
@@ -603,14 +595,12 @@  discard block
 block discarded – undo
603 595
      *
604 596
      * @return void
605 597
      */
606
-    public function cancelNewAction()
607
-    {
598
+    public function cancelNewAction() {
608 599
         $this->redirect('list');
609 600
     }
610 601
 
611 602
 
612
-    public function initializeAction()
613
-    {
603
+    public function initializeAction() {
614 604
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
615 605
 
616 606
         parent::initializeAction();
@@ -624,8 +614,7 @@  discard block
 block discarded – undo
624 614
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
625 615
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
626 616
      */
627
-    protected function redirectToDocumentList($message = null)
628
-    {
617
+    protected function redirectToDocumentList($message = null) {
629 618
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
630 619
 
631 620
         if ($redirectUri) {
Please login to merge, or discard this patch.
Classes/Controller/GetFileController.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 /**
51 51
  * GetFileController
52 52
  */
53
-class GetFileController extends \EWW\Dpf\Controller\AbstractController
54
-{
53
+class GetFileController extends \EWW\Dpf\Controller\AbstractController {
55 54
 
56 55
     /**
57 56
      * documentRepository
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
      */
70 69
     protected $clientConfigurationManager;
71 70
 
72
-    public function attachmentAction()
73
-    {
71
+    public function attachmentAction() {
74 72
 
75 73
         $piVars = GeneralUtility::_GP('tx_dpf'); // get GET params from powermail
76 74
 
@@ -293,8 +291,7 @@  discard block
 block discarded – undo
293 291
 
294 292
     }
295 293
 
296
-    private static function sanitizeFilename($filename)
297
-    {
294
+    private static function sanitizeFilename($filename) {
298 295
         // remove anything which isn't a word, whitespace, number or any of the following caracters -_~,;[]().
299 296
         $filename = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $filename);
300 297
         // turn diacritical characters to ASCII
@@ -306,8 +303,7 @@  discard block
 block discarded – undo
306 303
         return $filename;
307 304
     }
308 305
 
309
-    private function buildMetsXml($document)
310
-    {
306
+    private function buildMetsXml($document) {
311 307
         $parserGenerator = new ParserGenerator();
312 308
         $parserGenerator->setXML($document->getXmlData());
313 309
 
@@ -323,8 +319,7 @@  discard block
 block discarded – undo
323 319
         return $XSLTransformator->getTransformedOutputXML($document);
324 320
     }
325 321
 
326
-    private function isForbidden($action)
327
-    {
322
+    private function isForbidden($action) {
328 323
         $allowed =
329 324
             array_key_exists('allowedActions', $this->settings)
330 325
             && is_array($this->settings['allowedActions'])
Please login to merge, or discard this patch.