Passed
Pull Request — master (#209)
by
unknown
33:50 queued 24:56
created
Classes/Configuration/ClientConfigurationManager.php 1 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 1 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, int $clientPid = 0)
50
-    {
48
+    public function __construct(string $xml, int $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/Domain/Repository/DocumentRepository.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * The repository for Documents
24 24
  */
25
-class DocumentRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository
26
-{
25
+class DocumentRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository {
27 26
     /**
28 27
      * Finds all suggestion documents of the given user role filtered by creator feuser uid
29 28
      *
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
      * @param int $creatorUid
32 31
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
33 32
      */
34
-    public function findAllDocumentSuggestions($role, $creatorUid)
35
-    {
33
+    public function findAllDocumentSuggestions($role, $creatorUid) {
36 34
         $query = $this->createQuery();
37 35
 
38 36
         switch ($role) {
@@ -61,8 +59,7 @@  discard block
 block discarded – undo
61 59
      * @param boolean $temporary
62 60
      * @return array
63 61
      */
64
-    public function getObjectIdentifiers($temporary = false)
65
-    {
62
+    public function getObjectIdentifiers($temporary = false) {
66 63
         $query = $this->createQuery();
67 64
 
68 65
         $constraints = array(
@@ -99,8 +96,7 @@  discard block
 block discarded – undo
99 96
      *
100 97
      * @return array The found Document Objects
101 98
      */
102
-    public function findDocumentsWithoutProcessNumber()
103
-    {
99
+    public function findDocumentsWithoutProcessNumber() {
104 100
         $query = $this->createQuery();
105 101
         $query->getQuerySettings()->setRespectStoragePage(false);
106 102
 
@@ -126,8 +122,7 @@  discard block
 block discarded – undo
126 122
      * @param integer $timeout : Time interval (in seconds) in which documents are not outdated.
127 123
      * @return array The found Document Objects
128 124
      */
129
-    public function findOutdatedTemporaryDocuments($timeout = 3600)
130
-    {
125
+    public function findOutdatedTemporaryDocuments($timeout = 3600) {
131 126
         $query = $this->createQuery();
132 127
 
133 128
         $dateTimeObj = new \DateTime();
@@ -152,8 +147,7 @@  discard block
 block discarded – undo
152 147
      * @param integer $timeout : Time interval (in seconds) in which documents are not outdated.
153 148
      * @return array The found Document Objects
154 149
      */
155
-    public function findOutdatedLockedDocuments($timeout = 3600)
156
-    {
150
+    public function findOutdatedLockedDocuments($timeout = 3600) {
157 151
         $query = $this->createQuery();
158 152
 
159 153
         $dateTimeObj = new \DateTime();
@@ -177,8 +171,7 @@  discard block
 block discarded – undo
177 171
      * @param string $objectIdentifier
178 172
      * @return array
179 173
      */
180
-    public function findWorkingCopyByObjectIdentifier($objectIdentifier)
181
-    {
174
+    public function findWorkingCopyByObjectIdentifier($objectIdentifier) {
182 175
         $query = $this->createQuery();
183 176
 
184 177
         $constraints = array(
@@ -196,8 +189,7 @@  discard block
 block discarded – undo
196 189
      * @param string $identifier
197 190
      * @return Document
198 191
      */
199
-    public function findByIdentifier($identifier)
200
-    {
192
+    public function findByIdentifier($identifier) {
201 193
         $query = $this->createQuery();
202 194
 
203 195
         if (Identifier::isUid($identifier)) {
@@ -234,8 +226,7 @@  discard block
 block discarded – undo
234 226
      * @param bool $includeSuggestion
235 227
      * @return Document
236 228
      */
237
-    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false)
238
-    {
229
+    public function findWorkingCopy($identifier, $includeTemporary = false, $includeSuggestion = false) {
239 230
         $query = $this->createQuery();
240 231
 
241 232
         if (is_numeric($identifier)) {
@@ -261,8 +252,7 @@  discard block
 block discarded – undo
261 252
      * @param object $modifiedObject The modified object
262 253
      * @throws \Exception
263 254
      */
264
-    public function update($modifiedObject)
265
-    {
255
+    public function update($modifiedObject) {
266 256
         /** @var Document $document */
267 257
         $document = $modifiedObject;
268 258
 
@@ -287,8 +277,7 @@  discard block
 block discarded – undo
287 277
     }
288 278
 
289 279
 
290
-    public function updateCreator()
291
-    {
280
+    public function updateCreator() {
292 281
 
293 282
         $query = $this->createQuery();
294 283
         $query->statement("update tx_dpf_domain_model_document set creator = owner");
@@ -300,8 +289,7 @@  discard block
 block discarded – undo
300 289
      * Finds all records with embargo date
301 290
      * @return mixed
302 291
      */
303
-    public function crossClientEmbargoFindAll()
304
-    {
292
+    public function crossClientEmbargoFindAll() {
305 293
         /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
306 294
         $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
307 295
         $querySettings->setRespectStoragePage(false);
Please login to merge, or discard this patch.
Classes/Domain/Repository/BookmarkRepository.php 1 patch
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.
Classes/Domain/Repository/AbstractRepository.php 1 patch
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.
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 1 patch
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.
Classes/Domain/Model/Document.php 1 patch
Braces   +63 added lines, -126 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;
Please login to merge, or discard this patch.
Classes/Controller/BackendAdminController.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
 /**
33 33
 * Backend module user/group action controller
34 34
 */
35
-class BackendAdminController extends ActionController
36
-{
35
+class BackendAdminController extends ActionController {
37 36
     /**
38 37
      * documentRepository
39 38
      *
@@ -95,8 +94,7 @@  discard block
 block discarded – undo
95 94
      * @param ViewInterface $view
96 95
      * @return void
97 96
      */
98
-    protected function initializeView(ViewInterface $view)
99
-    {
97
+    protected function initializeView(ViewInterface $view) {
100 98
         /** @var BackendTemplateView $view */
101 99
         parent::initializeView($view);
102 100
         if ($this->actionMethodName == 'indexAction'
@@ -114,8 +112,7 @@  discard block
 block discarded – undo
114 112
     /**
115 113
      * @param string $identifier
116 114
      */
117
-    public function searchDocumentAction(string $identifier = '')
118
-    {
115
+    public function searchDocumentAction(string $identifier = '') {
119 116
         $identifier = trim($identifier);
120 117
         $this->view->assign('identifier', $identifier);
121 118
 
@@ -147,8 +144,7 @@  discard block
 block discarded – undo
147 144
      * @param Document $document
148 145
      * @param string $identifier
149 146
      */
150
-    public function chooseNewClientAction(Document $document, string $identifier)
151
-    {
147
+    public function chooseNewClientAction(Document $document, string $identifier) {
152 148
         if ($document) {
153 149
             if ($this->canChangeClient($document)) {
154 150
                 /** @var Client $currentClient */
@@ -201,8 +197,7 @@  discard block
 block discarded – undo
201 197
      * @param string $identifier
202 198
      * @param DocumentType $documentType
203 199
      */
204
-    public function changeClientAction(Document $document, Client $client, string $identifier, DocumentType $documentType = null)
205
-    {
200
+    public function changeClientAction(Document $document, Client $client, string $identifier, DocumentType $documentType = null) {
206 201
         if ($documentType instanceof DocumentType) {
207 202
             if ($this->canChangeClient($document)) {
208 203
 
@@ -303,8 +298,7 @@  discard block
 block discarded – undo
303 298
     /**
304 299
      * @param Document $document
305 300
      */
306
-    protected function canChangeClient(Document $document)
307
-    {
301
+    protected function canChangeClient(Document $document) {
308 302
         return (
309 303
             in_array(
310 304
              $document->getState(),
@@ -335,8 +329,7 @@  discard block
 block discarded – undo
335 329
         array $headerArguments,
336 330
         array $bodyArguments,
337 331
         bool $storeInSession = false
338
-    )
339
-    {
332
+    ) {
340 333
         $messageHeader = LocalizationUtility::translate(
341 334
             'LLL:EXT:dpf/Resources/Private/Language/locallang_mod.xlf:admin_module.'.$headerKey,
342 335
             'dpf',
Please login to merge, or discard this patch.