Passed
Pull Request — master (#123)
by
unknown
11:31 queued 04:17
created
Classes/Controller/DocumentController.php 1 patch
Braces   +19 added lines, -38 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
 /**
27 27
  * DocumentController
28 28
  */
29
-class DocumentController extends \EWW\Dpf\Controller\AbstractController
30
-{
29
+class DocumentController extends \EWW\Dpf\Controller\AbstractController {
31 30
 
32 31
     /**
33 32
      * documentRepository
@@ -50,8 +49,7 @@  discard block
 block discarded – undo
50 49
      *
51 50
      * @return void
52 51
      */
53
-    public function listAction()
54
-    {
52
+    public function listAction() {
55 53
         $documents = $this->documentRepository->findAll();
56 54
 
57 55
         if ($this->request->hasArgument('message')) {
@@ -65,14 +63,12 @@  discard block
 block discarded – undo
65 63
         $this->view->assign('documents', $documents);
66 64
     }
67 65
 
68
-    public function listNewAction()
69
-    {
66
+    public function listNewAction() {
70 67
         $documents = $this->documentRepository->getNewDocuments();
71 68
         $this->view->assign('documents', $documents);
72 69
     }
73 70
 
74
-    public function listEditAction()
75
-    {
71
+    public function listEditAction() {
76 72
         $documents = $this->documentRepository->getInProgressDocuments();
77 73
         $this->view->assign('documents', $documents);
78 74
     }
@@ -83,8 +79,7 @@  discard block
 block discarded – undo
83 79
      * @param \EWW\Dpf\Domain\Model\Document $document
84 80
      * @return void
85 81
      */
86
-    public function discardConfirmAction(\EWW\Dpf\Domain\Model\Document $document)
87
-    {
82
+    public function discardConfirmAction(\EWW\Dpf\Domain\Model\Document $document) {
88 83
         $this->view->assign('document', $document);
89 84
     }
90 85
 
@@ -94,8 +89,7 @@  discard block
 block discarded – undo
94 89
      * @param \EWW\Dpf\Domain\Model\Document $document
95 90
      * @return void
96 91
      */
97
-    public function discardAction(\EWW\Dpf\Domain\Model\Document $document)
98
-    {
92
+    public function discardAction(\EWW\Dpf\Domain\Model\Document $document) {
99 93
         // remove document from local index
100 94
         $elasticsearchRepository = $this->objectManager->get(ElasticsearchRepository::class);
101 95
         // send document to index
@@ -121,8 +115,7 @@  discard block
 block discarded – undo
121 115
      * @param \EWW\Dpf\Domain\Model\Document $document
122 116
      * @return void
123 117
      */
124
-    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document)
125
-    {
118
+    public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) {
126 119
 
127 120
         $args = array();
128 121
 
@@ -172,8 +165,7 @@  discard block
 block discarded – undo
172 165
      * @param string $releaseType
173 166
      * @return void
174 167
      */
175
-    public function releaseConfirmAction(\EWW\Dpf\Domain\Model\Document $document, $releaseType)
176
-    {
168
+    public function releaseConfirmAction(\EWW\Dpf\Domain\Model\Document $document, $releaseType) {
177 169
         $this->view->assign('releaseType', $releaseType);
178 170
         $this->view->assign('document', $document);
179 171
     }
@@ -184,8 +176,7 @@  discard block
 block discarded – undo
184 176
      * @param \EWW\Dpf\Domain\Model\Document $document
185 177
      * @return void
186 178
      */
187
-    public function releaseAction(\EWW\Dpf\Domain\Model\Document $document)
188
-    {
179
+    public function releaseAction(\EWW\Dpf\Domain\Model\Document $document) {
189 180
 
190 181
         // generate URN if needed
191 182
         $qucosaId = $document->getObjectIdentifier();
@@ -253,8 +244,7 @@  discard block
 block discarded – undo
253 244
      * @param \EWW\Dpf\Domain\Model\Document $document
254 245
      * @return void
255 246
      */
256
-    public function restoreConfirmAction(\EWW\Dpf\Domain\Model\Document $document)
257
-    {
247
+    public function restoreConfirmAction(\EWW\Dpf\Domain\Model\Document $document) {
258 248
         $this->view->assign('document', $document);
259 249
     }
260 250
 
@@ -264,8 +254,7 @@  discard block
 block discarded – undo
264 254
      * @param \EWW\Dpf\Domain\Model\Document $document
265 255
      * @return void
266 256
      */
267
-    public function restoreAction(\EWW\Dpf\Domain\Model\Document $document)
268
-    {
257
+    public function restoreAction(\EWW\Dpf\Domain\Model\Document $document) {
269 258
 
270 259
         $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class);
271 260
         $remoteRepository        = $this->objectManager->get(FedoraRepository::class);
@@ -290,8 +279,7 @@  discard block
 block discarded – undo
290 279
      * @param \EWW\Dpf\Domain\Model\Document $document
291 280
      * @return void
292 281
      */
293
-    public function deleteConfirmAction(\EWW\Dpf\Domain\Model\Document $document)
294
-    {
282
+    public function deleteConfirmAction(\EWW\Dpf\Domain\Model\Document $document) {
295 283
         $this->view->assign('document', $document);
296 284
     }
297 285
 
@@ -301,8 +289,7 @@  discard block
 block discarded – undo
301 289
      * @param \EWW\Dpf\Domain\Model\Document $document
302 290
      * @return void
303 291
      */
304
-    public function deleteAction(\EWW\Dpf\Domain\Model\Document $document)
305
-    {
292
+    public function deleteAction(\EWW\Dpf\Domain\Model\Document $document) {
306 293
 
307 294
         $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class);
308 295
         $remoteRepository        = $this->objectManager->get(FedoraRepository::class);
@@ -327,8 +314,7 @@  discard block
 block discarded – undo
327 314
      * @param \EWW\Dpf\Domain\Model\Document $document
328 315
      * @return void
329 316
      */
330
-    public function activateConfirmAction(\EWW\Dpf\Domain\Model\Document $document)
331
-    {
317
+    public function activateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) {
332 318
         $this->view->assign('document', $document);
333 319
     }
334 320
 
@@ -338,8 +324,7 @@  discard block
 block discarded – undo
338 324
      * @param \EWW\Dpf\Domain\Model\Document $document
339 325
      * @return void
340 326
      */
341
-    public function activateAction(\EWW\Dpf\Domain\Model\Document $document)
342
-    {
327
+    public function activateAction(\EWW\Dpf\Domain\Model\Document $document) {
343 328
 
344 329
         $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class);
345 330
         $remoteRepository        = $this->objectManager->get(FedoraRepository::class);
@@ -364,8 +349,7 @@  discard block
 block discarded – undo
364 349
      * @param \EWW\Dpf\Domain\Model\Document $document
365 350
      * @return void
366 351
      */
367
-    public function inactivateConfirmAction(\EWW\Dpf\Domain\Model\Document $document)
368
-    {
352
+    public function inactivateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) {
369 353
         $this->view->assign('document', $document);
370 354
     }
371 355
 
@@ -375,8 +359,7 @@  discard block
 block discarded – undo
375 359
      * @param \EWW\Dpf\Domain\Model\Document $document
376 360
      * @return void
377 361
      */
378
-    public function inactivateAction(\EWW\Dpf\Domain\Model\Document $document)
379
-    {
362
+    public function inactivateAction(\EWW\Dpf\Domain\Model\Document $document) {
380 363
 
381 364
         $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class);
382 365
         $remoteRepository        = $this->objectManager->get(FedoraRepository::class);
@@ -395,8 +378,7 @@  discard block
 block discarded – undo
395 378
         $this->redirect('list');
396 379
     }
397 380
 
398
-    protected function getStoragePID()
399
-    {
381
+    protected function getStoragePID() {
400 382
         return $this->settings['persistence']['classes']['EWW\Dpf\Domain\Model\Document']['newRecordStoragePid'];
401 383
     }
402 384
 
@@ -406,8 +388,7 @@  discard block
 block discarded – undo
406 388
      * @param string $key
407 389
      * @param string $severity
408 390
      */
409
-    protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity)
410
-    {
391
+    protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity) {
411 392
 
412 393
         // Show success or failure of the action in a flash message
413 394
         $args[] = $document->getTitle();
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 1 patch
Braces   +53 added lines, -106 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * Document
19 19
  */
20
-class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
21
-{
20
+class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
22 21
 
23 22
     /**
24 23
      * title
@@ -137,8 +136,7 @@  discard block
 block discarded – undo
137 136
     /**
138 137
      * __construct
139 138
      */
140
-    public function __construct()
141
-    {
139
+    public function __construct() {
142 140
         //Do not remove the next line: It would break the functionality
143 141
         $this->initStorageObjects();
144 142
     }
@@ -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
 }
Please login to merge, or discard this patch.
Classes/Domain/Model/MetadataGroup.php 1 patch
Braces   +38 added lines, -76 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
21
-{
20
+class MetadataGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
22 21
 
23 22
     /**
24 23
      * name
@@ -101,8 +100,7 @@  discard block
 block discarded – undo
101 100
     /**
102 101
      * __construct
103 102
      */
104
-    public function __construct()
105
-    {
103
+    public function __construct() {
106 104
         //Do not remove the next line: It would break the functionality
107 105
         $this->initStorageObjects();
108 106
     }
@@ -112,8 +110,7 @@  discard block
 block discarded – undo
112 110
      *
113 111
      * @return void
114 112
      */
115
-    protected function initStorageObjects()
116
-    {
113
+    protected function initStorageObjects() {
117 114
         $this->metadataObject = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
118 115
     }
119 116
 
@@ -122,8 +119,7 @@  discard block
 block discarded – undo
122 119
      *
123 120
      * @return string $name
124 121
      */
125
-    public function getName()
126
-    {
122
+    public function getName() {
127 123
         return $this->name;
128 124
     }
129 125
 
@@ -133,8 +129,7 @@  discard block
 block discarded – undo
133 129
      * @param string $name
134 130
      * @return void
135 131
      */
136
-    public function setName($name)
137
-    {
132
+    public function setName($name) {
138 133
         $this->name = $name;
139 134
     }
140 135
 
@@ -143,8 +138,7 @@  discard block
 block discarded – undo
143 138
      *
144 139
      * @return string $displayName
145 140
      */
146
-    public function getDisplayName()
147
-    {
141
+    public function getDisplayName() {
148 142
         return $this->displayName;
149 143
     }
150 144
 
@@ -154,8 +148,7 @@  discard block
 block discarded – undo
154 148
      * @param string $displayName
155 149
      * @return void
156 150
      */
157
-    public function setDisplayName($displayName)
158
-    {
151
+    public function setDisplayName($displayName) {
159 152
         $this->displayName = $displayName;
160 153
     }
161 154
 
@@ -164,8 +157,7 @@  discard block
 block discarded – undo
164 157
      *
165 158
      * @return boolean $mandatory
166 159
      */
167
-    public function getMandatory()
168
-    {
160
+    public function getMandatory() {
169 161
         return $this->mandatory;
170 162
     }
171 163
 
@@ -175,8 +167,7 @@  discard block
 block discarded – undo
175 167
      * @param boolean $mandatory
176 168
      * @return void
177 169
      */
178
-    public function setMandatory($mandatory)
179
-    {
170
+    public function setMandatory($mandatory) {
180 171
         $this->mandatory = $mandatory;
181 172
     }
182 173
 
@@ -185,8 +176,7 @@  discard block
 block discarded – undo
185 176
      *
186 177
      * @return boolean
187 178
      */
188
-    public function isMandatory()
189
-    {
179
+    public function isMandatory() {
190 180
         return $this->mandatory;
191 181
     }
192 182
 
@@ -195,8 +185,7 @@  discard block
 block discarded – undo
195 185
      *
196 186
      * @return string $mapping
197 187
      */
198
-    public function getMapping()
199
-    {
188
+    public function getMapping() {
200 189
         return $this->mapping;
201 190
     }
202 191
 
@@ -206,8 +195,7 @@  discard block
 block discarded – undo
206 195
      * @param string $mapping
207 196
      * @return void
208 197
      */
209
-    public function setMapping($mapping)
210
-    {
198
+    public function setMapping($mapping) {
211 199
         $this->mapping = $mapping;
212 200
     }
213 201
 
@@ -216,8 +204,7 @@  discard block
 block discarded – undo
216 204
      *
217 205
      * @return string $mappingForReading
218 206
      */
219
-    public function getMappingForReading()
220
-    {
207
+    public function getMappingForReading() {
221 208
         return $this->mappingForReading;
222 209
     }
223 210
 
@@ -227,8 +214,7 @@  discard block
 block discarded – undo
227 214
      * @param string $mappingForReading
228 215
      * @return void
229 216
      */
230
-    public function setMappingForReading($mappingForReading)
231
-    {
217
+    public function setMappingForReading($mappingForReading) {
232 218
         $this->mappingForReading = $mappingForReading;
233 219
     }
234 220
 
@@ -237,8 +223,7 @@  discard block
 block discarded – undo
237 223
      *
238 224
      * @return bool
239 225
      */
240
-    public function hasMappingForReading()
241
-    {
226
+    public function hasMappingForReading() {
242 227
         $mapping = trim($this->mappingForReading);
243 228
         return !empty($mapping);
244 229
     }
@@ -249,8 +234,7 @@  discard block
 block discarded – undo
249 234
      * @string $mapping
250 235
      * @return string $relativeMapping
251 236
      */
252
-    protected function relativeMapping($mapping)
253
-    {
237
+    protected function relativeMapping($mapping) {
254 238
         $modsRegExp = "/^\/?(mods:mods|slub:info)/";
255 239
         $mapping    = preg_replace($modsRegExp, "", $mapping);
256 240
         return trim($mapping, " /");
@@ -261,8 +245,7 @@  discard block
 block discarded – undo
261 245
      *
262 246
      * @return string $relativeMappingForWriting
263 247
      */
264
-    public function getRelativeMapping()
265
-    {
248
+    public function getRelativeMapping() {
266 249
         return $this->relativeMapping($this->mapping);
267 250
     }
268 251
 
@@ -271,8 +254,7 @@  discard block
 block discarded – undo
271 254
      *
272 255
      * @return string $relativeMappingForReading
273 256
      */
274
-    public function getRelativeMappingForReading()
275
-    {
257
+    public function getRelativeMappingForReading() {
276 258
         return $this->relativeMapping($this->mappingForReading);
277 259
     }
278 260
 
@@ -281,8 +263,7 @@  discard block
 block discarded – undo
281 263
      *
282 264
      * @return string $absoluteMappingForWriting
283 265
      */
284
-    public function getAbsoluteMapping()
285
-    {
266
+    public function getAbsoluteMapping() {
286 267
         if ($this->isSlubInfo($this->getMapping())) {
287 268
             return "/slub:info/" . $this->getRelativeMapping();
288 269
         } else {
@@ -295,8 +276,7 @@  discard block
 block discarded – undo
295 276
      *
296 277
      * @return string $absoluteMappingForReading
297 278
      */
298
-    public function getAbsoluteMappingForReading()
299
-    {
279
+    public function getAbsoluteMappingForReading() {
300 280
         if ($this->isSlubInfo($this->getMappingForReading())) {
301 281
             return "/slub:info/" . $this->getRelativeMappingForReading();
302 282
         } else {
@@ -310,8 +290,7 @@  discard block
 block discarded – undo
310 290
      * @param string $mapping
311 291
      * @return bool
312 292
      */
313
-    public function isSlubInfo($mapping)
314
-    {
293
+    public function isSlubInfo($mapping) {
315 294
         $modsRegExp = "/^\/?slub:info/";
316 295
         $match      = $mapping;
317 296
         if (preg_match($modsRegExp, $match)) {
@@ -325,8 +304,7 @@  discard block
 block discarded – undo
325 304
      *
326 305
      * @return string $modsExtensionMapping
327 306
      */
328
-    public function getModsExtensionMapping()
329
-    {
307
+    public function getModsExtensionMapping() {
330 308
         return $this->modsExtensionMapping;
331 309
     }
332 310
 
@@ -336,8 +314,7 @@  discard block
 block discarded – undo
336 314
      * @param string $modsExtensionMapping
337 315
      * @return void
338 316
      */
339
-    public function setModsExtensionMapping($modsExtensionMapping)
340
-    {
317
+    public function setModsExtensionMapping($modsExtensionMapping) {
341 318
         $this->modsExtensionMapping = $modsExtensionMapping;
342 319
     }
343 320
 
@@ -346,8 +323,7 @@  discard block
 block discarded – undo
346 323
      *
347 324
      * @return string $relativeModsExtensionMapping
348 325
      */
349
-    public function getRelativeModsExtensionMapping()
350
-    {
326
+    public function getRelativeModsExtensionMapping() {
351 327
         $modsRegExp = "/^.*?mods:mods/i";
352 328
         $mapping    = preg_replace($modsRegExp, "", $this->modsExtensionMapping);
353 329
         return trim($mapping, " /");
@@ -358,8 +334,7 @@  discard block
 block discarded – undo
358 334
      *
359 335
      * @return string $absoluteModsExtensionMapping
360 336
      */
361
-    public function getAbsoluteModsExtensionMapping()
362
-    {
337
+    public function getAbsoluteModsExtensionMapping() {
363 338
         return "/mods:mods/" . $this->getRelativeModsExtensionMapping();
364 339
     }
365 340
 
@@ -369,8 +344,7 @@  discard block
 block discarded – undo
369 344
      * @param string $modsExtensionReference
370 345
      * @return void
371 346
      */
372
-    public function setModsExtensionReference($modsExtensionReference)
373
-    {
347
+    public function setModsExtensionReference($modsExtensionReference) {
374 348
         $this->modsExtensionReference = $modsExtensionReference;
375 349
     }
376 350
 
@@ -379,8 +353,7 @@  discard block
 block discarded – undo
379 353
      *
380 354
      * @return string $modsExtensionReference
381 355
      */
382
-    public function getModsExtensionReference()
383
-    {
356
+    public function getModsExtensionReference() {
384 357
         return $this->modsExtensionReference;
385 358
     }
386 359
 
@@ -389,8 +362,7 @@  discard block
 block discarded – undo
389 362
      *
390 363
      * @return integer $maxIteration
391 364
      */
392
-    public function getMaxIteration()
393
-    {
365
+    public function getMaxIteration() {
394 366
         return $this->maxIteration;
395 367
     }
396 368
 
@@ -400,8 +372,7 @@  discard block
 block discarded – undo
400 372
      * @param integer $maxIteration
401 373
      * @return void
402 374
      */
403
-    public function setMaxIteration($maxIteration)
404
-    {
375
+    public function setMaxIteration($maxIteration) {
405 376
         $this->maxIteration = $maxIteration;
406 377
     }
407 378
 
@@ -411,8 +382,7 @@  discard block
 block discarded – undo
411 382
      * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObject
412 383
      * @return void
413 384
      */
414
-    public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject)
415
-    {
385
+    public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject) {
416 386
         $this->metadataObject->attach($metadataObject);
417 387
     }
418 388
 
@@ -422,8 +392,7 @@  discard block
 block discarded – undo
422 392
      * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove The MetadataObject to be removed
423 393
      * @return void
424 394
      */
425
-    public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove)
426
-    {
395
+    public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove) {
427 396
         $this->metadataObject->detach($metadataObjectToRemove);
428 397
     }
429 398
 
@@ -432,8 +401,7 @@  discard block
 block discarded – undo
432 401
      *
433 402
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
434 403
      */
435
-    public function getMetadataObject()
436
-    {
404
+    public function getMetadataObject() {
437 405
         return $this->metadataObject;
438 406
     }
439 407
 
@@ -443,8 +411,7 @@  discard block
 block discarded – undo
443 411
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
444 412
      * @return void
445 413
      */
446
-    public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject)
447
-    {
414
+    public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject) {
448 415
         $this->metadataObject = $metadataObject;
449 416
     }
450 417
 
@@ -453,8 +420,7 @@  discard block
 block discarded – undo
453 420
      *
454 421
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
455 422
      */
456
-    public function getChildren()
457
-    {
423
+    public function getChildren() {
458 424
         return $this->getMetadataObject();
459 425
     }
460 426
 
@@ -463,8 +429,7 @@  discard block
 block discarded – undo
463 429
      *
464 430
      * @return boolean $backendOnly
465 431
      */
466
-    public function getBackendOnly()
467
-    {
432
+    public function getBackendOnly() {
468 433
         return $this->backendOnly;
469 434
     }
470 435
 
@@ -474,8 +439,7 @@  discard block
 block discarded – undo
474 439
      * @param boolean $backendOnly
475 440
      * @return void
476 441
      */
477
-    public function setBackendOnly($backendOnly)
478
-    {
442
+    public function setBackendOnly($backendOnly) {
479 443
         $this->backendOnly = $backendOnly;
480 444
     }
481 445
 
@@ -484,8 +448,7 @@  discard block
 block discarded – undo
484 448
      *
485 449
      * @return string $infoText
486 450
      */
487
-    public function getInfoText()
488
-    {
451
+    public function getInfoText() {
489 452
         return $this->infoText;
490 453
     }
491 454
 
@@ -495,8 +458,7 @@  discard block
 block discarded – undo
495 458
      * @param string $infoText
496 459
      * @return void
497 460
      */
498
-    public function setInfoText($infoText)
499
-    {
461
+    public function setInfoText($infoText) {
500 462
         $this->infoText = $infoText;
501 463
     }
502 464
 
Please login to merge, or discard this patch.