Passed
Push — master ( 63234a...b102b9 )
by Ralf
03:30
created
Classes/Domain/Model/MetadataGroup.php 2 patches
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
     }
@@ -115,8 +113,7 @@  discard block
 block discarded – undo
115 113
      *
116 114
      * @return void
117 115
      */
118
-    protected function initStorageObjects()
119
-    {
116
+    protected function initStorageObjects() {
120 117
         $this->metadataObject = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
121 118
     }
122 119
 
@@ -125,8 +122,7 @@  discard block
 block discarded – undo
125 122
      *
126 123
      * @return string $name
127 124
      */
128
-    public function getName()
129
-    {
125
+    public function getName() {
130 126
         return $this->name;
131 127
     }
132 128
 
@@ -136,8 +132,7 @@  discard block
 block discarded – undo
136 132
      * @param string $name
137 133
      * @return void
138 134
      */
139
-    public function setName($name)
140
-    {
135
+    public function setName($name) {
141 136
         $this->name = $name;
142 137
     }
143 138
 
@@ -146,8 +141,7 @@  discard block
 block discarded – undo
146 141
      *
147 142
      * @return string $displayName
148 143
      */
149
-    public function getDisplayName()
150
-    {
144
+    public function getDisplayName() {
151 145
         return $this->displayName;
152 146
     }
153 147
 
@@ -157,8 +151,7 @@  discard block
 block discarded – undo
157 151
      * @param string $displayName
158 152
      * @return void
159 153
      */
160
-    public function setDisplayName($displayName)
161
-    {
154
+    public function setDisplayName($displayName) {
162 155
         $this->displayName = $displayName;
163 156
     }
164 157
 
@@ -167,8 +160,7 @@  discard block
 block discarded – undo
167 160
      *
168 161
      * @return boolean $mandatory
169 162
      */
170
-    public function getMandatory()
171
-    {
163
+    public function getMandatory() {
172 164
         return $this->mandatory;
173 165
     }
174 166
 
@@ -178,8 +170,7 @@  discard block
 block discarded – undo
178 170
      * @param boolean $mandatory
179 171
      * @return void
180 172
      */
181
-    public function setMandatory($mandatory)
182
-    {
173
+    public function setMandatory($mandatory) {
183 174
         $this->mandatory = $mandatory;
184 175
     }
185 176
 
@@ -188,8 +179,7 @@  discard block
 block discarded – undo
188 179
      *
189 180
      * @return boolean
190 181
      */
191
-    public function isMandatory()
192
-    {
182
+    public function isMandatory() {
193 183
         return $this->mandatory;
194 184
     }
195 185
 
@@ -198,8 +188,7 @@  discard block
 block discarded – undo
198 188
      *
199 189
      * @return string $mapping
200 190
      */
201
-    public function getMapping()
202
-    {
191
+    public function getMapping() {
203 192
         return $this->mapping;
204 193
     }
205 194
 
@@ -209,8 +198,7 @@  discard block
 block discarded – undo
209 198
      * @param string $mapping
210 199
      * @return void
211 200
      */
212
-    public function setMapping($mapping)
213
-    {
201
+    public function setMapping($mapping) {
214 202
         $this->mapping = $mapping;
215 203
     }
216 204
 
@@ -219,8 +207,7 @@  discard block
 block discarded – undo
219 207
      *
220 208
      * @return string $mappingForReading
221 209
      */
222
-    public function getMappingForReading()
223
-    {
210
+    public function getMappingForReading() {
224 211
         return $this->mappingForReading;
225 212
     }
226 213
 
@@ -230,8 +217,7 @@  discard block
 block discarded – undo
230 217
      * @param string $mappingForReading
231 218
      * @return void
232 219
      */
233
-    public function setMappingForReading($mappingForReading)
234
-    {
220
+    public function setMappingForReading($mappingForReading) {
235 221
         $this->mappingForReading = $mappingForReading;
236 222
     }
237 223
 
@@ -240,8 +226,7 @@  discard block
 block discarded – undo
240 226
      *
241 227
      * @return bool
242 228
      */
243
-    public function hasMappingForReading()
244
-    {
229
+    public function hasMappingForReading() {
245 230
         $mapping = trim($this->mappingForReading);
246 231
         return !empty($mapping);
247 232
     }
@@ -252,8 +237,7 @@  discard block
 block discarded – undo
252 237
      * @string $mapping
253 238
      * @return string $relativeMapping
254 239
      */
255
-    protected function relativeMapping($mapping)
256
-    {
240
+    protected function relativeMapping($mapping) {
257 241
         $modsRegExp = "/^\/?(mods:mods|slub:info)/";
258 242
         $mapping    = preg_replace($modsRegExp, "", $mapping);
259 243
         //if (empty($mapping)) throw new \Exception("Invalid Mapping!");
@@ -265,8 +249,7 @@  discard block
 block discarded – undo
265 249
      *
266 250
      * @return string $relativeMappingForWriting
267 251
      */
268
-    public function getRelativeMapping()
269
-    {
252
+    public function getRelativeMapping() {
270 253
         return $this->relativeMapping($this->mapping);
271 254
     }
272 255
 
@@ -275,8 +258,7 @@  discard block
 block discarded – undo
275 258
      *
276 259
      * @return string $relativeMappingForReading
277 260
      */
278
-    public function getRelativeMappingForReading()
279
-    {
261
+    public function getRelativeMappingForReading() {
280 262
         return $this->relativeMapping($this->mappingForReading);
281 263
     }
282 264
 
@@ -285,8 +267,7 @@  discard block
 block discarded – undo
285 267
      *
286 268
      * @return string $absoluteMappingForWriting
287 269
      */
288
-    public function getAbsoluteMapping()
289
-    {
270
+    public function getAbsoluteMapping() {
290 271
         if ($this->isSlubInfo($this->getMapping())) {
291 272
             return "/slub:info/" . $this->getRelativeMapping();
292 273
         } else {
@@ -299,8 +280,7 @@  discard block
 block discarded – undo
299 280
      *
300 281
      * @return string $absoluteMappingForReading
301 282
      */
302
-    public function getAbsoluteMappingForReading()
303
-    {
283
+    public function getAbsoluteMappingForReading() {
304 284
         if ($this->isSlubInfo($this->getMappingForReading())) {
305 285
             return "/slub:info/" . $this->getRelativeMappingForReading();
306 286
         } else {
@@ -314,8 +294,7 @@  discard block
 block discarded – undo
314 294
      * @param string $mapping
315 295
      * @return bool
316 296
      */
317
-    public function isSlubInfo($mapping)
318
-    {
297
+    public function isSlubInfo($mapping) {
319 298
         $modsRegExp = "/^\/?slub:info/";
320 299
         $match      = $mapping;
321 300
         if (preg_match($modsRegExp, $match)) {
@@ -329,8 +308,7 @@  discard block
 block discarded – undo
329 308
      *
330 309
      * @return string $modsExtensionMapping
331 310
      */
332
-    public function getModsExtensionMapping()
333
-    {
311
+    public function getModsExtensionMapping() {
334 312
         return $this->modsExtensionMapping;
335 313
     }
336 314
 
@@ -340,8 +318,7 @@  discard block
 block discarded – undo
340 318
      * @param string $modsExtensionMapping
341 319
      * @return void
342 320
      */
343
-    public function setModsExtensionMapping($modsExtensionMapping)
344
-    {
321
+    public function setModsExtensionMapping($modsExtensionMapping) {
345 322
         $this->modsExtensionMapping = $modsExtensionMapping;
346 323
     }
347 324
 
@@ -350,8 +327,7 @@  discard block
 block discarded – undo
350 327
      *
351 328
      * @return string $relativeModsExtensionMapping
352 329
      */
353
-    public function getRelativeModsExtensionMapping()
354
-    {
330
+    public function getRelativeModsExtensionMapping() {
355 331
         $modsRegExp = "/^.*?mods:mods/i";
356 332
         $mapping    = preg_replace($modsRegExp, "", $this->modsExtensionMapping);
357 333
         return trim($mapping, " /");
@@ -362,8 +338,7 @@  discard block
 block discarded – undo
362 338
      *
363 339
      * @return string $absoluteModsExtensionMapping
364 340
      */
365
-    public function getAbsoluteModsExtensionMapping()
366
-    {
341
+    public function getAbsoluteModsExtensionMapping() {
367 342
         return "/mods:mods/" . $this->getRelativeModsExtensionMapping();
368 343
     }
369 344
 
@@ -373,8 +348,7 @@  discard block
 block discarded – undo
373 348
      * @param string $modsExtensionReference
374 349
      * @return void
375 350
      */
376
-    public function setModsExtensionReference($modsExtensionReference)
377
-    {
351
+    public function setModsExtensionReference($modsExtensionReference) {
378 352
         $this->modsExtensionReference = $modsExtensionReference;
379 353
     }
380 354
 
@@ -383,8 +357,7 @@  discard block
 block discarded – undo
383 357
      *
384 358
      * @return string $modsExtensionReference
385 359
      */
386
-    public function getModsExtensionReference()
387
-    {
360
+    public function getModsExtensionReference() {
388 361
         return $this->modsExtensionReference;
389 362
     }
390 363
 
@@ -393,8 +366,7 @@  discard block
 block discarded – undo
393 366
      *
394 367
      * @return integer $maxIteration
395 368
      */
396
-    public function getMaxIteration()
397
-    {
369
+    public function getMaxIteration() {
398 370
         return $this->maxIteration;
399 371
     }
400 372
 
@@ -404,8 +376,7 @@  discard block
 block discarded – undo
404 376
      * @param integer $maxIteration
405 377
      * @return void
406 378
      */
407
-    public function setMaxIteration($maxIteration)
408
-    {
379
+    public function setMaxIteration($maxIteration) {
409 380
         $this->maxIteration = $maxIteration;
410 381
     }
411 382
 
@@ -415,8 +386,7 @@  discard block
 block discarded – undo
415 386
      * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObject
416 387
      * @return void
417 388
      */
418
-    public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject)
419
-    {
389
+    public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject) {
420 390
         $this->metadataObject->attach($metadataObject);
421 391
     }
422 392
 
@@ -426,8 +396,7 @@  discard block
 block discarded – undo
426 396
      * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove The MetadataObject to be removed
427 397
      * @return void
428 398
      */
429
-    public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove)
430
-    {
399
+    public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove) {
431 400
         $this->metadataObject->detach($metadataObjectToRemove);
432 401
     }
433 402
 
@@ -436,8 +405,7 @@  discard block
 block discarded – undo
436 405
      *
437 406
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
438 407
      */
439
-    public function getMetadataObject()
440
-    {
408
+    public function getMetadataObject() {
441 409
         return $this->metadataObject;
442 410
     }
443 411
 
@@ -447,8 +415,7 @@  discard block
 block discarded – undo
447 415
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
448 416
      * @return void
449 417
      */
450
-    public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject)
451
-    {
418
+    public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject) {
452 419
         $this->metadataObject = $metadataObject;
453 420
     }
454 421
 
@@ -457,8 +424,7 @@  discard block
 block discarded – undo
457 424
      *
458 425
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
459 426
      */
460
-    public function getChildren()
461
-    {
427
+    public function getChildren() {
462 428
         return $this->getMetadataObject();
463 429
     }
464 430
 
@@ -467,8 +433,7 @@  discard block
 block discarded – undo
467 433
      *
468 434
      * @return boolean $backendOnly
469 435
      */
470
-    public function getBackendOnly()
471
-    {
436
+    public function getBackendOnly() {
472 437
         return $this->backendOnly;
473 438
     }
474 439
 
@@ -478,8 +443,7 @@  discard block
 block discarded – undo
478 443
      * @param boolean $backendOnly
479 444
      * @return void
480 445
      */
481
-    public function setBackendOnly($backendOnly)
482
-    {
446
+    public function setBackendOnly($backendOnly) {
483 447
         $this->backendOnly = $backendOnly;
484 448
     }
485 449
 
@@ -488,8 +452,7 @@  discard block
 block discarded – undo
488 452
      *
489 453
      * @return string $infoText
490 454
      */
491
-    public function getInfoText()
492
-    {
455
+    public function getInfoText() {
493 456
         return $this->infoText;
494 457
     }
495 458
 
@@ -499,8 +462,7 @@  discard block
 block discarded – undo
499 462
      * @param string $infoText
500 463
      * @return void
501 464
      */
502
-    public function setInfoText($infoText)
503
-    {
465
+    public function setInfoText($infoText) {
504 466
         $this->infoText = $infoText;
505 467
     }
506 468
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      *
40 40
      * @var boolean
41 41
      */
42
-    protected $mandatory = false;
42
+    protected $mandatory = FALSE;
43 43
 
44 44
     /**
45 45
      * mapping
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject>
83 83
      * @cascade remove
84 84
      */
85
-    protected $metadataObject = null;
85
+    protected $metadataObject = NULL;
86 86
 
87 87
     /**
88 88
      * backendOnly
89 89
      *
90 90
      * @var boolean
91 91
      */
92
-    protected $backendOnly = false;
92
+    protected $backendOnly = FALSE;
93 93
 
94 94
     /**
95 95
      * infoText
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
         $modsRegExp = "/^\/?slub:info/";
320 320
         $match      = $mapping;
321 321
         if (preg_match($modsRegExp, $match)) {
322
-            return true;
322
+            return TRUE;
323 323
         }
324
-        return false;
324
+        return FALSE;
325 325
     }
326 326
 
327 327
     /**
Please login to merge, or discard this patch.