Passed
Pull Request — master (#195)
by
unknown
09:41 queued 02:26
created
src/Configuration/TCA/Overrides/fe_users.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,28 +86,28 @@
 block discarded – undo
86 86
             ),
87 87
         )
88 88
     ),
89
-    'fis_pers_id' => array(
89
+    'fis_pers_id' => array (
90 90
         'exclude' => 0,
91 91
         'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feuser.fis_pers_id',
92
-        'config'  => array(
92
+        'config'  => array (
93 93
             'type' => 'input',
94 94
             'size' => '30',
95 95
             'eval' => 'trim',
96 96
         ),
97 97
     ),
98
-    'orga_name' => array(
98
+    'orga_name' => array (
99 99
         'exclude' => 0,
100 100
         'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feuser.orga_name',
101
-        'config'  => array(
101
+        'config'  => array (
102 102
             'type' => 'input',
103 103
             'size' => '30',
104 104
             'eval' => 'trim',
105 105
         ),
106 106
     ),
107
-    'api_token' => array(
107
+    'api_token' => array (
108 108
         'exclude' => 0,
109 109
         'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feuser.api_token',
110
-        'config'  => array(
110
+        'config'  => array (
111 111
             'type' => 'input',
112 112
             'size' => '30',
113 113
             'eval' => 'trim',
Please login to merge, or discard this patch.
src/Classes/Session/BulkImportSessionData.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
  */
16 16
 
17 17
 
18
-class BulkImportSessionData
19
-{
18
+class BulkImportSessionData {
20 19
     /**
21 20
      * @var string
22 21
      */
Please login to merge, or discard this patch.
src/Classes/Session/Session.php 2 patches
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class Session
18
-{
17
+class Session {
19 18
     const ROOT_KEY = "tx_dpf";
20 19
     const LIST_ACTION_KEY = "list_action";
21 20
     const WORKSPACE = "workspace";
@@ -25,8 +24,7 @@  discard block
 block discarded – undo
25 24
     /**
26 25
      * @return SearchSessionData $data
27 26
      */
28
-    public function getWorkspaceData()
29
-    {
27
+    public function getWorkspaceData() {
30 28
         $sessionData = $this->getData();
31 29
         if (array_key_exists(self::WORKSPACE, $sessionData)) {
32 30
             return unserialize($sessionData[self::WORKSPACE]);
@@ -38,8 +36,7 @@  discard block
 block discarded – undo
38 36
     /**
39 37
      * @param SearchSessionData $data
40 38
      */
41
-    public function setWorkspaceData(SearchSessionData $data)
42
-    {
39
+    public function setWorkspaceData(SearchSessionData $data) {
43 40
         $sessionData[self::WORKSPACE] = serialize($data);
44 41
         $this->setData($sessionData);
45 42
     }
@@ -47,8 +44,7 @@  discard block
 block discarded – undo
47 44
     /**
48 45
      * @return BulkImportSessionData
49 46
      */
50
-    public function getBulkImportData()
51
-    {
47
+    public function getBulkImportData() {
52 48
         $sessionData = $this->getData();
53 49
         if (array_key_exists(self::BULKIMPORT, $sessionData)) {
54 50
             return unserialize($sessionData[self::BULKIMPORT]);
@@ -60,8 +56,7 @@  discard block
 block discarded – undo
60 56
     /**
61 57
      * @param BulkImportSessionData $data
62 58
      */
63
-    public function setBulkImportData(BulkImportSessionData $data)
64
-    {
59
+    public function setBulkImportData(BulkImportSessionData $data) {
65 60
         $sessionData = $this->getData();
66 61
         $sessionData[self::BULKIMPORT] = serialize($data);
67 62
         $this->setData($sessionData);
@@ -73,8 +68,7 @@  discard block
 block discarded – undo
73 68
      * @param $action
74 69
      * @param $controller
75 70
      */
76
-    public function setStoredAction($action, $controller, $uri = null)
77
-    {
71
+    public function setStoredAction($action, $controller, $uri = null) {
78 72
         $sessionData = $this->getData();
79 73
         $sessionData[self::LIST_ACTION_KEY] = [$action, $controller, $uri];
80 74
         $this->setData($sessionData);
@@ -86,8 +80,7 @@  discard block
 block discarded – undo
86 80
      *
87 81
      * @return array|mixed
88 82
      */
89
-    public function getStoredAction()
90
-    {
83
+    public function getStoredAction() {
91 84
         $sessionData = $this->getData();
92 85
         if (is_array($sessionData) && array_key_exists(self::LIST_ACTION_KEY, $sessionData)) {
93 86
             return $sessionData[self::LIST_ACTION_KEY];
@@ -101,8 +94,7 @@  discard block
 block discarded – undo
101 94
      *
102 95
      * @param array $data
103 96
      */
104
-    public function setData($data)
105
-    {
97
+    public function setData($data) {
106 98
         $userGlobals = $this->getUserGlobals();
107 99
 
108 100
         if ($userGlobals) {
@@ -117,8 +109,7 @@  discard block
 block discarded – undo
117 109
      *
118 110
      * @return array
119 111
      */
120
-    public function getData()
121
-    {
112
+    public function getData() {
122 113
         $userGlobals = $this->getUserGlobals();
123 114
 
124 115
         $sessionData = null;
@@ -139,8 +130,7 @@  discard block
 block discarded – undo
139 130
      *
140 131
      * @return mixed|null
141 132
      */
142
-    protected function getUserGlobals()
143
-    {
133
+    protected function getUserGlobals() {
144 134
         $userGlobals = null;
145 135
 
146 136
         if (!empty($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @param $action
74 74
      * @param $controller
75 75
      */
76
-    public function setStoredAction($action, $controller, $uri = null)
76
+    public function setStoredAction($action, $controller, $uri = NULL)
77 77
     {
78 78
         $sessionData = $this->getData();
79 79
         $sessionData[self::LIST_ACTION_KEY] = [$action, $controller, $uri];
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $userGlobals = $this->getUserGlobals();
123 123
 
124
-        $sessionData = null;
124
+        $sessionData = NULL;
125 125
 
126 126
         if ($userGlobals) {
127 127
             $sessionData = $userGlobals->getSessionData(self::ROOT_KEY);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     protected function getUserGlobals()
143 143
     {
144
-        $userGlobals = null;
144
+        $userGlobals = NULL;
145 145
 
146 146
         if (!empty($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
147 147
 
Please login to merge, or discard this patch.
src/Classes/Configuration/ClientConfigurationManager.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @var array
45 45
      */
46
-    protected $settings = array();
46
+    protected $settings = array ();
47 47
 
48 48
 
49 49
     /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @var array
60 60
      */
61
-    protected $extensionConfiguration = array();
61
+    protected $extensionConfiguration = array ();
62 62
 
63 63
     public function __construct()
64 64
     {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $clientRepository = $objectManager->get(ClientRepository::class);
67 67
 
68 68
         if (TYPO3_MODE === 'BE') {
69
-            $selectedPageId = (int)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
69
+            $selectedPageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
70 70
             if ($selectedPageId) {
71 71
                 $this->client = $clientRepository->findAll()->current();
72 72
 
Please login to merge, or discard this patch.
Braces   +53 added lines, -106 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 use TYPO3\CMS\Extbase\Object\ObjectManager;
20 20
 use EWW\Dpf\Domain\Repository\ClientRepository;
21 21
 
22
-class ClientConfigurationManager
23
-{
22
+class ClientConfigurationManager {
24 23
 
25 24
     /**
26 25
      * objectManager
@@ -60,8 +59,7 @@  discard block
 block discarded – undo
60 59
      */
61 60
     protected $extensionConfiguration = array();
62 61
 
63
-    public function __construct()
64
-    {
62
+    public function __construct() {
65 63
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
66 64
         $clientRepository = $objectManager->get(ClientRepository::class);
67 65
 
@@ -88,8 +86,7 @@  discard block
 block discarded – undo
88 86
         $this->extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dpf']);
89 87
     }
90 88
 
91
-    public function setConfigurationPid($pid)
92
-    {
89
+    public function setConfigurationPid($pid) {
93 90
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
94 91
         $clientRepository = $objectManager->get(ClientRepository::class);
95 92
 
@@ -102,8 +99,7 @@  discard block
 block discarded – undo
102 99
      *
103 100
      * @var array
104 101
      */
105
-    public function getSetting($settingName, $extConfig = null)
106
-    {
102
+    public function getSetting($settingName, $extConfig = null) {
107 103
         $setting = null;
108 104
         if ($this->client) {
109 105
             $setting = trim($this->client->{"get" . ucfirst($settingName)}());
@@ -118,248 +114,199 @@  discard block
 block discarded – undo
118 114
     }
119 115
 
120 116
 
121
-    public function getOwnerId()
122
-    {
117
+    public function getOwnerId() {
123 118
         return $this->getSetting("ownerId");
124 119
     }
125 120
 
126
-    public function getSwordHost()
127
-    {
121
+    public function getSwordHost() {
128 122
         return $this->getSetting("swordHost", "swordHost");
129 123
     }
130 124
 
131
-    public function getSwordUser()
132
-    {
125
+    public function getSwordUser() {
133 126
         return $this->getSetting("swordUser", "swordUser");
134 127
     }
135 128
 
136
-    public function getSwordPassword()
137
-    {
129
+    public function getSwordPassword() {
138 130
         return $this->getSetting("swordPassword", "swordPassword");
139 131
     }
140 132
 
141
-    public function getSwordCollectionNamespace()
142
-    {
133
+    public function getSwordCollectionNamespace() {
143 134
         return $this->getSetting("swordCollectionNamespace", "swordCollectionNamespace");
144 135
     }
145 136
 
146
-    public function getFedoraHost()
147
-    {
137
+    public function getFedoraHost() {
148 138
         return $this->getSetting("fedoraHost", "fedoraHost");
149 139
     }
150 140
 
151
-    public function getFedoraUser()
152
-    {
141
+    public function getFedoraUser() {
153 142
         return $this->getSetting("fedoraUser", "fedoraUser");
154 143
     }
155 144
 
156
-    public function getFedoraPassword()
157
-    {
145
+    public function getFedoraPassword() {
158 146
         return $this->getSetting("fedoraPassword", "fedoraPassword");
159 147
     }
160 148
 
161
-    public function getElasticSearchHost()
162
-    {
149
+    public function getElasticSearchHost() {
163 150
         return $this->getSetting("elasticSearchHost", "elasticSearchHost");
164 151
     }
165 152
 
166
-    public function getElasticSearchPort()
167
-    {
153
+    public function getElasticSearchPort() {
168 154
         return $this->getSetting("elasticSearchPort", "elasticSearchPort");
169 155
     }
170 156
 
171
-    public function getUploadDirectory()
172
-    {
157
+    public function getUploadDirectory() {
173 158
         return $this->getSetting("uploadDirectory", "uploadDirectory");
174 159
     }
175 160
 
176
-    public function getUploadDomain()
177
-    {
161
+    public function getUploadDomain() {
178 162
         return $this->getSetting("uploadDomain", "uploadDomain");
179 163
     }
180 164
 
181
-    public function getSuggestionFlashMessage()
182
-    {
165
+    public function getSuggestionFlashMessage() {
183 166
         return $this->getSetting("suggestionFlashmessage", "suggestionFlashmessage");
184 167
     }
185 168
 
186
-    public function getFileXpath()
187
-    {
169
+    public function getFileXpath() {
188 170
         return $this->getSetting("fileXpath", "fileXpath");
189 171
     }
190 172
 
191
-    public function getStateXpath()
192
-    {
173
+    public function getStateXpath() {
193 174
         return $this->getSetting("stateXpath", "stateXpath");
194 175
     }
195 176
 
196
-    public function getTypeXpath()
197
-    {
177
+    public function getTypeXpath() {
198 178
         return $this->getSetting("typeXpath", "typeXpath");
199 179
     }
200 180
 
201
-    public function getTypeXpathInput()
202
-    {
181
+    public function getTypeXpathInput() {
203 182
         return $this->getSetting("typeXpathInput", "typeXpathInput");
204 183
     }
205 184
 
206
-    public function getUrnXpath()
207
-    {
185
+    public function getUrnXpath() {
208 186
         return $this->getSetting("urnXpath", "urnXpath");
209 187
     }
210 188
 
211
-    public function getQucosaUrnXpath()
212
-    {
189
+    public function getQucosaUrnXpath() {
213 190
         return $this->getSetting("qucosaUrnXpath", "qucosaUrnXpath");
214 191
     }
215 192
 
216
-    public function getDateXpath()
217
-    {
193
+    public function getDateXpath() {
218 194
         return $this->getSetting("dateXpath", "dateXpath");
219 195
     }
220 196
 
221
-    public function getPublishingYearXpath()
222
-    {
197
+    public function getPublishingYearXpath() {
223 198
         return $this->getSetting("publishingYearXpath", "publishingYearXpath");
224 199
     }
225 200
 
226
-    public function getNamespaces()
227
-    {
201
+    public function getNamespaces() {
228 202
         return $this->getSetting("namespaces", "namespaces");
229 203
     }
230 204
 
231
-    public function getTitleXpath()
232
-    {
205
+    public function getTitleXpath() {
233 206
         return $this->getSetting("titleXpath", "titleXpath");
234 207
     }
235 208
 
236
-    public function getOriginalSourceTitleXpath()
237
-    {
209
+    public function getOriginalSourceTitleXpath() {
238 210
         return $this->getSetting("originalSourceTitleXpath", "originalSourceTitleXpath");
239 211
     }
240 212
 
241
-    public function getProcessNumberXpath()
242
-    {
213
+    public function getProcessNumberXpath() {
243 214
         return $this->getSetting("processnumberXpath", "processnumberXpath");
244 215
     }
245 216
 
246
-    public function getSubmitterNameXpath()
247
-    {
217
+    public function getSubmitterNameXpath() {
248 218
         return $this->getSetting("submitterNameXpath", "submitterNameXpath");
249 219
     }
250 220
 
251
-    public function getSubmitterEmailXpath()
252
-    {
221
+    public function getSubmitterEmailXpath() {
253 222
         return $this->getSetting("submitterEmailXpath", "submitterEmailXpath");
254 223
     }
255 224
 
256
-    public function getSubmitterNoticeXpath()
257
-    {
225
+    public function getSubmitterNoticeXpath() {
258 226
         return $this->getSetting("submitterNoticeXpath", "submitterNoticeXpath");
259 227
     }
260 228
 
261
-    public function getCreatorXpath()
262
-    {
229
+    public function getCreatorXpath() {
263 230
         return $this->getSetting("creatorXpath", "creatorXpath");
264 231
     }
265 232
 
266
-    public function getCreationDateXpath()
267
-    {
233
+    public function getCreationDateXpath() {
268 234
         return $this->getSetting("creationDateXpath", "creationDateXpath");
269 235
     }
270 236
 
271
-    public function getRepositoryCreationDateXpath()
272
-    {
237
+    public function getRepositoryCreationDateXpath() {
273 238
         return $this->getSetting("repositoryCreationDateXpath", "repositoryCreationDateXpath");
274 239
     }
275 240
 
276
-    public function getRepositoryLastModDateXpath()
277
-    {
241
+    public function getRepositoryLastModDateXpath() {
278 242
         return $this->getSetting("repositoryLastModDateXpath", "repositoryLastModDateXpath");
279 243
     }
280 244
 
281
-    public function getDepositLicenseXpath()
282
-    {
245
+    public function getDepositLicenseXpath() {
283 246
         return $this->getSetting("depositLicenseXpath", "depositLicenseXpath");
284 247
     }
285 248
 
286
-    public function getAllNotesXpath()
287
-    {
249
+    public function getAllNotesXpath() {
288 250
         return $this->getSetting("allNotesXpath", "allNotesXpath");
289 251
     }
290 252
 
291
-    public function getPrivateNotesXpath()
292
-    {
253
+    public function getPrivateNotesXpath() {
293 254
         return $this->getSetting("privateNotesXpath", "privateNotesXpath");
294 255
     }
295 256
 
296
-    public function getInputTransformation()
297
-    {
257
+    public function getInputTransformation() {
298 258
         return $this->client->getInputTransformation()->current();
299 259
     }
300 260
 
301
-    public function getOutputTransformation()
302
-    {
261
+    public function getOutputTransformation() {
303 262
         return $this->client->getOutputTransformation()->current();
304 263
     }
305 264
 
306
-    public function getPersonXpath()
307
-    {
265
+    public function getPersonXpath() {
308 266
         return $this->getSetting("personXpath", "personXpath");
309 267
     }
310 268
 
311
-    public function getPersonFamilyXpath()
312
-    {
269
+    public function getPersonFamilyXpath() {
313 270
         return $this->getSetting("personFamilyXpath", "personFamilyXpath");
314 271
     }
315 272
 
316
-    public function getPersonGivenXpath()
317
-    {
273
+    public function getPersonGivenXpath() {
318 274
         return $this->getSetting("personGivenXpath", "personGivenXpath");
319 275
     }
320 276
 
321
-    public function getPersonRoleXpath()
322
-    {
277
+    public function getPersonRoleXpath() {
323 278
         return $this->getSetting("personRoleXpath", "personRoleXpath");
324 279
     }
325 280
 
326
-    public function getPersonFisIdentifierXpath()
327
-    {
281
+    public function getPersonFisIdentifierXpath() {
328 282
         return $this->getSetting("personFisIdentifierXpath", "personFisIdentifierXpath");
329 283
     }
330 284
 
331
-    public function getPersonAffiliationXpath()
332
-    {
285
+    public function getPersonAffiliationXpath() {
333 286
         return $this->getSetting("personAffiliationXpath", "personAffiliationXpath");
334 287
     }
335 288
 
336
-    public function getPersonAffiliationIdentifierXpath()
337
-    {
289
+    public function getPersonAffiliationIdentifierXpath() {
338 290
         return $this->getSetting("personAffiliationIdentifierXpath", "personAffiliationIdentifierXpath");
339 291
     }
340 292
 
341
-    public function getPersonAuthorRole()
342
-    {
293
+    public function getPersonAuthorRole() {
343 294
         return $this->getSetting("personAuthorRole", "personAuthorRole");
344 295
     }
345 296
 
346
-    public function getPersonPublisherRole()
347
-    {
297
+    public function getPersonPublisherRole() {
348 298
         return $this->getSetting("personPublisherRole", "personPublisherRole");
349 299
     }
350 300
 
351
-    public function getValidationXpath()
352
-    {
301
+    public function getValidationXpath() {
353 302
         return $this->getSetting("validationXpath", "validationXpath");
354 303
     }
355 304
 
356
-    public function fisIdXpath()
357
-    {
305
+    public function fisIdXpath() {
358 306
         return $this->getSetting("fisIdXpath", "fisIdXpath");
359 307
     }
360 308
 
361
-    public function getSourceDetailsXpaths()
362
-    {
309
+    public function getSourceDetailsXpaths() {
363 310
         return $this->getSetting("sourceDetailsXpaths", "sourceDetailsXpaths");
364 311
     }
365 312
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @var \EWW\Dpf\Domain\Model\Client
53 53
      */
54
-    protected $client = null;
54
+    protected $client = NULL;
55 55
 
56 56
     /**
57 57
      * extensionConfiguration
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 $this->client = $clientRepository->findAll()->current();
72 72
 
73 73
                 $configurationManager = $objectManager->get(BackendConfigurationManager::class);
74
-                $settings = $configurationManager->getConfiguration(null, null);
74
+                $settings = $configurationManager->getConfiguration(NULL, NULL);
75 75
                 $this->settings = $settings; //['settings'];
76 76
             }
77 77
 
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
      *
103 103
      * @var array
104 104
      */
105
-    public function getSetting($settingName, $extConfig = null)
105
+    public function getSetting($settingName, $extConfig = NULL)
106 106
     {
107
-        $setting = null;
107
+        $setting = NULL;
108 108
         if ($this->client) {
109 109
             $setting = trim($this->client->{"get" . ucfirst($settingName)}());
110 110
         }
Please login to merge, or discard this patch.
src/Classes/Helper/XPath.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
42 42
         $clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
43 43
 
44
-        $namespaceConfiguration = explode(";",$clientConfigurationManager->getNamespaces());
44
+        $namespaceConfiguration = explode(";", $clientConfigurationManager->getNamespaces());
45 45
 
46 46
         $xpath = new \DOMXPath($dom);
47 47
 
Please login to merge, or discard this 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
 use EWW\Dpf\Configuration\ClientConfigurationManager;
18 18
 use TYPO3\CMS\Extbase\Object\ObjectManager;
19 19
 
20
-class XPath
21
-{
20
+class XPath {
22 21
 
23 22
     /**
24 23
      * clientConfigurationManager
@@ -35,8 +34,7 @@  discard block
 block discarded – undo
35 34
      * @param \DOMDocument $dom
36 35
      * @return \DOMXPath
37 36
      */
38
-    public static function create($dom)
39
-    {
37
+    public static function create($dom) {
40 38
 
41 39
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
42 40
         $clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
Please login to merge, or discard this patch.
src/Classes/Helper/XSLTransformator.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      * @param \EWW\Dpf\Domain\Model\Document $document
81 81
      * @return string The transformed xml
82 82
      */
83
-    public function getTransformedOutputXML($document, $xmlData = false)
83
+    public function getTransformedOutputXML($document, $xmlData = FALSE)
84 84
     {
85 85
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
86 86
         $this->clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
 use \TYPO3\CMS\Core\Log\LogLevel;
24 24
 use \TYPO3\CMS\Core\Log\LogManager;
25 25
 
26
-class XSLTransformator
27
-{
26
+class XSLTransformator {
28 27
 
29 28
     /**
30 29
      * clientConfigurationManager
@@ -97,8 +96,7 @@  discard block
 block discarded – undo
97 96
      * @param \EWW\Dpf\Domain\Model\Document $document
98 97
      * @return string The transformed xml
99 98
      */
100
-    public function getTransformedOutputXML($document, $xmlData = false)
101
-    {
99
+    public function getTransformedOutputXML($document, $xmlData = false) {
102 100
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
103 101
         $this->clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
104 102
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $logger->log(
85 85
                 LogLevel::WARNING,
86 86
                 "Input XML: No transformation file is present. The given xml data was taken over as it is",
87
-                array(
87
+                array (
88 88
                     'documentTypeName' => $documentTypeName
89 89
                 )
90 90
             );
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $filePath = $transformationFile->getFile()->getOriginalResource()->getIdentifier();
115 115
             $documentTransformer = new DocumentTransformer();
116 116
 
117
-            if ( !$document->getRemoteState() || $document->getRemoteState() == 'NONE' ) {
117
+            if (!$document->getRemoteState() || $document->getRemoteState() == 'NONE') {
118 118
                 $remoteState = 'ACTIVE';
119 119
             } else {
120 120
                 $remoteState = $document->getRemoteState();
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             $logger->log(
146 146
                 LogLevel::WARNING,
147 147
                 "Output XML: No transformation file is present. The generated xml data was taken over as it is",
148
-                array(
148
+                array (
149 149
                     'documentTypeName' => $documentTypeName
150 150
                 )
151 151
             );
Please login to merge, or discard this patch.
src/Classes/Helper/Mets.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class Mets
18
-{
17
+class Mets {
19 18
 
20 19
     /**
21 20
      * mets
@@ -24,30 +23,25 @@  discard block
 block discarded – undo
24 23
      */
25 24
     protected $metsDom;
26 25
 
27
-    public function __construct($metsXml)
28
-    {
26
+    public function __construct($metsXml) {
29 27
         $this->setMetsXml($metsXml);
30 28
     }
31 29
 
32
-    public function setMetsXml($metsXml)
33
-    {
30
+    public function setMetsXml($metsXml) {
34 31
         $metsDom = new \DOMDocument();
35 32
         $metsDom->loadXML($metsXml);
36 33
         $this->metsDom = $metsDom;
37 34
     }
38 35
 
39
-    public function getMetsXml()
40
-    {
36
+    public function getMetsXml() {
41 37
         return $this->metsDom->saveXML();
42 38
     }
43 39
 
44
-    public function getMetsXpath()
45
-    {
40
+    public function getMetsXpath() {
46 41
         return new \DOMXPath($this->metsDom);
47 42
     }
48 43
 
49
-    public function getMods()
50
-    {
44
+    public function getMods() {
51 45
         $xpath = $this->getMetsXpath();
52 46
 
53 47
         $xpath->registerNamespace("mods", "http://www.loc.gov/mods/v3");
@@ -60,8 +54,7 @@  discard block
 block discarded – undo
60 54
         return $mods;
61 55
     }
62 56
 
63
-    public function getSlub()
64
-    {
57
+    public function getSlub() {
65 58
         $xpath = $this->getMetsXpath();
66 59
 
67 60
         $xpath->registerNamespace("slub", "http://slub-dresden.de/");
@@ -74,8 +67,7 @@  discard block
 block discarded – undo
74 67
         return $slub;
75 68
     }
76 69
 
77
-    public function getState()
78
-    {
70
+    public function getState() {
79 71
 
80 72
         $xpath = $this->getMetsXpath();
81 73
         $xpath->registerNamespace("mets", "http://www.loc.gov/METS/");
@@ -84,8 +76,7 @@  discard block
 block discarded – undo
84 76
         return $dmdSec->item(0)->getAttribute("STATUS");
85 77
     }
86 78
 
87
-    public function getLastModDate()
88
-    {
79
+    public function getLastModDate() {
89 80
         $xpath = $this->getMetsXpath();
90 81
         $xpath->registerNamespace("mets", "http://www.loc.gov/METS/");
91 82
 
@@ -93,8 +84,7 @@  discard block
 block discarded – undo
93 84
         return $dmdSec->item(0)->getAttribute("LASTMODDATE");
94 85
     }
95 86
 
96
-    public function getCreationDate()
97
-    {
87
+    public function getCreationDate() {
98 88
         $xpath = $this->getMetsXpath();
99 89
         $xpath->registerNamespace("mets", "http://www.loc.gov/METS/");
100 90
 
@@ -102,8 +92,7 @@  discard block
 block discarded – undo
102 92
         return $dmdSec->item(0)->getAttribute("CREATEDATE");
103 93
     }
104 94
 
105
-    public function getFiles()
106
-    {
95
+    public function getFiles() {
107 96
         $xpath = $this->getMetsXpath();
108 97
 
109 98
         $xpath->registerNamespace("xlink", "http://www.w3.org/1999/xlink");
Please login to merge, or discard this patch.
src/Classes/Helper/Mods.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 
136 136
             $identifierNode = $xpath->query('mods:nameIdentifier[@type="FOBID"]', $personNode);
137 137
 
138
-            $affiliationNodes  = $xpath->query('mods:affiliation', $personNode);
139
-            $affiliationIdentifierNodes  = $xpath->query(
138
+            $affiliationNodes = $xpath->query('mods:affiliation', $personNode);
139
+            $affiliationIdentifierNodes = $xpath->query(
140 140
                 'mods:nameIdentifier[@type="ScopusAuthorID"][@typeURI="http://www.scopus.com/authid"]',
141 141
                 $personNode
142 142
             );
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
     public function getOriginalSourceTitle()
284 284
     {
285
-        $node= $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]/mods:titleInfo/mods:title');
285
+        $node = $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]/mods:titleInfo/mods:title');
286 286
         if ($node->length > 0) {
287 287
             return $node->item(0)->nodeValue;
288 288
         }
Please login to merge, or discard this patch.
Braces   +23 added lines, -42 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 
17 17
 
18
-class Mods
19
-{
18
+class Mods {
20 19
     /**
21 20
      * metadataObjectRepository
22 21
      *
@@ -36,13 +35,11 @@  discard block
 block discarded – undo
36 35
 
37 36
     protected $modsDom;
38 37
 
39
-    public function __construct($modsXml)
40
-    {
38
+    public function __construct($modsXml) {
41 39
         $this->setModsXml($modsXml);
42 40
     }
43 41
 
44
-    public function setModsXml($modsXml)
45
-    {
42
+    public function setModsXml($modsXml) {
46 43
         $modsDom = new \DOMDocument();
47 44
         if (!empty($modsXml)) {
48 45
 
@@ -66,19 +63,16 @@  discard block
 block discarded – undo
66 63
         $this->modsDom = $modsDom;
67 64
     }
68 65
 
69
-    public function getModsXml()
70
-    {
66
+    public function getModsXml() {
71 67
         return $this->modsDom->saveXML();
72 68
     }
73 69
 
74
-    public function getModsXpath()
75
-    {
70
+    public function getModsXpath() {
76 71
         $xpath = \EWW\Dpf\Helper\XPath::create($this->modsDom);
77 72
         return $xpath;
78 73
     }
79 74
 
80
-    public function getTitle()
81
-    {
75
+    public function getTitle() {
82 76
         $titleNode = $this->getModsXpath()->query('/data/titleInfo/title');
83 77
 
84 78
         if ($titleNode->length == 0) {
@@ -88,8 +82,7 @@  discard block
 block discarded – undo
88 82
     }
89 83
 
90 84
 
91
-    public function setTitle($title)
92
-    {
85
+    public function setTitle($title) {
93 86
         $titleNode = $this->getModsXpath()->query('/mods:mods/mods:titleInfo[@usage="primary"]/mods:title');
94 87
 
95 88
         if ($titleNode->length == 0) {
@@ -102,13 +95,11 @@  discard block
 block discarded – undo
102 95
     }
103 96
 
104 97
 
105
-    public function getAuthors()
106
-    {
98
+    public function getAuthors() {
107 99
         return $this->getPersons("aut");
108 100
     }
109 101
 
110
-    public function getPublishers()
111
-    {
102
+    public function getPublishers() {
112 103
         return $this->getPersons("edt");
113 104
     }
114 105
 
@@ -118,8 +109,7 @@  discard block
 block discarded – undo
118 109
      * @param string $role
119 110
      * @return array
120 111
      */
121
-    public function getPersons($role = '')
122
-    {
112
+    public function getPersons($role = '') {
123 113
         $xpath = $this->getModsXpath();
124 114
         $personNodes = $xpath->query('/mods:mods/mods:name[@type="personal"]');
125 115
 
@@ -193,8 +183,9 @@  discard block
 block discarded – undo
193 183
         if ($role) {
194 184
             $result = [];
195 185
             foreach ($persons as $person) {
196
-                if ($person['role'] == $role)
197
-                $result[] = $person;
186
+                if ($person['role'] == $role) {
187
+                                $result[] = $person;
188
+                }
198 189
             }
199 190
             return $result;
200 191
         } else {
@@ -229,8 +220,7 @@  discard block
 block discarded – undo
229 220
     }
230 221
 
231 222
 
232
-    public function setDateIssued($date)
233
-    {
223
+    public function setDateIssued($date) {
234 224
 
235 225
         $originInfo = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]');
236 226
 
@@ -270,8 +260,7 @@  discard block
 block discarded – undo
270 260
     }
271 261
 
272 262
 
273
-    public function getPublishingYear()
274
-    {
263
+    public function getPublishingYear() {
275 264
         $year = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="publication"]/mods:dateIssued[@encoding="iso8601"]');
276 265
         if ($year->length > 0) {
277 266
             return $year->item(0)->nodeValue;
@@ -280,8 +269,7 @@  discard block
 block discarded – undo
280 269
         return null;
281 270
     }
282 271
 
283
-    public function getOriginalSourceTitle()
284
-    {
272
+    public function getOriginalSourceTitle() {
285 273
         $node= $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]/mods:titleInfo/mods:title');
286 274
         if ($node->length > 0) {
287 275
             return $node->item(0)->nodeValue;
@@ -290,8 +278,7 @@  discard block
 block discarded – undo
290 278
         return null;
291 279
     }
292 280
 
293
-    public function getDateIssued()
294
-    {
281
+    public function getDateIssued() {
295 282
 
296 283
         $dateIssued = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]/mods:dateIssued[@encoding="iso8601"][@keyDate="yes"]');
297 284
         if ($dateIssued->length > 0) {
@@ -301,8 +288,7 @@  discard block
 block discarded – undo
301 288
         return null;
302 289
     }
303 290
 
304
-    public function removeDateIssued()
305
-    {
291
+    public function removeDateIssued() {
306 292
 
307 293
         $dateIssued = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]/mods:dateIssued[@encoding="iso8601"][@keyDate="yes"]');
308 294
         if ($dateIssued->length > 0) {
@@ -311,8 +297,7 @@  discard block
 block discarded – undo
311 297
 
312 298
     }
313 299
 
314
-    public function hasQucosaUrn()
315
-    {
300
+    public function hasQucosaUrn() {
316 301
         $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]');
317 302
 
318 303
         $hasUrn = false;
@@ -325,8 +310,7 @@  discard block
 block discarded – undo
325 310
         return $hasUrn;
326 311
     }
327 312
 
328
-    public function getQucosaUrn()
329
-    {
313
+    public function getQucosaUrn() {
330 314
         $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]');
331 315
         $urnList     = '';
332 316
 
@@ -338,8 +322,7 @@  discard block
 block discarded – undo
338 322
         return $urnList;
339 323
     }
340 324
 
341
-    public function addQucosaUrn($urn)
342
-    {
325
+    public function addQucosaUrn($urn) {
343 326
         $rootNode = $this->getModsXpath()->query('/mods:mods');
344 327
 
345 328
         if ($rootNode->length == 1) {
@@ -353,8 +336,7 @@  discard block
 block discarded – undo
353 336
 
354 337
     }
355 338
 
356
-    public function clearAllUrn()
357
-    {
339
+    public function clearAllUrn() {
358 340
         $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="urn"]');
359 341
 
360 342
         foreach ($urnNodeList as $urnNode) {
@@ -370,8 +352,7 @@  discard block
 block discarded – undo
370 352
     /**
371 353
      * @return string
372 354
      */
373
-    public function getSourceDetails()
374
-    {
355
+    public function getSourceDetails() {
375 356
         $data = [];
376 357
 
377 358
         $dataNodes[] = $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]');
Please login to merge, or discard this patch.
src/Classes/Helper/InternalFormat.php 3 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function setRepositoryState($state)
87 87
     {
88 88
         $stateXpath = $this->clientConfigurationManager->getStateXpath();
89
-        $this->setValue($stateXpath,$state);
89
+        $this->setValue($stateXpath, $state);
90 90
     }
91 91
 
92 92
     public function getProcessNumber()
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $xpath = $this->getXpath();
315 315
         $data = [];
316 316
         $sourceDetailsXpaths = $this->clientConfigurationManager->getSourceDetailsXpaths();
317
-        $sourceDetailsXpathList = explode(";", trim($sourceDetailsXpaths," ;"));
317
+        $sourceDetailsXpathList = explode(";", trim($sourceDetailsXpaths, " ;"));
318 318
         $dataNodes = [];
319 319
 
320 320
         foreach ($sourceDetailsXpathList as $sourceDetailsXpathItem) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     {
348 348
         $xpath = $this->getXpath();
349 349
         $personXpath = $this->clientConfigurationManager->getPersonXpath();
350
-        $fisIdentifierXpath =  $this->clientConfigurationManager->getPersonFisIdentifierXpath();
350
+        $fisIdentifierXpath = $this->clientConfigurationManager->getPersonFisIdentifierXpath();
351 351
         $personNodes = $xpath->query(self::rootNode . $personXpath);
352 352
         $identifiers = [];
353 353
         foreach ($personNodes as $key => $node) {
@@ -379,9 +379,9 @@  discard block
 block discarded – undo
379 379
         $xpath = $this->getXpath();
380 380
         $notesNodes = $xpath->query(self::rootNode . $notesXpath);
381 381
 
382
-        $notes = array();
382
+        $notes = array ();
383 383
 
384
-        for ($i=0; $i < $notesNodes->length; $i++)
384
+        for ($i = 0; $i < $notesNodes->length; $i++)
385 385
         {
386 386
             $notes[] = $notesNodes->item($i)->nodeValue;
387 387
         }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
         $parserGenerator = new ParserGenerator();
397 397
         $parserGenerator->setXml($this->xml->saveXML());
398
-        $parserGenerator->customXPath($notesXpath,true, $noteContent);
398
+        $parserGenerator->customXPath($notesXpath, true, $noteContent);
399 399
         $this->xml = new \DOMDocument();
400 400
         $this->xml->loadXML($parserGenerator->getXMLData());
401 401
     }
@@ -422,9 +422,9 @@  discard block
 block discarded – undo
422 422
         $familyXpath = $this->clientConfigurationManager->getPersonFamilyXpath();
423 423
         $givenXpath = $this->clientConfigurationManager->getPersonGivenXpath();
424 424
         $roleXpath = $this->clientConfigurationManager->getPersonRoleXpath();
425
-        $fisIdentifierXpath =  $this->clientConfigurationManager->getPersonFisIdentifierXpath();
426
-        $affiliationXpath =  $this->clientConfigurationManager->getPersonAffiliationXpath();
427
-        $affiliationIdentifierXpath =  $this->clientConfigurationManager->getPersonAffiliationIdentifierXpath();
425
+        $fisIdentifierXpath = $this->clientConfigurationManager->getPersonFisIdentifierXpath();
426
+        $affiliationXpath = $this->clientConfigurationManager->getPersonAffiliationXpath();
427
+        $affiliationIdentifierXpath = $this->clientConfigurationManager->getPersonAffiliationIdentifierXpath();
428 428
 
429 429
         $xpath = $this->getXpath();
430 430
         $personNodes = $xpath->query(self::rootNode . $personXpath);
@@ -504,9 +504,9 @@  discard block
 block discarded – undo
504 504
      */
505 505
     public function getValidation()
506 506
     {
507
-        $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
507
+        $validationXpath = $this->clientConfigurationManager->getValidationXpath();
508 508
         $validation = $this->getValue($validationXpath);
509
-        return (strtolower($validation) === 'true')? true : false;
509
+        return (strtolower($validation) === 'true') ? true : false;
510 510
     }
511 511
 
512 512
     /**
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
      */
515 515
     public function setValidation($validated)
516 516
     {
517
-        $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
518
-        $this->setValue($validationXpath, ($validated? 'true' : 'false'));
517
+        $validationXpath = $this->clientConfigurationManager->getValidationXpath();
518
+        $this->setValue($validationXpath, ($validated ? 'true' : 'false'));
519 519
     }
520 520
 
521 521
     /**
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
      */
524 524
     public function setFisId($fisId)
525 525
     {
526
-        $fisIdXpath =  $this->clientConfigurationManager->getFisIdXpath();
526
+        $fisIdXpath = $this->clientConfigurationManager->getFisIdXpath();
527 527
         $this->setValue($fisIdXpath, $fisId);
528 528
     }
529 529
 
@@ -548,10 +548,10 @@  discard block
 block discarded – undo
548 548
         $nodes = $xpath->query(self::rootNode . $xpathString);
549 549
         if ($nodes->length > 0) {
550 550
             $nodes->item(0)->nodeValue = $value;
551
-        } elseif(!empty($value)) {
551
+        } elseif (!empty($value)) {
552 552
             $parserGenerator = new ParserGenerator();
553 553
             $parserGenerator->setXml($this->xml->saveXML());
554
-            $parserGenerator->customXPath($xpathString,true, $value);
554
+            $parserGenerator->customXPath($xpathString, true, $value);
555 555
             $this->xml = new \DOMDocument();
556 556
             $this->xml->loadXML($parserGenerator->getXMLData());
557 557
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 
178 178
         $urnNodes = $xpath->query(self::rootNode . $qucosaUrnXpath);
179 179
         if ($urnNodes->length > 0) {
180
-            return true;
180
+            return TRUE;
181 181
         } else {
182
-            return false;
182
+            return FALSE;
183 183
         }
184 184
     }
185 185
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         if ($urnNodes->length > 0) {
193 193
             return $urnNodes->item(0)->nodeValue;
194 194
         } else {
195
-            return false;
195
+            return FALSE;
196 196
         }
197 197
     }
198 198
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
         $parserGenerator = new ParserGenerator();
397 397
         $parserGenerator->setXml($this->xml->saveXML());
398
-        $parserGenerator->customXPath($notesXpath,true, $noteContent);
398
+        $parserGenerator->customXPath($notesXpath,TRUE, $noteContent);
399 399
         $this->xml = new \DOMDocument();
400 400
         $this->xml->loadXML($parserGenerator->getXMLData());
401 401
     }
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
     {
507 507
         $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
508 508
         $validation = $this->getValue($validationXpath);
509
-        return (strtolower($validation) === 'true')? true : false;
509
+        return (strtolower($validation) === 'true')? TRUE : FALSE;
510 510
     }
511 511
 
512 512
     /**
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
         } elseif(!empty($value)) {
552 552
             $parserGenerator = new ParserGenerator();
553 553
             $parserGenerator->setXml($this->xml->saveXML());
554
-            $parserGenerator->customXPath($xpathString,true, $value);
554
+            $parserGenerator->customXPath($xpathString,TRUE, $value);
555 555
             $this->xml = new \DOMDocument();
556 556
             $this->xml->loadXML($parserGenerator->getXMLData());
557 557
         }
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
     /**
@@ -36,23 +35,20 @@  discard block
 block discarded – undo
36 35
      */
37 36
     protected $xml;
38 37
 
39
-    public function __construct($xml)
40
-    {
38
+    public function __construct($xml) {
41 39
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
42 40
         $this->clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
43 41
 
44 42
         $this->setXml($xml);
45 43
     }
46 44
 
47
-    public function setXml($xml)
48
-    {
45
+    public function setXml($xml) {
49 46
         $dom = new \DOMDocument();
50 47
         $dom->loadXML($xml);
51 48
         $this->xml = $dom;
52 49
     }
53 50
 
54
-    public function getXml()
55
-    {
51
+    public function getXml() {
56 52
         return $this->xml->saveXML();
57 53
     }
58 54
 
@@ -60,37 +56,31 @@  discard block
 block discarded – undo
60 56
         return $this->xml;
61 57
     }
62 58
 
63
-    public function getXpath()
64
-    {
59
+    public function getXpath() {
65 60
         return $domXPath = \EWW\Dpf\Helper\XPath::create($this->xml);
66 61
     }
67 62
 
68
-    public function getDocumentType()
69
-    {
63
+    public function getDocumentType() {
70 64
         $typeXpath = $this->clientConfigurationManager->getTypeXpath();
71 65
         return $this->getValue($typeXpath);
72 66
     }
73 67
 
74
-    public function setDocumentType($type)
75
-    {
68
+    public function setDocumentType($type) {
76 69
         $typeXpath = $this->clientConfigurationManager->getTypeXpath();
77 70
         $this->setValue($typeXpath, $type);
78 71
     }
79 72
 
80
-    public function getRepositoryState()
81
-    {
73
+    public function getRepositoryState() {
82 74
         $stateXpath = $this->clientConfigurationManager->getStateXpath();
83 75
         return $this->getValue($stateXpath);
84 76
     }
85 77
 
86
-    public function setRepositoryState($state)
87
-    {
78
+    public function setRepositoryState($state) {
88 79
         $stateXpath = $this->clientConfigurationManager->getStateXpath();
89 80
         $this->setValue($stateXpath,$state);
90 81
     }
91 82
 
92
-    public function getProcessNumber()
93
-    {
83
+    public function getProcessNumber() {
94 84
         $processNumberXpath = $this->clientConfigurationManager->getProcessNumberXpath();
95 85
         if ($processNumberXpath) {
96 86
             return $this->getValue($processNumberXpath);
@@ -99,14 +89,12 @@  discard block
 block discarded – undo
99 89
         }
100 90
     }
101 91
 
102
-    public function setProcessNumber($processNumber)
103
-    {
92
+    public function setProcessNumber($processNumber) {
104 93
         $processNumberXpath = $this->clientConfigurationManager->getProcessNumberXpath();
105 94
         $this->getValue($processNumberXpath, $processNumber);
106 95
     }
107 96
 
108
-    public function getTitle()
109
-    {
97
+    public function getTitle() {
110 98
         $titleXpath = $this->clientConfigurationManager->getTitleXpath();
111 99
         $xpath = $this->getXpath();
112 100
 
@@ -121,14 +109,12 @@  discard block
 block discarded – undo
121 109
     /**
122 110
      * @param string $title
123 111
      */
124
-    public function setTitle($title)
125
-    {
112
+    public function setTitle($title) {
126 113
         $titleXpath = $this->clientConfigurationManager->getTitleXpath();
127 114
         $this->setValue($titleXpath, $title);
128 115
     }
129 116
 
130
-    public function getFiles()
131
-    {
117
+    public function getFiles() {
132 118
         $xpath = $this->getXpath();
133 119
 
134 120
         $fileXpath = $this->clientConfigurationManager->getFileXpath();
@@ -158,8 +144,7 @@  discard block
 block discarded – undo
158 144
         return $this->getValue($dateXpath);
159 145
     }
160 146
 
161
-    public function removeDateIssued()
162
-    {
147
+    public function removeDateIssued() {
163 148
         $xpath = $this->getXpath();
164 149
         $dateXpath = $this->clientConfigurationManager->getDateXpath();
165 150
 
@@ -170,8 +155,7 @@  discard block
 block discarded – undo
170 155
 
171 156
     }
172 157
 
173
-    public function hasQucosaUrn()
174
-    {
158
+    public function hasQucosaUrn() {
175 159
         $xpath = $this->getXpath();
176 160
         $qucosaUrnXpath = $this->clientConfigurationManager->getQucosaUrnXpath();
177 161
 
@@ -183,8 +167,7 @@  discard block
 block discarded – undo
183 167
         }
184 168
     }
185 169
 
186
-    public function getQucosaUrn()
187
-    {
170
+    public function getQucosaUrn() {
188 171
         $xpath = $this->getXpath();
189 172
         $qucosaUrnXpath = $this->clientConfigurationManager->getQucosaUrnXpath();
190 173
 
@@ -196,14 +179,12 @@  discard block
 block discarded – undo
196 179
         }
197 180
     }
198 181
 
199
-    public function setQucosaUrn($urn)
200
-    {
182
+    public function setQucosaUrn($urn) {
201 183
         $qucosaUrnXpath = $this->clientConfigurationManager->getQucosaUrnXpath();
202 184
         $this->setValue($qucosaUrnXpath, $urn);
203 185
     }
204 186
 
205
-    public function clearAllUrn()
206
-    {
187
+    public function clearAllUrn() {
207 188
         $xpath = $this->getXpath();
208 189
         $urnXpath = $this->clientConfigurationManager->getUrnXpath();
209 190
         $qucosaUrnXpath = $this->clientConfigurationManager->getQucosaUrnXpath();
@@ -258,50 +239,42 @@  discard block
 block discarded – undo
258 239
         }
259 240
     }
260 241
 
261
-    public function getCreator()
262
-    {
242
+    public function getCreator() {
263 243
         $creatorXpath = $this->clientConfigurationManager->getCreatorXpath();
264 244
         return $this->getValue($creatorXpath);
265 245
     }
266 246
 
267
-    public function setCreator($creator)
268
-    {
247
+    public function setCreator($creator) {
269 248
         $creatorXpath = $this->clientConfigurationManager->getCreatorXpath();
270 249
         $this->setValue($creatorXpath, $creator);
271 250
     }
272 251
 
273
-    public function getCreationDate()
274
-    {
252
+    public function getCreationDate() {
275 253
         $xpath = $this->clientConfigurationManager->getCreationDateXpath();
276 254
         return $this->getValue($xpath);
277 255
     }
278 256
 
279
-    public function setCreationDate($creationDate)
280
-    {
257
+    public function setCreationDate($creationDate) {
281 258
         $xpath = $this->clientConfigurationManager->getCreationDateXpath();
282 259
         $this->setValue($xpath, $creationDate);
283 260
     }
284 261
 
285
-    public function getRepositoryCreationDate()
286
-    {
262
+    public function getRepositoryCreationDate() {
287 263
         $xpath = $this->clientConfigurationManager->getRepositoryCreationDateXpath();
288 264
         return $this->getValue($xpath);
289 265
     }
290 266
 
291
-    public function getRepositoryLastModDate()
292
-    {
267
+    public function getRepositoryLastModDate() {
293 268
         $xpath = $this->clientConfigurationManager->getRepositoryLastModDateXpath();
294 269
         return $this->getValue($xpath);
295 270
     }
296 271
 
297
-    public function getPublishingYear()
298
-    {
272
+    public function getPublishingYear() {
299 273
         $publishingYearXpath = $this->clientConfigurationManager->getPublishingYearXpath();
300 274
         return $this->getValue($publishingYearXpath);
301 275
     }
302 276
 
303
-    public function getOriginalSourceTitle()
304
-    {
277
+    public function getOriginalSourceTitle() {
305 278
         $originalSourceTitleXpath = $this->clientConfigurationManager->getOriginalSourceTitleXpath();
306 279
         return $this->getValue($originalSourceTitleXpath);
307 280
     }
@@ -309,8 +282,7 @@  discard block
 block discarded – undo
309 282
     /**
310 283
      * @return string
311 284
      */
312
-    public function getSourceDetails()
313
-    {
285
+    public function getSourceDetails() {
314 286
         $xpath = $this->getXpath();
315 287
         $data = [];
316 288
         $sourceDetailsXpaths = $this->clientConfigurationManager->getSourceDetailsXpaths();
@@ -363,8 +335,7 @@  discard block
 block discarded – undo
363 335
     /**
364 336
      * @return string
365 337
      */
366
-    public function getDepositLicense()
367
-    {
338
+    public function getDepositLicense() {
368 339
         $depositLicenseXpath = $this->clientConfigurationManager->getDepositLicenseXpath();
369 340
         return $this->getValue($depositLicenseXpath);
370 341
     }
@@ -372,8 +343,7 @@  discard block
 block discarded – undo
372 343
     /**
373 344
      * @return array
374 345
      */
375
-    public function getNotes()
376
-    {
346
+    public function getNotes() {
377 347
         $notesXpath = $this->clientConfigurationManager->getAllNotesXpath();
378 348
 
379 349
         $xpath = $this->getXpath();
@@ -381,16 +351,14 @@  discard block
 block discarded – undo
381 351
 
382 352
         $notes = array();
383 353
 
384
-        for ($i=0; $i < $notesNodes->length; $i++)
385
-        {
354
+        for ($i=0; $i < $notesNodes->length; $i++) {
386 355
             $notes[] = $notesNodes->item($i)->nodeValue;
387 356
         }
388 357
 
389 358
         return $notes;
390 359
     }
391 360
 
392
-    public function addNote($noteContent)
393
-    {
361
+    public function addNote($noteContent) {
394 362
         $notesXpath = $this->clientConfigurationManager->getPrivateNotesXpath();
395 363
 
396 364
         $parserGenerator = new ParserGenerator();
@@ -400,13 +368,11 @@  discard block
 block discarded – undo
400 368
         $this->xml->loadXML($parserGenerator->getXMLData());
401 369
     }
402 370
 
403
-    public function getAuthors()
404
-    {
371
+    public function getAuthors() {
405 372
         return $this->getPersons($this->clientConfigurationManager->getPersonAuthorRole());
406 373
     }
407 374
 
408
-    public function getPublishers()
409
-    {
375
+    public function getPublishers() {
410 376
         return $this->getPersons($this->clientConfigurationManager->getPersonPublisherRole());
411 377
     }
412 378
 
@@ -416,8 +382,7 @@  discard block
 block discarded – undo
416 382
      * @param string $role
417 383
      * @return array
418 384
      */
419
-    public function getPersons($role = '')
420
-    {
385
+    public function getPersons($role = '') {
421 386
         $personXpath = $this->clientConfigurationManager->getPersonXpath();
422 387
         $familyXpath = $this->clientConfigurationManager->getPersonFamilyXpath();
423 388
         $givenXpath = $this->clientConfigurationManager->getPersonGivenXpath();
@@ -490,8 +455,9 @@  discard block
 block discarded – undo
490 455
         if ($role) {
491 456
             $result = [];
492 457
             foreach ($persons as $person) {
493
-                if ($person['role'] == $role)
494
-                    $result[] = $person;
458
+                if ($person['role'] == $role) {
459
+                                    $result[] = $person;
460
+                }
495 461
             }
496 462
             return $result;
497 463
         } else {
@@ -502,8 +468,7 @@  discard block
 block discarded – undo
502 468
     /**
503 469
      * @return bool
504 470
      */
505
-    public function getValidation()
506
-    {
471
+    public function getValidation() {
507 472
         $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
508 473
         $validation = $this->getValue($validationXpath);
509 474
         return (strtolower($validation) === 'true')? true : false;
@@ -512,8 +477,7 @@  discard block
 block discarded – undo
512 477
     /**
513 478
      * @param bool $validated
514 479
      */
515
-    public function setValidation($validated)
516
-    {
480
+    public function setValidation($validated) {
517 481
         $validationXpath =  $this->clientConfigurationManager->getValidationXpath();
518 482
         $this->setValue($validationXpath, ($validated? 'true' : 'false'));
519 483
     }
@@ -521,8 +485,7 @@  discard block
 block discarded – undo
521 485
     /**
522 486
      * @param string $fisId
523 487
      */
524
-    public function setFisId($fisId)
525
-    {
488
+    public function setFisId($fisId) {
526 489
         $fisIdXpath =  $this->clientConfigurationManager->getFisIdXpath();
527 490
         $this->setValue($fisIdXpath, $fisId);
528 491
     }
@@ -531,8 +494,7 @@  discard block
 block discarded – undo
531 494
      * @param string $xpathString
532 495
      * @return string
533 496
      */
534
-    protected function getValue($xpathString)
535
-    {
497
+    protected function getValue($xpathString) {
536 498
         $xpath = $this->getXpath();
537 499
         $nodeList = $xpath->query(self::rootNode . $xpathString);
538 500
         return $nodeList->item(0)->nodeValue;
@@ -542,8 +504,7 @@  discard block
 block discarded – undo
542 504
      * @param string $xpathString
543 505
      * @param string $value
544 506
      */
545
-    protected function setValue($xpathString, $value)
546
-    {
507
+    protected function setValue($xpathString, $value) {
547 508
         $xpath = $this->getXpath();
548 509
         $nodes = $xpath->query(self::rootNode . $xpathString);
549 510
         if ($nodes->length > 0) {
Please login to merge, or discard this patch.