Passed
Pull Request — master (#195)
by
unknown
12:46 queued 05:37
created
src/Configuration/TCA/tx_dpf_domain_model_externalmetadata.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     die('Access denied.');
17 17
 }
18 18
 
19
-return array(
20
-    'ctrl' => array(
19
+return array (
20
+    'ctrl' => array (
21 21
         'title'                    => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_externalmetadata',
22 22
         'label'                    => 'publication_identifier',
23 23
         'type'                     => 'record_type',
@@ -28,21 +28,21 @@  discard block
 block discarded – undo
28 28
         'searchFields'             => 'data, fe_user, source, publication_identifier, record_type',
29 29
         'iconfile'                 => 'EXT:dpf/Resources/Public/Icons/tx_dpf_domain_model_document.gif',
30 30
     ),
31
-    'interface' => array(
31
+    'interface' => array (
32 32
         'showRecordFieldList' => 'data, fe_user, source, publication_identifier, record_type',
33 33
     ),
34
-    'types'     => array(
35
-        '0' => array('showitem' => 'data, fe_user, source, publication_identifier, record_type'),
34
+    'types'     => array (
35
+        '0' => array ('showitem' => 'data, fe_user, source, publication_identifier, record_type'),
36 36
     ),
37
-    'palettes'  => array(
38
-        '1' => array('showitem' => ''),
37
+    'palettes'  => array (
38
+        '1' => array ('showitem' => ''),
39 39
     ),
40
-    'columns'   => array(
41
-        'record_type' => array(
40
+    'columns'   => array (
41
+        'record_type' => array (
42 42
             'label' => 'Record type',
43
-            'config' => array(
43
+            'config' => array (
44 44
                 'type' => 'select',
45
-                'items' => array(
45
+                'items' => array (
46 46
                     ['', '0'],
47 47
                     ['CrossRefMetadata', 'EWW\Dpf\Domain\Model\CrossRefMetadata'],
48 48
                     ['DataCiteMetadata', 'EWW\Dpf\Domain\Model\DataCiteMetadata'],
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
             ),
56 56
         ),
57 57
 
58
-        'data'                   => array(
58
+        'data'                   => array (
59 59
             'exclude' => 1,
60 60
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_externalmetadata.data',
61
-            'config'  => array(
61
+            'config'  => array (
62 62
                 'type' => 'text',
63 63
                 'cols' => 40,
64 64
                 'rows' => 15,
@@ -66,33 +66,33 @@  discard block
 block discarded – undo
66 66
             ),
67 67
         ),
68 68
 
69
-        'source'                => array(
69
+        'source'                => array (
70 70
             'exclude' => 1,
71 71
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_externalmetadata.source',
72
-            'config'  => array(
72
+            'config'  => array (
73 73
                 'type' => 'input',
74 74
                 'size' => 30,
75 75
                 'eval' => 'trim',
76 76
             ),
77 77
         ),
78 78
 
79
-        'publication_identifier'                => array(
79
+        'publication_identifier'                => array (
80 80
             'exclude' => 1,
81 81
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_externalmetadata.publication_identifier',
82
-            'config'  => array(
82
+            'config'  => array (
83 83
                 'type' => 'input',
84 84
                 'size' => 30,
85 85
                 'eval' => 'trim',
86 86
             ),
87 87
         ),
88 88
 
89
-        'fe_user'              => array(
89
+        'fe_user'              => array (
90 90
             'exclude' => 1,
91 91
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_externalmetadata.fe_user',
92
-            'config'  => array(
92
+            'config'  => array (
93 93
                 'type'          => 'select',
94 94
                 'items' => array (
95
-                    array('', 0),
95
+                    array ('', 0),
96 96
                 ),
97 97
                 'renderType'    => 'selectSingle',
98 98
                 'foreign_table' => 'fe_users',
Please login to merge, or discard this patch.
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.