Passed
Push — master ( 134b43...f02d33 )
by Ralf
09:50
created
Configuration/TCA/tx_dpf_domain_model_bookmark.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,47 +16,47 @@
 block discarded – undo
16 16
     die('Access denied.');
17 17
 }
18 18
 
19
-return array(
20
-    'ctrl' => array(
19
+return array (
20
+    'ctrl' => array (
21 21
         'title'                    => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_bookmark',
22 22
         'label'                    => 'document_identifier',
23 23
         'searchFields'             => 'document_identifier, fe_user_uid',
24 24
         'iconfile'                 => 'EXT:dpf/Resources/Public/Icons/default.gif',
25 25
     ),
26
-    'interface' => array(
26
+    'interface' => array (
27 27
         'showRecordFieldList' => 'document_identifier, fe_user_uid',
28 28
     ),
29
-    'types'     => array(
30
-        '1' => array('showitem' => ',--palette--;;1,
29
+    'types'     => array (
30
+        '1' => array ('showitem' => ',--palette--;;1,
31 31
         document_identifier, fe_user_uid,
32 32
         --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access'),
33 33
     ),
34
-    'palettes'  => array(
35
-        '1' => array('showitem' => ''),
34
+    'palettes'  => array (
35
+        '1' => array ('showitem' => ''),
36 36
     ),
37
-    'columns'   => array(
37
+    'columns'   => array (
38 38
 
39
-        'document_identifier' => array(
39
+        'document_identifier' => array (
40 40
             'exclude' => 0,
41 41
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_bookmark.document_identifier',
42
-            'config'  => array(
42
+            'config'  => array (
43 43
                 'type' => 'input',
44 44
                 'size' => '30',
45 45
                 'eval' => 'trim',
46 46
             ),
47 47
         ),
48
-        'fe_user_uid'         => array(
48
+        'fe_user_uid'         => array (
49 49
             'exclude'   => 1,
50 50
             'l10n_mode' => 'exclude',
51 51
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_bookmark.feuser',
52
-            'config'    => array(
52
+            'config'    => array (
53 53
                 'type'    => 'input',
54 54
                 'size'    => 30,
55 55
                 'eval'    => 'trim'
56 56
             ),
57 57
         ),
58
-        'pid' => array(
59
-            'config' => array(
58
+        'pid' => array (
59
+            'config' => array (
60 60
                 'type' => 'passthrough',
61 61
             )
62 62
         ),
Please login to merge, or discard this patch.
Classes/Configuration/ClientConfigurationManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *
30 30
      * @var array
31 31
      */
32
-    protected $settings = array();
32
+    protected $settings = array ();
33 33
 
34 34
 
35 35
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @var array
46 46
      */
47
-    protected $extensionConfiguration = array();
47
+    protected $extensionConfiguration = array ();
48 48
 
49 49
     public function __construct()
50 50
     {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $clientRepository = $objectManager->get(ClientRepository::class);
53 53
 
54 54
         if (TYPO3_MODE === 'BE') {
55
-            $selectedPageId = (int)GeneralUtility::_GP('id');
55
+            $selectedPageId = (int) GeneralUtility::_GP('id');
56 56
             if ($selectedPageId) {
57 57
                 $this->client = $clientRepository->findAll()->current();
58 58
 
Please login to merge, or discard this patch.
Braces   +58 added lines, -116 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 use EWW\Dpf\Domain\Repository\ClientRepository;
23 23
 use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
24 24
 
25
-class ClientConfigurationManager
26
-{
25
+class ClientConfigurationManager {
27 26
     /**
28 27
      * settings
29 28
      *
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      */
47 46
     protected $extensionConfiguration = array();
48 47
 
49
-    public function __construct()
50
-    {
48
+    public function __construct() {
51 49
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
52 50
         $clientRepository = $objectManager->get(ClientRepository::class);
53 51
 
@@ -77,8 +75,7 @@  discard block
 block discarded – undo
77 75
 
78 76
     }
79 77
 
80
-    public function setConfigurationPid($pid)
81
-    {
78
+    public function setConfigurationPid($pid) {
82 79
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
83 80
         $clientRepository = $objectManager->get(ClientRepository::class);
84 81
 
@@ -88,8 +85,7 @@  discard block
 block discarded – undo
88 85
     /**
89 86
      * @return int|null
90 87
      */
91
-    public function getClientPid()
92
-    {
88
+    public function getClientPid() {
93 89
         return $this->client->getPid();
94 90
     }
95 91
 
@@ -98,8 +94,7 @@  discard block
 block discarded – undo
98 94
      *
99 95
      * @var array
100 96
      */
101
-    public function getSetting($settingName, $extConfig = null)
102
-    {
97
+    public function getSetting($settingName, $extConfig = null) {
103 98
         $setting = null;
104 99
         if ($this->client) {
105 100
             $setting = trim($this->client->{"get" . ucfirst($settingName)}());
@@ -114,270 +109,217 @@  discard block
 block discarded – undo
114 109
     }
115 110
 
116 111
 
117
-    public function getOwnerId()
118
-    {
112
+    public function getOwnerId() {
119 113
         return $this->getSetting("ownerId");
120 114
     }
121 115
 
122
-    public function getSwordHost()
123
-    {
116
+    public function getSwordHost() {
124 117
         return $this->getSetting("swordHost", "swordHost");
125 118
     }
126 119
 
127
-    public function getSwordUser()
128
-    {
120
+    public function getSwordUser() {
129 121
         return $this->getSetting("swordUser", "swordUser");
130 122
     }
131 123
 
132
-    public function getSwordPassword()
133
-    {
124
+    public function getSwordPassword() {
134 125
         return $this->getSetting("swordPassword", "swordPassword");
135 126
     }
136 127
 
137
-    public function getSwordCollectionNamespace()
138
-    {
128
+    public function getSwordCollectionNamespace() {
139 129
         return $this->getSetting("swordCollectionNamespace", "swordCollectionNamespace");
140 130
     }
141 131
 
142
-    public function getFedoraHost()
143
-    {
132
+    public function getFedoraHost() {
144 133
         return $this->getSetting("fedoraHost", "fedoraHost");
145 134
     }
146 135
 
147
-    public function getFedoraUser()
148
-    {
136
+    public function getFedoraUser() {
149 137
         return $this->getSetting("fedoraUser", "fedoraUser");
150 138
     }
151 139
 
152
-    public function getFedoraPassword()
153
-    {
140
+    public function getFedoraPassword() {
154 141
         return $this->getSetting("fedoraPassword", "fedoraPassword");
155 142
     }
156 143
 
157
-    public function getElasticSearchHost()
158
-    {
144
+    public function getElasticSearchHost() {
159 145
         return $this->getSetting("elasticSearchHost", "elasticSearchHost");
160 146
     }
161 147
 
162
-    public function getElasticSearchPort()
163
-    {
148
+    public function getElasticSearchPort() {
164 149
         return $this->getSetting("elasticSearchPort", "elasticSearchPort");
165 150
     }
166 151
 
167
-    public function getElasticSearchIndexName()
168
-    {
152
+    public function getElasticSearchIndexName() {
169 153
         return $this->getSetting("elasticSearchIndexName", "elasticSearchIndexName");
170 154
     }
171 155
 
172
-    public function getUploadDirectory()
173
-    {
156
+    public function getUploadDirectory() {
174 157
         return $this->getSetting("uploadDirectory", "uploadDirectory");
175 158
     }
176 159
 
177
-    public function getUploadDomain()
178
-    {
160
+    public function getUploadDomain() {
179 161
         return $this->getSetting("uploadDomain", "uploadDomain");
180 162
     }
181 163
 
182
-    public function getSuggestionFlashMessage()
183
-    {
164
+    public function getSuggestionFlashMessage() {
184 165
         return $this->getSetting("suggestionFlashmessage", "suggestionFlashmessage");
185 166
     }
186 167
 
187
-    public function getFileXpath()
188
-    {
168
+    public function getFileXpath() {
189 169
         return $this->getSetting("fileXpath", "fileXpath");
190 170
     }
191 171
 
192
-    public function getStateXpath()
193
-    {
172
+    public function getStateXpath() {
194 173
         return $this->getSetting("stateXpath", "stateXpath");
195 174
     }
196 175
 
197
-    public function getTypeXpath()
198
-    {
176
+    public function getTypeXpath() {
199 177
         return $this->getSetting("typeXpath", "typeXpath");
200 178
     }
201 179
 
202
-    public function getTypeXpathInput()
203
-    {
180
+    public function getTypeXpathInput() {
204 181
         return $this->getSetting("typeXpathInput", "typeXpathInput");
205 182
     }
206 183
 
207
-    public function getUrnXpath()
208
-    {
184
+    public function getUrnXpath() {
209 185
         return $this->getSetting("urnXpath", "urnXpath");
210 186
     }
211 187
 
212
-    public function getPrimaryUrnXpath()
213
-    {
188
+    public function getPrimaryUrnXpath() {
214 189
         return $this->getSetting("primaryUrnXpath", "primaryUrnXpath");
215 190
     }
216 191
 
217
-    public function getDateXpath()
218
-    {
192
+    public function getDateXpath() {
219 193
         return $this->getSetting("dateXpath", "dateXpath");
220 194
     }
221 195
 
222
-    public function getPublishingYearXpath()
223
-    {
196
+    public function getPublishingYearXpath() {
224 197
         return $this->getSetting("publishingYearXpath", "publishingYearXpath");
225 198
     }
226 199
 
227
-    public function getNamespaces()
228
-    {
200
+    public function getNamespaces() {
229 201
         return $this->getSetting("namespaces", "namespaces");
230 202
     }
231 203
 
232
-    public function getTitleXpath()
233
-    {
204
+    public function getTitleXpath() {
234 205
         return $this->getSetting("titleXpath", "titleXpath");
235 206
     }
236 207
 
237
-    public function getOriginalSourceTitleXpath()
238
-    {
208
+    public function getOriginalSourceTitleXpath() {
239 209
         return $this->getSetting("originalSourceTitleXpath", "originalSourceTitleXpath");
240 210
     }
241 211
 
242
-    public function getProcessNumberXpath()
243
-    {
212
+    public function getProcessNumberXpath() {
244 213
         return $this->getSetting("processnumberXpath", "processnumberXpath");
245 214
     }
246 215
 
247
-    public function getSubmitterNameXpath()
248
-    {
216
+    public function getSubmitterNameXpath() {
249 217
         return $this->getSetting("submitterNameXpath", "submitterNameXpath");
250 218
     }
251 219
 
252
-    public function getSubmitterEmailXpath()
253
-    {
220
+    public function getSubmitterEmailXpath() {
254 221
         return $this->getSetting("submitterEmailXpath", "submitterEmailXpath");
255 222
     }
256 223
 
257
-    public function getSubmitterNoticeXpath()
258
-    {
224
+    public function getSubmitterNoticeXpath() {
259 225
         return $this->getSetting("submitterNoticeXpath", "submitterNoticeXpath");
260 226
     }
261 227
 
262
-    public function getCreatorXpath()
263
-    {
228
+    public function getCreatorXpath() {
264 229
         return $this->getSetting("creatorXpath", "creatorXpath");
265 230
     }
266 231
 
267
-    public function getCreationDateXpath()
268
-    {
232
+    public function getCreationDateXpath() {
269 233
         return $this->getSetting("creationDateXpath", "creationDateXpath");
270 234
     }
271 235
 
272
-    public function getRepositoryCreationDateXpath()
273
-    {
236
+    public function getRepositoryCreationDateXpath() {
274 237
         return $this->getSetting("repositoryCreationDateXpath", "repositoryCreationDateXpath");
275 238
     }
276 239
 
277
-    public function getRepositoryLastModDateXpath()
278
-    {
240
+    public function getRepositoryLastModDateXpath() {
279 241
         return $this->getSetting("repositoryLastModDateXpath", "repositoryLastModDateXpath");
280 242
     }
281 243
 
282
-    public function getDepositLicenseXpath()
283
-    {
244
+    public function getDepositLicenseXpath() {
284 245
         return $this->getSetting("depositLicenseXpath", "depositLicenseXpath");
285 246
     }
286 247
 
287
-    public function getAllNotesXpath()
288
-    {
248
+    public function getAllNotesXpath() {
289 249
         return $this->getSetting("allNotesXpath", "allNotesXpath");
290 250
     }
291 251
 
292
-    public function getPrivateNotesXpath()
293
-    {
252
+    public function getPrivateNotesXpath() {
294 253
         return $this->getSetting("privateNotesXpath", "privateNotesXpath");
295 254
     }
296 255
 
297
-    public function getInputTransformation()
298
-    {
256
+    public function getInputTransformation() {
299 257
         return $this->client->getInputTransformation()->current();
300 258
     }
301 259
 
302
-    public function getOutputTransformation()
303
-    {
260
+    public function getOutputTransformation() {
304 261
         return $this->client->getOutputTransformation()->current();
305 262
     }
306 263
 
307
-    public function getPersonXpath()
308
-    {
264
+    public function getPersonXpath() {
309 265
         return $this->getSetting("personXpath", "personXpath");
310 266
     }
311 267
 
312
-    public function getPersonFamilyXpath()
313
-    {
268
+    public function getPersonFamilyXpath() {
314 269
         return $this->getSetting("personFamilyXpath", "personFamilyXpath");
315 270
     }
316 271
 
317
-    public function getPersonGivenXpath()
318
-    {
272
+    public function getPersonGivenXpath() {
319 273
         return $this->getSetting("personGivenXpath", "personGivenXpath");
320 274
     }
321 275
 
322
-    public function getPersonRoleXpath()
323
-    {
276
+    public function getPersonRoleXpath() {
324 277
         return $this->getSetting("personRoleXpath", "personRoleXpath");
325 278
     }
326 279
 
327
-    public function getPersonFisIdentifierXpath()
328
-    {
280
+    public function getPersonFisIdentifierXpath() {
329 281
         return $this->getSetting("personFisIdentifierXpath", "personFisIdentifierXpath");
330 282
     }
331 283
 
332
-    public function getPersonAffiliationXpath()
333
-    {
284
+    public function getPersonAffiliationXpath() {
334 285
         return $this->getSetting("personAffiliationXpath", "personAffiliationXpath");
335 286
     }
336 287
 
337
-    public function getPersonAffiliationIdentifierXpath()
338
-    {
288
+    public function getPersonAffiliationIdentifierXpath() {
339 289
         return $this->getSetting("personAffiliationIdentifierXpath", "personAffiliationIdentifierXpath");
340 290
     }
341 291
 
342
-    public function getPersonAuthorRole()
343
-    {
292
+    public function getPersonAuthorRole() {
344 293
         return $this->getSetting("personAuthorRole", "personAuthorRole");
345 294
     }
346 295
 
347
-    public function getPersonPublisherRole()
348
-    {
296
+    public function getPersonPublisherRole() {
349 297
         return $this->getSetting("personPublisherRole", "personPublisherRole");
350 298
     }
351 299
 
352
-    public function getValidationXpath()
353
-    {
300
+    public function getValidationXpath() {
354 301
         return $this->getSetting("validationXpath", "validationXpath");
355 302
     }
356 303
 
357
-    public function fisIdXpath()
358
-    {
304
+    public function fisIdXpath() {
359 305
         return $this->getSetting("fisIdXpath", "fisIdXpath");
360 306
     }
361 307
 
362
-    public function getSourceDetailsXpaths()
363
-    {
308
+    public function getSourceDetailsXpaths() {
364 309
         return $this->getSetting("sourceDetailsXpaths", "sourceDetailsXpaths");
365 310
     }
366 311
 
367
-    public function getFedoraNamespace()
368
-    {
312
+    public function getFedoraNamespace() {
369 313
         $settings = $this->getTypoScriptSettings();
370 314
         return $settings['fedoraNamespace'];
371 315
     }
372 316
 
373
-    public function getUniversityCollection()
374
-    {
317
+    public function getUniversityCollection() {
375 318
         $settings = $this->getTypoScriptSettings();
376 319
         return $settings['universityCollection'];
377 320
     }
378 321
 
379
-    public function getTypoScriptSettings()
380
-    {
322
+    public function getTypoScriptSettings() {
381 323
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
382 324
         $configurationManager = $objectManager->get(ConfigurationManager::class);
383 325
         $settings = $configurationManager->getConfiguration(
Please login to merge, or discard this patch.
Classes/Helper/InternalFormat.php 3 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     public function setRepositoryState($state)
107 107
     {
108 108
         $stateXpath = $this->clientConfigurationManager->getStateXpath();
109
-        $this->setValue($stateXpath,$state);
109
+        $this->setValue($stateXpath, $state);
110 110
     }
111 111
 
112 112
     public function getProcessNumber()
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         $xpath = $this->getXpath();
339 339
         $data = [];
340 340
         $sourceDetailsXpaths = $this->clientConfigurationManager->getSourceDetailsXpaths();
341
-        $sourceDetailsXpathList = explode(";", trim($sourceDetailsXpaths," ;"));
341
+        $sourceDetailsXpathList = explode(";", trim($sourceDetailsXpaths, " ;"));
342 342
         $dataNodes = [];
343 343
 
344 344
         foreach ($sourceDetailsXpathList as $sourceDetailsXpathItem) {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
     {
374 374
         $xpath = $this->getXpath();
375 375
         $personXpath = $this->clientConfigurationManager->getPersonXpath();
376
-        $fisIdentifierXpath =  $this->clientConfigurationManager->getPersonFisIdentifierXpath();
376
+        $fisIdentifierXpath = $this->clientConfigurationManager->getPersonFisIdentifierXpath();
377 377
         $personNodes = $xpath->query(self::rootNode . $personXpath);
378 378
         $identifiers = [];
379 379
         foreach ($personNodes as $key => $node) {
@@ -405,9 +405,9 @@  discard block
 block discarded – undo
405 405
         $xpath = $this->getXpath();
406 406
         $notesNodes = $xpath->query(self::rootNode . $notesXpath);
407 407
 
408
-        $notes = array();
408
+        $notes = array ();
409 409
 
410
-        for ($i=0; $i < $notesNodes->length; $i++)
410
+        for ($i = 0; $i < $notesNodes->length; $i++)
411 411
         {
412 412
             $notes[] = $notesNodes->item($i)->nodeValue;
413 413
         }
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
         $parserGenerator = new ParserGenerator($this->clientPid);
423 423
         $parserGenerator->setXml($this->xml->saveXML());
424
-        $parserGenerator->customXPath($notesXpath,true, $noteContent);
424
+        $parserGenerator->customXPath($notesXpath, true, $noteContent);
425 425
         $this->xml = new \DOMDocument();
426 426
         $this->xml->loadXML($parserGenerator->getXMLData());
427 427
     }
@@ -448,9 +448,9 @@  discard block
 block discarded – undo
448 448
         $familyXpath = $this->clientConfigurationManager->getPersonFamilyXpath();
449 449
         $givenXpath = $this->clientConfigurationManager->getPersonGivenXpath();
450 450
         $roleXpath = $this->clientConfigurationManager->getPersonRoleXpath();
451
-        $fisIdentifierXpath =  $this->clientConfigurationManager->getPersonFisIdentifierXpath();
452
-        $affiliationXpath =  $this->clientConfigurationManager->getPersonAffiliationXpath();
453
-        $affiliationIdentifierXpath =  $this->clientConfigurationManager->getPersonAffiliationIdentifierXpath();
451
+        $fisIdentifierXpath = $this->clientConfigurationManager->getPersonFisIdentifierXpath();
452
+        $affiliationXpath = $this->clientConfigurationManager->getPersonAffiliationXpath();
453
+        $affiliationIdentifierXpath = $this->clientConfigurationManager->getPersonAffiliationIdentifierXpath();
454 454
 
455 455
         $xpath = $this->getXpath();
456 456
         $personNodes = $xpath->query(self::rootNode . $personXpath);
@@ -530,9 +530,9 @@  discard block
 block discarded – undo
530 530
      */
531 531
     public function getValidation()
532 532
     {
533
-        $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
533
+        $validationXpath = $this->clientConfigurationManager->getValidationXpath();
534 534
         $validation = $this->getValue($validationXpath);
535
-        return (strtolower($validation) === 'true')? true : false;
535
+        return (strtolower($validation) === 'true') ? true : false;
536 536
     }
537 537
 
538 538
     /**
@@ -540,8 +540,8 @@  discard block
 block discarded – undo
540 540
      */
541 541
     public function setValidation($validated)
542 542
     {
543
-        $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
544
-        $this->setValue($validationXpath, ($validated? 'true' : 'false'));
543
+        $validationXpath = $this->clientConfigurationManager->getValidationXpath();
544
+        $this->setValue($validationXpath, ($validated ? 'true' : 'false'));
545 545
     }
546 546
 
547 547
     /**
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
      */
550 550
     public function setFisId($fisId)
551 551
     {
552
-        $fisIdXpath =  $this->clientConfigurationManager->getFisIdXpath();
552
+        $fisIdXpath = $this->clientConfigurationManager->getFisIdXpath();
553 553
         $this->setValue($fisIdXpath, $fisId);
554 554
     }
555 555
 
@@ -577,10 +577,10 @@  discard block
 block discarded – undo
577 577
         $nodes = $xpath->query(self::rootNode . $xpathString);
578 578
         if ($nodes->length > 0) {
579 579
             $nodes->item(0)->nodeValue = $value;
580
-        } elseif(!empty($value)) {
580
+        } elseif (!empty($value)) {
581 581
             $parserGenerator = new ParserGenerator($this->clientPid);
582 582
             $parserGenerator->setXml($this->xml->saveXML());
583
-            $parserGenerator->customXPath($xpathString,true, $value);
583
+            $parserGenerator->customXPath($xpathString, true, $value);
584 584
             $this->xml = new \DOMDocument();
585 585
             $this->xml->loadXML($parserGenerator->getXMLData());
586 586
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
 
198 198
         $urnNodes = $xpath->query(self::rootNode . $primaryUrnXpath);
199 199
         if ($urnNodes->length > 0) {
200
-            return true;
200
+            return TRUE;
201 201
         } else {
202
-            return false;
202
+            return FALSE;
203 203
         }
204 204
     }
205 205
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         if ($urnNodes->length > 0) {
213 213
             return $urnNodes->item(0)->nodeValue;
214 214
         } else {
215
-            return false;
215
+            return FALSE;
216 216
         }
217 217
     }
218 218
 
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
         $parserGenerator = new ParserGenerator($this->clientPid);
423 423
         $parserGenerator->setXml($this->xml->saveXML());
424
-        $parserGenerator->customXPath($notesXpath,true, $noteContent);
424
+        $parserGenerator->customXPath($notesXpath,TRUE, $noteContent);
425 425
         $this->xml = new \DOMDocument();
426 426
         $this->xml->loadXML($parserGenerator->getXMLData());
427 427
     }
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     {
533 533
         $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
534 534
         $validation = $this->getValue($validationXpath);
535
-        return (strtolower($validation) === 'true')? true : false;
535
+        return (strtolower($validation) === 'true')? TRUE : FALSE;
536 536
     }
537 537
 
538 538
     /**
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
         } elseif(!empty($value)) {
581 581
             $parserGenerator = new ParserGenerator($this->clientPid);
582 582
             $parserGenerator->setXml($this->xml->saveXML());
583
-            $parserGenerator->customXPath($xpathString,true, $value);
583
+            $parserGenerator->customXPath($xpathString,TRUE, $value);
584 584
             $this->xml = new \DOMDocument();
585 585
             $this->xml->loadXML($parserGenerator->getXMLData());
586 586
         }
Please login to merge, or discard this patch.
Braces   +43 added lines, -82 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
 use EWW\Dpf\Services\ParserGenerator;
19 19
 use TYPO3\CMS\Extbase\Object\ObjectManager;
20 20
 
21
-class InternalFormat
22
-{
21
+class InternalFormat {
23 22
     const rootNode = '//data/';
24 23
 
25 24
     /**
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      * @param string $xml
47 46
      * @param int $clientPid
48 47
      */
49
-    public function __construct(string $xml, $clientPid = 0)
50
-    {
48
+    public function __construct(string $xml, $clientPid = 0) {
51 49
         $this->clientPid = $clientPid;
52 50
 
53 51
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
@@ -60,8 +58,7 @@  discard block
 block discarded – undo
60 58
         $this->setXml($xml);
61 59
     }
62 60
 
63
-    public function setXml($xml)
64
-    {
61
+    public function setXml($xml) {
65 62
         if (empty($xml)) {
66 63
             $xml = "<data></data>";
67 64
         }
@@ -71,8 +68,7 @@  discard block
 block discarded – undo
71 68
         $this->xml = $dom;
72 69
     }
73 70
 
74
-    public function getXml()
75
-    {
71
+    public function getXml() {
76 72
         return $this->xml->saveXML();
77 73
     }
78 74
 
@@ -80,37 +76,31 @@  discard block
 block discarded – undo
80 76
         return $this->xml;
81 77
     }
82 78
 
83
-    public function getXpath()
84
-    {
79
+    public function getXpath() {
85 80
         return $domXPath = \EWW\Dpf\Helper\XPath::create($this->xml);
86 81
     }
87 82
 
88
-    public function getDocumentType()
89
-    {
83
+    public function getDocumentType() {
90 84
         $typeXpath = $this->clientConfigurationManager->getTypeXpath();
91 85
         return $this->getValue($typeXpath);
92 86
     }
93 87
 
94
-    public function setDocumentType($type)
95
-    {
88
+    public function setDocumentType($type) {
96 89
         $typeXpath = $this->clientConfigurationManager->getTypeXpath();
97 90
         $this->setValue($typeXpath, $type);
98 91
     }
99 92
 
100
-    public function getRepositoryState()
101
-    {
93
+    public function getRepositoryState() {
102 94
         $stateXpath = $this->clientConfigurationManager->getStateXpath();
103 95
         return $this->getValue($stateXpath);
104 96
     }
105 97
 
106
-    public function setRepositoryState($state)
107
-    {
98
+    public function setRepositoryState($state) {
108 99
         $stateXpath = $this->clientConfigurationManager->getStateXpath();
109 100
         $this->setValue($stateXpath,$state);
110 101
     }
111 102
 
112
-    public function getProcessNumber()
113
-    {
103
+    public function getProcessNumber() {
114 104
         $processNumberXpath = $this->clientConfigurationManager->getProcessNumberXpath();
115 105
         if ($processNumberXpath) {
116 106
             return $this->getValue($processNumberXpath);
@@ -119,14 +109,12 @@  discard block
 block discarded – undo
119 109
         }
120 110
     }
121 111
 
122
-    public function setProcessNumber($processNumber)
123
-    {
112
+    public function setProcessNumber($processNumber) {
124 113
         $processNumberXpath = $this->clientConfigurationManager->getProcessNumberXpath();
125 114
         $this->setValue($processNumberXpath, $processNumber);
126 115
     }
127 116
 
128
-    public function getTitle()
129
-    {
117
+    public function getTitle() {
130 118
         $titleXpath = $this->clientConfigurationManager->getTitleXpath();
131 119
         $xpath = $this->getXpath();
132 120
 
@@ -141,14 +129,12 @@  discard block
 block discarded – undo
141 129
     /**
142 130
      * @param string $title
143 131
      */
144
-    public function setTitle($title)
145
-    {
132
+    public function setTitle($title) {
146 133
         $titleXpath = $this->clientConfigurationManager->getTitleXpath();
147 134
         $this->setValue($titleXpath, $title);
148 135
     }
149 136
 
150
-    public function getFiles()
151
-    {
137
+    public function getFiles() {
152 138
         $xpath = $this->getXpath();
153 139
 
154 140
         $fileXpath = $this->clientConfigurationManager->getFileXpath();
@@ -178,8 +164,7 @@  discard block
 block discarded – undo
178 164
         return $this->getValue($dateXpath);
179 165
     }
180 166
 
181
-    public function removeDateIssued()
182
-    {
167
+    public function removeDateIssued() {
183 168
         $xpath = $this->getXpath();
184 169
         $dateXpath = $this->clientConfigurationManager->getDateXpath();
185 170
 
@@ -190,8 +175,7 @@  discard block
 block discarded – undo
190 175
 
191 176
     }
192 177
 
193
-    public function hasPrimaryUrn()
194
-    {
178
+    public function hasPrimaryUrn() {
195 179
         $xpath = $this->getXpath();
196 180
         $primaryUrnXpath = $this->clientConfigurationManager->getPrimaryUrnXpath();
197 181
 
@@ -203,8 +187,7 @@  discard block
 block discarded – undo
203 187
         }
204 188
     }
205 189
 
206
-    public function getPrimaryUrn()
207
-    {
190
+    public function getPrimaryUrn() {
208 191
         $xpath = $this->getXpath();
209 192
         $primaryUrnXpath = $this->clientConfigurationManager->getPrimaryUrnXpath();
210 193
 
@@ -216,14 +199,12 @@  discard block
 block discarded – undo
216 199
         }
217 200
     }
218 201
 
219
-    public function setPrimaryUrn($urn)
220
-    {
202
+    public function setPrimaryUrn($urn) {
221 203
         $primaryUrnXpath = $this->clientConfigurationManager->getPrimaryUrnXpath();
222 204
         $this->setValue($primaryUrnXpath, $urn);
223 205
     }
224 206
 
225
-    public function clearAllUrn()
226
-    {
207
+    public function clearAllUrn() {
227 208
         $xpath = $this->getXpath();
228 209
         $urnXpath = $this->clientConfigurationManager->getUrnXpath();
229 210
         $primaryUrnXpath = $this->clientConfigurationManager->getPrimaryUrnXpath();
@@ -278,50 +259,42 @@  discard block
 block discarded – undo
278 259
         }
279 260
     }
280 261
 
281
-    public function getCreator()
282
-    {
262
+    public function getCreator() {
283 263
         $creatorXpath = $this->clientConfigurationManager->getCreatorXpath();
284 264
         return $this->getValue($creatorXpath);
285 265
     }
286 266
 
287
-    public function setCreator($creator)
288
-    {
267
+    public function setCreator($creator) {
289 268
         $creatorXpath = $this->clientConfigurationManager->getCreatorXpath();
290 269
         $this->setValue($creatorXpath, $creator);
291 270
     }
292 271
 
293
-    public function getCreationDate()
294
-    {
272
+    public function getCreationDate() {
295 273
         $xpath = $this->clientConfigurationManager->getCreationDateXpath();
296 274
         return $this->getValue($xpath);
297 275
     }
298 276
 
299
-    public function setCreationDate($creationDate)
300
-    {
277
+    public function setCreationDate($creationDate) {
301 278
         $xpath = $this->clientConfigurationManager->getCreationDateXpath();
302 279
         $this->setValue($xpath, $creationDate);
303 280
     }
304 281
 
305
-    public function getRepositoryCreationDate()
306
-    {
282
+    public function getRepositoryCreationDate() {
307 283
         $xpath = $this->clientConfigurationManager->getRepositoryCreationDateXpath();
308 284
         return $this->getValue($xpath);
309 285
     }
310 286
 
311
-    public function getRepositoryLastModDate()
312
-    {
287
+    public function getRepositoryLastModDate() {
313 288
         $xpath = $this->clientConfigurationManager->getRepositoryLastModDateXpath();
314 289
         return $this->getValue($xpath);
315 290
     }
316 291
 
317
-    public function getPublishingYear()
318
-    {
292
+    public function getPublishingYear() {
319 293
         $publishingYearXpath = $this->clientConfigurationManager->getPublishingYearXpath();
320 294
         return $this->getValue($publishingYearXpath);
321 295
     }
322 296
 
323
-    public function getOriginalSourceTitle()
324
-    {
297
+    public function getOriginalSourceTitle() {
325 298
         $originalSourceTitleXpath = $this->clientConfigurationManager->getOriginalSourceTitleXpath();
326 299
         return $this->getValue($originalSourceTitleXpath);
327 300
     }
@@ -329,8 +302,7 @@  discard block
 block discarded – undo
329 302
     /**
330 303
      * @return string
331 304
      */
332
-    public function getSourceDetails()
333
-    {
305
+    public function getSourceDetails() {
334 306
         if (empty($sourceDetailsXpaths)) {
335 307
             return '';
336 308
         }
@@ -389,8 +361,7 @@  discard block
 block discarded – undo
389 361
     /**
390 362
      * @return string
391 363
      */
392
-    public function getDepositLicense()
393
-    {
364
+    public function getDepositLicense() {
394 365
         $depositLicenseXpath = $this->clientConfigurationManager->getDepositLicenseXpath();
395 366
         return $this->getValue($depositLicenseXpath);
396 367
     }
@@ -398,8 +369,7 @@  discard block
 block discarded – undo
398 369
     /**
399 370
      * @return array
400 371
      */
401
-    public function getNotes()
402
-    {
372
+    public function getNotes() {
403 373
         $notesXpath = $this->clientConfigurationManager->getAllNotesXpath();
404 374
 
405 375
         $xpath = $this->getXpath();
@@ -407,16 +377,14 @@  discard block
 block discarded – undo
407 377
 
408 378
         $notes = array();
409 379
 
410
-        for ($i=0; $i < $notesNodes->length; $i++)
411
-        {
380
+        for ($i=0; $i < $notesNodes->length; $i++) {
412 381
             $notes[] = $notesNodes->item($i)->nodeValue;
413 382
         }
414 383
 
415 384
         return $notes;
416 385
     }
417 386
 
418
-    public function addNote($noteContent)
419
-    {
387
+    public function addNote($noteContent) {
420 388
         $notesXpath = $this->clientConfigurationManager->getPrivateNotesXpath();
421 389
 
422 390
         $parserGenerator = new ParserGenerator($this->clientPid);
@@ -426,13 +394,11 @@  discard block
 block discarded – undo
426 394
         $this->xml->loadXML($parserGenerator->getXMLData());
427 395
     }
428 396
 
429
-    public function getAuthors()
430
-    {
397
+    public function getAuthors() {
431 398
         return $this->getPersons($this->clientConfigurationManager->getPersonAuthorRole());
432 399
     }
433 400
 
434
-    public function getPublishers()
435
-    {
401
+    public function getPublishers() {
436 402
         return $this->getPersons($this->clientConfigurationManager->getPersonPublisherRole());
437 403
     }
438 404
 
@@ -442,8 +408,7 @@  discard block
 block discarded – undo
442 408
      * @param string $role
443 409
      * @return array
444 410
      */
445
-    public function getPersons($role = '')
446
-    {
411
+    public function getPersons($role = '') {
447 412
         $personXpath = $this->clientConfigurationManager->getPersonXpath();
448 413
         $familyXpath = $this->clientConfigurationManager->getPersonFamilyXpath();
449 414
         $givenXpath = $this->clientConfigurationManager->getPersonGivenXpath();
@@ -516,8 +481,9 @@  discard block
 block discarded – undo
516 481
         if ($role) {
517 482
             $result = [];
518 483
             foreach ($persons as $person) {
519
-                if ($person['role'] == $role)
520
-                    $result[] = $person;
484
+                if ($person['role'] == $role) {
485
+                                    $result[] = $person;
486
+                }
521 487
             }
522 488
             return $result;
523 489
         } else {
@@ -528,8 +494,7 @@  discard block
 block discarded – undo
528 494
     /**
529 495
      * @return bool
530 496
      */
531
-    public function getValidation()
532
-    {
497
+    public function getValidation() {
533 498
         $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
534 499
         $validation = $this->getValue($validationXpath);
535 500
         return (strtolower($validation) === 'true')? true : false;
@@ -538,8 +503,7 @@  discard block
 block discarded – undo
538 503
     /**
539 504
      * @param bool $validated
540 505
      */
541
-    public function setValidation($validated)
542
-    {
506
+    public function setValidation($validated) {
543 507
         $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
544 508
         $this->setValue($validationXpath, ($validated? 'true' : 'false'));
545 509
     }
@@ -547,8 +511,7 @@  discard block
 block discarded – undo
547 511
     /**
548 512
      * @param string $fisId
549 513
      */
550
-    public function setFisId($fisId)
551
-    {
514
+    public function setFisId($fisId) {
552 515
         $fisIdXpath =  $this->clientConfigurationManager->getFisIdXpath();
553 516
         $this->setValue($fisIdXpath, $fisId);
554 517
     }
@@ -557,8 +520,7 @@  discard block
 block discarded – undo
557 520
      * @param string $xpathString
558 521
      * @return string
559 522
      */
560
-    protected function getValue($xpathString)
561
-    {
523
+    protected function getValue($xpathString) {
562 524
         $xpath = $this->getXpath();
563 525
         $nodeList = $xpath->query(self::rootNode . $xpathString);
564 526
         if ($nodeList->length > 0) {
@@ -571,8 +533,7 @@  discard block
 block discarded – undo
571 533
      * @param string $xpathString
572 534
      * @param string $value
573 535
      */
574
-    protected function setValue($xpathString, $value)
575
-    {
536
+    protected function setValue($xpathString, $value) {
576 537
         $xpath = $this->getXpath();
577 538
         $nodes = $xpath->query(self::rootNode . $xpathString);
578 539
         if ($nodes->length > 0) {
Please login to merge, or discard this patch.
Classes/Helper/DocumentMapper.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 (
133 133
                     $this->getSettings()['deactivatePrimaryFileMandatoryCheck'] ||
134 134
                     $document->getDocumentType()->getVirtualType()
135
-                )? false : true
135
+                ) ? false : true
136 136
             )
137 137
         );
138 138
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         $internalFormat = new \EWW\Dpf\Helper\InternalFormat($document->getXmlData(), $this->clientPid);
151 151
 
152
-        $excludeGroupAttributes = array();
152
+        $excludeGroupAttributes = array ();
153 153
 
154 154
         foreach ($document->getDocumentType()->getMetadataPage() as $metadataPage) {
155 155
             $documentFormPage = new \EWW\Dpf\Domain\Model\DocumentFormPage();
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                 $xpath = $internalFormat->getXpath();
181 181
 
182 182
                 // get fixed attributes from xpath configuration
183
-                $fixedGroupAttributes = array();
183
+                $fixedGroupAttributes = array ();
184 184
 
185 185
                 preg_match_all('/[A-Za-z0-9:@\.]+(\[@.*?\])*/', $metadataGroup->getAbsoluteMapping(), $groupMappingPathParts);
186 186
                 $groupMappingPathParts = $groupMappingPathParts[0];
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 
400 400
         $documentData['documentUid'] = $documentForm->getDocumentUid();
401 401
         $documentData['metadata']    = $formMetaData['mods'];
402
-        $documentData['files']       = array();
402
+        $documentData['files']       = array ();
403 403
 
404 404
         $exporter->buildXmlFromForm($documentData);
405 405
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 
432 432
                 foreach ($group as $groupItem) {
433 433
 
434
-                    $item = array();
434
+                    $item = array ();
435 435
 
436 436
                     $uid           = $groupItem->getUid();
437 437
                     $metadataGroup = $this->metadataGroupRepository->findByUid($uid);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
                             $fieldMapping = $metadataObject->getRelativeMapping();
456 456
 
457
-                            $formField = array();
457
+                            $formField = array ();
458 458
 
459 459
                             $value = $fieldItem->getValue();
460 460
 
@@ -495,11 +495,11 @@  discard block
 block discarded – undo
495 495
                     }
496 496
 
497 497
                     if (!key_exists('attributes', $item)) {
498
-                        $item['attributes'] = array();
498
+                        $item['attributes'] = array ();
499 499
                     }
500 500
 
501 501
                     if (!key_exists('values', $item)) {
502
-                        $item['values'] = array();
502
+                        $item['values'] = array ();
503 503
                     }
504 504
 
505 505
                     if ($groupItem->getMandatory() || $defaultValueCount < $fieldValueCount || $defaultValueCount == $fieldCount) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
45 45
      * @TYPO3\CMS\Extbase\Annotation\Inject
46 46
      */
47
-    protected $metadataGroupRepository = null;
47
+    protected $metadataGroupRepository = NULL;
48 48
 
49 49
     /**
50 50
      * metadataObjectRepository
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
53 53
      * @TYPO3\CMS\Extbase\Annotation\Inject
54 54
      */
55
-    protected $metadataObjectRepository = null;
55
+    protected $metadataObjectRepository = NULL;
56 56
 
57 57
     /**
58 58
      * documentTypeRepository
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
61 61
      * @TYPO3\CMS\Extbase\Annotation\Inject
62 62
      */
63
-    protected $documentTypeRepository = null;
63
+    protected $documentTypeRepository = NULL;
64 64
 
65 65
     /**
66 66
      * documentRepository
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
69 69
      * @TYPO3\CMS\Extbase\Annotation\Inject
70 70
      */
71
-    protected $documentRepository = null;
71
+    protected $documentRepository = NULL;
72 72
 
73 73
     /**
74 74
      * fileRepository
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @var \EWW\Dpf\Domain\Repository\FileRepository
77 77
      * @TYPO3\CMS\Extbase\Annotation\Inject
78 78
      */
79
-    protected $fileRepository = null;
79
+    protected $fileRepository = NULL;
80 80
 
81 81
     /**
82 82
      * depositLicenseRepository
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      * @var \EWW\Dpf\Domain\Repository\DepositLicenseRepository
85 85
      * @TYPO3\CMS\Extbase\Annotation\Inject
86 86
      */
87
-    protected $depositLicenseRepository = null;
87
+    protected $depositLicenseRepository = NULL;
88 88
 
89 89
     /**
90 90
      * clientPid
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     /**
97 97
      * @var bool
98 98
      */
99
-    protected $customClientPid = false;
99
+    protected $customClientPid = FALSE;
100 100
 
101 101
     /**
102 102
      * Get typoscript settings
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @param bool $generateEmptyFields
119 119
      * @return \EWW\Dpf\Domain\Model\DocumentForm
120 120
      */
121
-    public function getDocumentForm(Document $document, $generateEmptyFields = true)
121
+    public function getDocumentForm(Document $document, $generateEmptyFields = TRUE)
122 122
     {
123 123
         $documentForm = new \EWW\Dpf\Domain\Model\DocumentForm();
124 124
         $documentForm->generateCsrfToken();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 (
133 133
                     $this->getSettings()['deactivatePrimaryFileMandatoryCheck'] ||
134 134
                     $document->getDocumentType()->getVirtualType()
135
-                )? false : true
135
+                )? FALSE : TRUE
136 136
             )
137 137
         );
138 138
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 // build mapping path, previous fixed attributes which are differ from
196 196
                 // the own fixed attributes are excluded
197 197
                 $queryGroupMapping = $metadataGroup->getAbsoluteMapping();
198
-                if (strpos($queryGroupMapping, "@displayLabel") === false && is_array($excludeGroupAttributes[$groupMappingName])) {
198
+                if (strpos($queryGroupMapping, "@displayLabel") === FALSE && is_array($excludeGroupAttributes[$groupMappingName])) {
199 199
                     foreach ($excludeGroupAttributes[$groupMappingName] as $excludeAttr => $excludeAttrValue) {
200 200
                         if (!in_array($excludeAttr, $fixedGroupAttributes)) {
201 201
                             $queryGroupMapping .= $excludeAttrValue;
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
                                 // ensure that e.g. <mods:detail> and <mods:detail type="volume">
255 255
                                 // are not recognized as the same node
256
-                                if ((strpos($value, "@") === false) && ($value != '.')) {
256
+                                if ((strpos($value, "@") === FALSE) && ($value != '.')) {
257 257
                                     $objectMappingPath[$key] .= "[not(@*)]";
258 258
                                 }
259 259
                             }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                     }
311 311
                 } else {
312 312
 
313
-                    $documentFormGroup->setEmptyGroup(true);
313
+                    $documentFormGroup->setEmptyGroup(TRUE);
314 314
 
315 315
                     foreach ($metadataGroup->getMetadataObject() as $metadataObject) {
316 316
                         $documentFormField = new \EWW\Dpf\Domain\Model\DocumentFormField();
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 
363 363
         if ($documentForm->getDocumentUid()) {
364 364
             if ($this->isCustomClientPid()) {
365
-                $this->documentRepository->crossClient(true);
365
+                $this->documentRepository->crossClient(TRUE);
366 366
             }
367 367
             $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
368 368
             $tempInternalFormat = new \EWW\Dpf\Helper\InternalFormat($document->getXmlData(), $this->clientPid);
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
      */
529 529
     public function setClientPid(int $clientPid): void
530 530
     {
531
-        $this->customClientPid = true;
531
+        $this->customClientPid = TRUE;
532 532
         $this->clientPid = $clientPid;
533 533
     }
534 534
 
Please login to merge, or discard this patch.
Classes/Domain/Repository/BookmarkRepository.php 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,15 +22,13 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * The repository for Bookmarks
24 24
  */
25
-class BookmarkRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
26
-{
25
+class BookmarkRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
27 26
     /**
28 27
      * @param int $feUserUid
29 28
      * @param string $identifier
30 29
      * @return object
31 30
      */
32
-    public function findBookmark($feUserUid, $identifier)
33
-    {
31
+    public function findBookmark($feUserUid, $identifier) {
34 32
         $query = $this->createQuery();
35 33
 
36 34
         $query->matching(
@@ -49,8 +47,7 @@  discard block
 block discarded – undo
49 47
      * @return bool
50 48
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
51 49
      */
52
-    public function removeBookmark($document, $feUserUid)
53
-    {
50
+    public function removeBookmark($document, $feUserUid) {
54 51
         $query = $this->createQuery();
55 52
 
56 53
         if ($document instanceof Document) {
@@ -88,8 +85,7 @@  discard block
 block discarded – undo
88 85
      * @return bool
89 86
      * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
90 87
      */
91
-    public function addBookmark($document, $feUserUid)
92
-    {
88
+    public function addBookmark($document, $feUserUid) {
93 89
         if ($document instanceof Document) {
94 90
             // The returned documentIdentifier is either a PID or the document UID (TYPO3 db), see also
95 91
             // the above method removeBookmark().
@@ -115,8 +111,7 @@  discard block
 block discarded – undo
115 111
      * @param Document $document
116 112
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
117 113
      */
118
-    public function findDocumentBookmarks(Document $document)
119
-    {
114
+    public function findDocumentBookmarks(Document $document) {
120 115
         $query = $this->createQuery();
121 116
 
122 117
         $constraintsAnd[] = $query->logicalOr(
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,10 +105,10 @@
 block discarded – undo
105 105
             $bookmark->setDocumentIdentifier($identifier);
106 106
             $bookmark->setFeUserUid($feUserUid);
107 107
             $this->add($bookmark);
108
-            return true;
108
+            return TRUE;
109 109
         }
110 110
 
111
-        return false;
111
+        return FALSE;
112 112
     }
113 113
 
114 114
     /**
Please login to merge, or discard this patch.
Classes/Domain/Repository/AbstractRepository.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * The abstract repository
19 19
  */
20
-class AbstractRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
21
-{
20
+class AbstractRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
22 21
     /**
23 22
      * Finds all records of all clients.
24 23
      *
@@ -34,8 +33,7 @@  discard block
 block discarded – undo
34 33
         return $query->execute($returnRawQueryResult);
35 34
     }
36 35
 
37
-    public function crossClient($active = false)
38
-    {
36
+    public function crossClient($active = false) {
39 37
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
40 38
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
41 39
         $querySettings->setRespectStoragePage(!$active);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
     public function crossClientFindAll($returnRawQueryResult = TRUE) {
29 29
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
30 30
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
31
-        $querySettings->setRespectStoragePage(false);
31
+        $querySettings->setRespectStoragePage(FALSE);
32 32
         $this->setDefaultQuerySettings($querySettings);
33 33
         $query = $this->createQuery();
34 34
         return $query->execute($returnRawQueryResult);
35 35
     }
36 36
 
37
-    public function crossClient($active = false)
37
+    public function crossClient($active = FALSE)
38 38
     {
39 39
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
40 40
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
Please login to merge, or discard this patch.
Classes/Domain/Repository/ClientRepository.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,16 +17,14 @@
 block discarded – undo
17 17
 /**
18 18
  * The repository for Clients
19 19
  */
20
-class ClientRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
21
-{
20
+class ClientRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
22 21
 
23 22
     /**
24 23
      * findAllByPid
25 24
      *
26 25
      * @return
27 26
      */
28
-    public function findAllByPid($pid)
29
-    {
27
+    public function findAllByPid($pid) {
30 28
         $query = $this->createQuery();
31 29
         $query->getQuerySettings()->setRespectStoragePage(false);
32 30
         $query->matching($query->equals('pid', $pid));
Please login to merge, or discard this patch.
Classes/Domain/Repository/FrontendUserRepository.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,15 +4,13 @@
 block discarded – undo
4 4
 use EWW\Dpf\Domain\Model\Document;
5 5
 use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
6 6
 
7
-class FrontendUserRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository
8
-{
7
+class FrontendUserRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository {
9 8
     /**
10 9
      * @param $feUserUid
11 10
      * @param $clientPid
12 11
      * @return bool
13 12
      */
14
-    public function isUserInClient($feUserUid, $clientPid)
15
-    {
13
+    public function isUserInClient($feUserUid, $clientPid) {
16 14
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
17 15
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
18 16
         $querySettings->setRespectStoragePage(false);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
17 17
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
18
-        $querySettings->setRespectStoragePage(false);
18
+        $querySettings->setRespectStoragePage(FALSE);
19 19
         $this->setDefaultQuerySettings($querySettings);
20 20
         $query = $this->createQuery();
21 21
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     public function setObjectIdentifier($objectIdentifier)
360 360
     {
361 361
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
362
-        $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
362
+        $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier;
363 363
     }
364 364
 
365 365
     /**
@@ -541,14 +541,14 @@  discard block
 block discarded – undo
541 541
 
542 542
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
543 543
 
544
-        $files = array();
544
+        $files = array ();
545 545
 
546 546
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
547 547
             foreach ($this->getFile() as $file) {
548 548
 
549 549
                 if (!$file->isFileGroupDeleted()) {
550 550
 
551
-                    $tmpFile = array(
551
+                    $tmpFile = array (
552 552
                         'path' => $file->getUrl(),
553 553
                         'type' => $file->getContentType(),
554 554
                         'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -592,12 +592,12 @@  discard block
 block discarded – undo
592 592
 
593 593
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
594 594
 
595
-        $files = array();
595
+        $files = array ();
596 596
 
597 597
         if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
598 598
             foreach ($this->getFile() as $file) {
599 599
 
600
-                $tmpFile = array(
600
+                $tmpFile = array (
601 601
                     'path' => $file->getUrl(),
602 602
                     'type' => $file->getContentType(),
603 603
                     'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()),
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
      */
750 750
     public function getCreator()
751 751
     {
752
-        return $this->creator? $this->creator : 0;
752
+        return $this->creator ? $this->creator : 0;
753 753
     }
754 754
 
755 755
     /**
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 
905 905
         foreach ($availableProperties as $propertyName) {
906 906
             if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName)
907
-                && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
907
+                && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) {
908 908
 
909 909
                 $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName);
910 910
                 \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue);
@@ -926,7 +926,7 @@  discard block
 block discarded – undo
926 926
      */
927 927
     public function getDocumentIdentifier()
928 928
     {
929
-        return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
929
+        return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid();
930 930
     }
931 931
 
932 932
     /**
@@ -959,8 +959,8 @@  discard block
 block discarded – undo
959 959
     public function getPublicationYear()
960 960
     {
961 961
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
962
-        $year =  $internalFormat->getPublishingYear();
963
-        return $year? $year : "";
962
+        $year = $internalFormat->getPublishingYear();
963
+        return $year ? $year : "";
964 964
     }
965 965
 
966 966
     /**
Please login to merge, or discard this patch.
Braces   +64 added lines, -128 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * Document
23 23
  */
24
-class Document extends AbstractEntity
25
-{
24
+class Document extends AbstractEntity {
26 25
     // xml data size ist limited to 64 KB
27 26
     const XML_DATA_SIZE_LIMIT = 64 * 1024;
28 27
 
@@ -213,8 +212,7 @@  discard block
 block discarded – undo
213 212
     /**
214 213
      * __construct
215 214
      */
216
-    public function __construct()
217
-    {
215
+    public function __construct() {
218 216
         //Do not remove the next line: It would break the functionality
219 217
         $this->initStorageObjects();
220 218
     }
@@ -224,8 +222,7 @@  discard block
 block discarded – undo
224 222
      *
225 223
      * @return void
226 224
      */
227
-    protected function initStorageObjects()
228
-    {
225
+    protected function initStorageObjects() {
229 226
         $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
230 227
         $this->initCreationDate();
231 228
     }
@@ -235,8 +232,7 @@  discard block
 block discarded – undo
235 232
      *
236 233
      * @return string $title
237 234
      */
238
-    public function getTitle()
239
-    {
235
+    public function getTitle() {
240 236
         return $this->title;
241 237
     }
242 238
 
@@ -246,8 +242,7 @@  discard block
 block discarded – undo
246 242
      * @param string $title
247 243
      * @return void
248 244
      */
249
-    public function setTitle($title)
250
-    {
245
+    public function setTitle($title) {
251 246
         $this->title = $title ?? '';
252 247
         //htmlspecialchars_decode($title,ENT_QUOTES);
253 248
     }
@@ -257,8 +252,7 @@  discard block
 block discarded – undo
257 252
      *
258 253
      * @return array $authors
259 254
      */
260
-    public function getAuthors()
261
-    {
255
+    public function getAuthors() {
262 256
         $authors = @unserialize($this->authors);
263 257
         if (is_array($authors)) {
264 258
             return $authors;
@@ -273,8 +267,7 @@  discard block
 block discarded – undo
273 267
      * @param array $authors
274 268
      * @return void
275 269
      */
276
-    public function setAuthors($authors)
277
-    {
270
+    public function setAuthors($authors) {
278 271
         $this->authors = serialize($authors);
279 272
     }
280 273
 
@@ -283,8 +276,7 @@  discard block
 block discarded – undo
283 276
      *
284 277
      * @return string $xmlData
285 278
      */
286
-    public function getXmlData()
287
-    {
279
+    public function getXmlData() {
288 280
         return $this->xmlData;
289 281
     }
290 282
 
@@ -294,8 +286,7 @@  discard block
 block discarded – undo
294 286
      * @param string $xmlData
295 287
      * @return void
296 288
      */
297
-    public function setXmlData($xmlData)
298
-    {
289
+    public function setXmlData($xmlData) {
299 290
         $this->xmlData = $xmlData;
300 291
     }
301 292
 
@@ -304,8 +295,7 @@  discard block
 block discarded – undo
304 295
      *
305 296
      * @return string $slubInfoData
306 297
      */
307
-    public function getSlubInfoData()
308
-    {
298
+    public function getSlubInfoData() {
309 299
         return $this->slubInfoData;
310 300
     }
311 301
 
@@ -314,8 +304,7 @@  discard block
 block discarded – undo
314 304
      *
315 305
      * @return string $slubInfoData
316 306
      */
317
-    public function setSlubInfoData($slubInfoData)
318
-    {
307
+    public function setSlubInfoData($slubInfoData) {
319 308
         $this->slubInfoData = $slubInfoData;
320 309
     }
321 310
 
@@ -324,8 +313,7 @@  discard block
 block discarded – undo
324 313
      *
325 314
      * @return \EWW\Dpf\Domain\Model\DocumentType $documentType
326 315
      */
327
-    public function getDocumentType()
328
-    {
316
+    public function getDocumentType() {
329 317
         return $this->documentType;
330 318
     }
331 319
 
@@ -335,8 +323,7 @@  discard block
 block discarded – undo
335 323
      * @param \EWW\Dpf\Domain\Model\DocumentType $documentType
336 324
      * @return void
337 325
      */
338
-    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType)
339
-    {
326
+    public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) {
340 327
         $this->documentType = $documentType;
341 328
     }
342 329
 
@@ -345,8 +332,7 @@  discard block
 block discarded – undo
345 332
      *
346 333
      * @return string
347 334
      */
348
-    public function getObjectIdentifier()
349
-    {
335
+    public function getObjectIdentifier() {
350 336
         return $this->objectIdentifier;
351 337
     }
352 338
 
@@ -356,8 +342,7 @@  discard block
 block discarded – undo
356 342
      * @param string $objectIdentifier
357 343
      * @return void
358 344
      */
359
-    public function setObjectIdentifier($objectIdentifier)
360
-    {
345
+    public function setObjectIdentifier($objectIdentifier) {
361 346
         // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers.
362 347
         $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier;
363 348
     }
@@ -367,8 +352,7 @@  discard block
 block discarded – undo
367 352
      *
368 353
      * @return string
369 354
      */
370
-    public function getReservedObjectIdentifier()
371
-    {
355
+    public function getReservedObjectIdentifier() {
372 356
         return $this->reservedObjectIdentifier;
373 357
     }
374 358
 
@@ -378,8 +362,7 @@  discard block
 block discarded – undo
378 362
      * @param string $reservedObjectIdentifier
379 363
      * @return void
380 364
      */
381
-    public function setReservedObjectIdentifier($reservedObjectIdentifier)
382
-    {
365
+    public function setReservedObjectIdentifier($reservedObjectIdentifier) {
383 366
         $this->reservedObjectIdentifier = $reservedObjectIdentifier;
384 367
     }
385 368
 
@@ -388,8 +371,7 @@  discard block
 block discarded – undo
388 371
      *
389 372
      * @return string
390 373
      */
391
-    public function getTransferStatus()
392
-    {
374
+    public function getTransferStatus() {
393 375
         return $this->transferStatus;
394 376
     }
395 377
 
@@ -399,8 +381,7 @@  discard block
 block discarded – undo
399 381
      * @param string
400 382
      * @return void
401 383
      */
402
-    public function setTransferStatus($transferStatus)
403
-    {
384
+    public function setTransferStatus($transferStatus) {
404 385
         $this->transferStatus = $transferStatus;
405 386
     }
406 387
 
@@ -409,8 +390,7 @@  discard block
 block discarded – undo
409 390
      *
410 391
      * @return integer
411 392
      */
412
-    public function getTransferDate()
413
-    {
393
+    public function getTransferDate() {
414 394
         return $this->transferDate;
415 395
     }
416 396
 
@@ -420,8 +400,7 @@  discard block
 block discarded – undo
420 400
      * @param integer $transferDate
421 401
      * @return void
422 402
      */
423
-    public function setTransferDate($transferDate)
424
-    {
403
+    public function setTransferDate($transferDate) {
425 404
         $this->transferDate = $transferDate;
426 405
     }
427 406
 
@@ -430,8 +409,7 @@  discard block
 block discarded – undo
430 409
      *
431 410
      * @var integer
432 411
      */
433
-    public function getTransferErrorCode()
434
-    {
412
+    public function getTransferErrorCode() {
435 413
         return $this->transferErrorCode;
436 414
     }
437 415
 
@@ -441,8 +419,7 @@  discard block
 block discarded – undo
441 419
      * @param integer $transferErrorCode
442 420
      * @return void
443 421
      */
444
-    public function setTransferErrorCode($transferErrorCode)
445
-    {
422
+    public function setTransferErrorCode($transferErrorCode) {
446 423
         $this->transferErrorCode = $transferErrorCode;
447 424
     }
448 425
 
@@ -451,8 +428,7 @@  discard block
 block discarded – undo
451 428
      *
452 429
      * @var string
453 430
      */
454
-    public function getTransferResponse()
455
-    {
431
+    public function getTransferResponse() {
456 432
         return $this->transferResponse;
457 433
     }
458 434
 
@@ -462,8 +438,7 @@  discard block
 block discarded – undo
462 438
      * @param string $transferResponse
463 439
      * @return void
464 440
      */
465
-    public function setTransferResponse($transferResponse)
466
-    {
441
+    public function setTransferResponse($transferResponse) {
467 442
         $this->transferResponse = $transferResponse;
468 443
     }
469 444
 
@@ -472,8 +447,7 @@  discard block
 block discarded – undo
472 447
      *
473 448
      * @var integer
474 449
      */
475
-    public function getTransferHttpStatus()
476
-    {
450
+    public function getTransferHttpStatus() {
477 451
         return $this->transferHttpStatus;
478 452
     }
479 453
 
@@ -483,8 +457,7 @@  discard block
 block discarded – undo
483 457
      * @param integer $transferHttpStatus
484 458
      * @return void
485 459
      */
486
-    public function setTransferHttpStatus($transferHttpStatus)
487
-    {
460
+    public function setTransferHttpStatus($transferHttpStatus) {
488 461
         $this->transferHttpStatus = $transferHttpStatus;
489 462
     }
490 463
 
@@ -494,8 +467,7 @@  discard block
 block discarded – undo
494 467
      * @param \EWW\Dpf\Domain\Model\File $file
495 468
      * @return void
496 469
      */
497
-    public function addFile(\EWW\Dpf\Domain\Model\File $file)
498
-    {
470
+    public function addFile(\EWW\Dpf\Domain\Model\File $file) {
499 471
         $this->file->attach($file);
500 472
     }
501 473
 
@@ -505,8 +477,7 @@  discard block
 block discarded – undo
505 477
      * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed
506 478
      * @return void
507 479
      */
508
-    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove)
509
-    {
480
+    public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) {
510 481
         $this->file->detach($fileToRemove);
511 482
     }
512 483
 
@@ -515,8 +486,7 @@  discard block
 block discarded – undo
515 486
      *
516 487
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
517 488
      */
518
-    public function getFile()
519
-    {
489
+    public function getFile() {
520 490
         return $this->file;
521 491
     }
522 492
 
@@ -526,8 +496,7 @@  discard block
 block discarded – undo
526 496
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file
527 497
      * @return void
528 498
      */
529
-    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file)
530
-    {
499
+    public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) {
531 500
         $this->file = $file;
532 501
     }
533 502
 
@@ -536,8 +505,7 @@  discard block
 block discarded – undo
536 505
      *
537 506
      * @return array
538 507
      */
539
-    public function getFileData()
540
-    {
508
+    public function getFileData() {
541 509
 
542 510
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
543 511
 
@@ -587,8 +555,7 @@  discard block
 block discarded – undo
587 555
      *
588 556
      * @return array
589 557
      */
590
-    public function getCurrentFileData()
591
-    {
558
+    public function getCurrentFileData() {
592 559
 
593 560
         $fileId = new \EWW\Dpf\Services\Transfer\FileId($this);
594 561
 
@@ -636,8 +603,7 @@  discard block
 block discarded – undo
636 603
      *
637 604
      * @return boolean $changed
638 605
      */
639
-    public function getChanged()
640
-    {
606
+    public function getChanged() {
641 607
         return $this->changed;
642 608
     }
643 609
 
@@ -647,8 +613,7 @@  discard block
 block discarded – undo
647 613
      * @param boolean $changed
648 614
      * @return void
649 615
      */
650
-    public function setChanged($changed)
651
-    {
616
+    public function setChanged($changed) {
652 617
         $this->changed = boolval($changed);
653 618
     }
654 619
 
@@ -657,8 +622,7 @@  discard block
 block discarded – undo
657 622
      *
658 623
      * @return boolean $valid
659 624
      */
660
-    public function getValid()
661
-    {
625
+    public function getValid() {
662 626
         return $this->valid;
663 627
     }
664 628
 
@@ -668,8 +632,7 @@  discard block
 block discarded – undo
668 632
      * @param boolean $valid
669 633
      * @return void
670 634
      */
671
-    public function setValid($valid)
672
-    {
635
+    public function setValid($valid) {
673 636
         $this->valid = boolval($valid);
674 637
     }
675 638
 
@@ -678,8 +641,7 @@  discard block
 block discarded – undo
678 641
      *
679 642
      * @return string
680 643
      */
681
-    public function getDateIssued()
682
-    {
644
+    public function getDateIssued() {
683 645
         return empty($this->dateIssued) ? '' : $this->dateIssued;
684 646
     }
685 647
 
@@ -689,8 +651,7 @@  discard block
 block discarded – undo
689 651
      * @param string $dateIssued
690 652
      * @return void
691 653
      */
692
-    public function setDateIssued($dateIssued)
693
-    {
654
+    public function setDateIssued($dateIssued) {
694 655
         $this->dateIssued = empty($dateIssued) ? '' : $dateIssued;
695 656
     }
696 657
 
@@ -700,8 +661,7 @@  discard block
 block discarded – undo
700 661
      *
701 662
      * @return string
702 663
      */
703
-    public function getProcessNumber()
704
-    {
664
+    public function getProcessNumber() {
705 665
         return $this->processNumber;
706 666
     }
707 667
 
@@ -711,8 +671,7 @@  discard block
 block discarded – undo
711 671
      * @param string $processNumber
712 672
      * @return void
713 673
      */
714
-    public function setProcessNumber($processNumber)
715
-    {
674
+    public function setProcessNumber($processNumber) {
716 675
         $this->processNumber = trim($processNumber);
717 676
     }
718 677
 
@@ -721,8 +680,7 @@  discard block
 block discarded – undo
721 680
      *
722 681
      * @return string
723 682
      */
724
-    public function getSubmitterName()
725
-    {
683
+    public function getSubmitterName() {
726 684
         try {
727 685
             $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
728 686
             return $internalFormat->getSubmitterName();
@@ -736,8 +694,7 @@  discard block
 block discarded – undo
736 694
      *
737 695
      * @return string
738 696
      */
739
-    public function getPrimaryUrn()
740
-    {
697
+    public function getPrimaryUrn() {
741 698
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
742 699
         return $internalFormat->getPrimaryUrn();
743 700
     }
@@ -747,8 +704,7 @@  discard block
 block discarded – undo
747 704
      *
748 705
      * @return int
749 706
      */
750
-    public function getCreator()
751
-    {
707
+    public function getCreator() {
752 708
         return $this->creator? $this->creator : 0;
753 709
     }
754 710
 
@@ -758,24 +714,20 @@  discard block
 block discarded – undo
758 714
      * @param int $creator
759 715
      * @return void
760 716
      */
761
-    public function setCreator($creator)
762
-    {
717
+    public function setCreator($creator) {
763 718
         $this->creator = $creator;
764 719
     }
765 720
 
766
-    public function getState()
767
-    {
721
+    public function getState() {
768 722
         return $this->state;
769 723
     }
770 724
 
771
-    public function setState($state)
772
-    {
725
+    public function setState($state) {
773 726
         $this->stateChange = $this->state != $state;
774 727
         $this->state = $state;
775 728
     }
776 729
 
777
-    public function getRemoteState()
778
-    {
730
+    public function getRemoteState() {
779 731
         $state = explode(':', $this->state);
780 732
         if (is_array($state) && array_key_exists(1, $state)) {
781 733
             return $state[1];
@@ -813,8 +765,7 @@  discard block
 block discarded – undo
813 765
     /**
814 766
      * @return string
815 767
      */
816
-    public function getRemoteLastModDate()
817
-    {
768
+    public function getRemoteLastModDate() {
818 769
         return $this->remoteLastModDate;
819 770
     }
820 771
 
@@ -822,24 +773,21 @@  discard block
 block discarded – undo
822 773
      * @param string $remoteLastModDate
823 774
      * @return void
824 775
      */
825
-    public function setRemoteLastModDate($remoteLastModDate)
826
-    {
776
+    public function setRemoteLastModDate($remoteLastModDate) {
827 777
         $this->remoteLastModDate = $remoteLastModDate;
828 778
     }
829 779
 
830 780
     /**
831 781
      * @return integer
832 782
      */
833
-    public function getTstamp()
834
-    {
783
+    public function getTstamp() {
835 784
         return $this->tstamp;
836 785
     }
837 786
 
838 787
     /**
839 788
      * @return integer
840 789
      */
841
-    public function getPid()
842
-    {
790
+    public function getPid() {
843 791
         return $this->pid;
844 792
     }
845 793
 
@@ -854,8 +802,7 @@  discard block
 block discarded – undo
854 802
     /**
855 803
      * @param bool $suggestion
856 804
      */
857
-    public function setSuggestion(bool $suggestion)
858
-    {
805
+    public function setSuggestion(bool $suggestion) {
859 806
         $this->suggestion = boolval($suggestion);
860 807
     }
861 808
 
@@ -870,8 +817,7 @@  discard block
 block discarded – undo
870 817
     /**
871 818
      * @param string $linkedUid
872 819
      */
873
-    public function setLinkedUid(string $linkedUid)
874
-    {
820
+    public function setLinkedUid(string $linkedUid) {
875 821
         $this->linkedUid = $linkedUid;
876 822
     }
877 823
 
@@ -886,8 +832,7 @@  discard block
 block discarded – undo
886 832
     /**
887 833
      * @param string $comment
888 834
      */
889
-    public function setComment(string $comment)
890
-    {
835
+    public function setComment(string $comment) {
891 836
         $this->comment = $comment;
892 837
     }
893 838
 
@@ -924,8 +869,7 @@  discard block
 block discarded – undo
924 869
      *
925 870
      * @return string|int
926 871
      */
927
-    public function getDocumentIdentifier()
928
-    {
872
+    public function getDocumentIdentifier() {
929 873
         return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid();
930 874
     }
931 875
 
@@ -934,8 +878,7 @@  discard block
 block discarded – undo
934 878
      *
935 879
      * @return bool
936 880
      */
937
-    public function isWorkingCopy()
938
-    {
881
+    public function isWorkingCopy() {
939 882
         return $this->getObjectIdentifier() && !$this->isTemporary() && !$this->isSuggestion();
940 883
     }
941 884
 
@@ -945,8 +888,7 @@  discard block
 block discarded – undo
945 888
      *
946 889
      * @return bool
947 890
      */
948
-    public function isTemporaryCopy()
949
-    {
891
+    public function isTemporaryCopy() {
950 892
         return $this->getObjectIdentifier() && $this->isTemporary() && !$this->isSuggestion();
951 893
     }
952 894
 
@@ -956,8 +898,7 @@  discard block
 block discarded – undo
956 898
      *
957 899
      * @return string|null
958 900
      */
959
-    public function getPublicationYear()
960
-    {
901
+    public function getPublicationYear() {
961 902
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
962 903
         $year =  $internalFormat->getPublishingYear();
963 904
         return $year? $year : "";
@@ -968,8 +909,7 @@  discard block
 block discarded – undo
968 909
      *
969 910
      * @return string|null
970 911
      */
971
-    public function getSourceDetails()
972
-    {
912
+    public function getSourceDetails() {
973 913
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
974 914
         $data = $internalFormat->getSourceDetails();
975 915
         return $data;
@@ -986,8 +926,7 @@  discard block
 block discarded – undo
986 926
     /**
987 927
      * @param \DateTime|null $embargoDate
988 928
      */
989
-    public function setEmbargoDate(?\DateTime $embargoDate)
990
-    {
929
+    public function setEmbargoDate(?\DateTime $embargoDate) {
991 930
         $this->embargoDate = $embargoDate;
992 931
     }
993 932
 
@@ -1010,8 +949,7 @@  discard block
 block discarded – undo
1010 949
     /**
1011 950
      * @return array
1012 951
      */
1013
-    public function getPreviouslyAssignedFobIdentifiers()
1014
-    {
952
+    public function getPreviouslyAssignedFobIdentifiers() {
1015 953
         return array_diff(
1016 954
             $this->getAssignedFobIdentifiers(), $this->getNewlyAssignedFobIdentifiers()
1017 955
         );
@@ -1037,8 +975,7 @@  discard block
 block discarded – undo
1037 975
     /**
1038 976
      * @return mixed
1039 977
      */
1040
-    public function getDepositLicense()
1041
-    {
978
+    public function getDepositLicense() {
1042 979
         $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid());
1043 980
         $data = $internalFormat->getDepositLicense();
1044 981
         return $data;
@@ -1081,8 +1018,7 @@  discard block
 block discarded – undo
1081 1018
     /**
1082 1019
      * @return bool
1083 1020
      */
1084
-    public function isClientChangeable()
1085
-    {
1021
+    public function isClientChangeable() {
1086 1022
         return (
1087 1023
             in_array(
1088 1024
                 $this->getState(),
Please login to merge, or discard this patch.