Passed
Pull Request — master (#166)
by
unknown
14:46 queued 04:32
created
Classes/Domain/Model/ProcessNumber.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,6 @@
 block discarded – undo
106 106
     }
107 107
 
108 108
     public function getProcessNumberString() {
109
-        return strtoupper($this->getOwnerId()).'-'. $this->getYear().'-'.$this->getCounter();
109
+        return strtoupper($this->getOwnerId()) . '-' . $this->getYear() . '-' . $this->getCounter();
110 110
     }
111 111
 }
112 112
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return string $ownerId
49 49
      */
50
-    public function getOwnerId()
51
-    {
50
+    public function getOwnerId() {
52 51
         return $this->ownerId;
53 52
     }
54 53
 
@@ -58,8 +57,7 @@  discard block
 block discarded – undo
58 57
      * @param string $ownerId
59 58
      * @return void
60 59
      */
61
-    public function setOwnerId($ownerId)
62
-    {
60
+    public function setOwnerId($ownerId) {
63 61
         $this->ownerId = $ownerId;
64 62
     }
65 63
 
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
      *
69 67
      * @return int $year
70 68
      */
71
-    public function getYear()
72
-    {
69
+    public function getYear() {
73 70
         return $this->year;
74 71
     }
75 72
 
@@ -79,8 +76,7 @@  discard block
 block discarded – undo
79 76
      * @param int $year
80 77
      * @return void
81 78
      */
82
-    public function setYear($year)
83
-    {
79
+    public function setYear($year) {
84 80
         $this->year = $year;
85 81
     }
86 82
 
@@ -89,8 +85,7 @@  discard block
 block discarded – undo
89 85
      *
90 86
      * @return int $counter
91 87
      */
92
-    public function getCounter()
93
-    {
88
+    public function getCounter() {
94 89
         return $this->counter;
95 90
     }
96 91
 
@@ -100,8 +95,7 @@  discard block
 block discarded – undo
100 95
      * @param int $counter
101 96
      * @return void
102 97
      */
103
-    public function setCounter($counter)
104
-    {
98
+    public function setCounter($counter) {
105 99
         $this->counter = $counter;
106 100
     }
107 101
 
Please login to merge, or discard this patch.
Classes/Plugins/DownloadTool/DownloadTool.php 4 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,6 @@
 block discarded – undo
107 107
 
108 108
     /**
109 109
      * Get PDF document list
110
-
111 110
      * @return array of attachments
112 111
      */
113 112
     protected function getAttachments()
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         if (is_array($dpfTSconfig['settings.'])) {
48 48
 
49
-            \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, true, false);
49
+            \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, TRUE, FALSE);
50 50
             $this->conf = $dpfTSconfig['settings.'];
51 51
 
52 52
         }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         // Load current document.
55 55
         $this->loadDocument();
56 56
 
57
-        if ($this->doc === null || empty($this->conf['fileGrpDownload'])) {
57
+        if ($this->doc === NULL || empty($this->conf['fileGrpDownload'])) {
58 58
 
59 59
             // Quit without doing anything if required variables are not set.
60 60
             return $content;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     'useCacheHash'     => 0,
88 88
                     'parameter'        => $this->conf['apiPid'] . ' - piwik_download',
89 89
                     'additionalParams' => '&tx_dpf[qid]=' . $this->doc->recordId . '&tx_dpf[action]=attachment' . '&tx_dpf[attachment]=' . $file['ID'],
90
-                    'forceAbsoluteUrl' => true,
90
+                    'forceAbsoluteUrl' => TRUE,
91 91
                 );
92 92
 
93 93
                 $title = $file['LABEL'] ? $file['LABEL'] : $file['ID'];
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         }
103 103
 
104
-        return $this->cObj->substituteSubpart($this->template, '###DOWNLOADS###', $content, true);
104
+        return $this->cObj->substituteSubpart($this->template, '###DOWNLOADS###', $content, TRUE);
105 105
 
106 106
     }
107 107
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
             foreach ($attachments as $id => $file) {
89 89
 
90
-                $conf = array(
90
+                $conf = array (
91 91
                     'useCacheHash'     => 0,
92 92
                     'parameter'        => $this->conf['apiPid'] . ' - piwik_download',
93 93
                     'additionalParams' => '&tx_dpf[qid]=' . $this->doc->recordId . '&tx_dpf[action]=attachment' . '&tx_dpf[attachment]=' . $file['ID'],
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
                     $markerArray['###FILE###'] = $this->cObj->typoLink($title, $conf);
104 104
 
105 105
                     // Create a-tag with VG-Wort Redirect
106
-                } elseif(!empty($vgwort)) {
106
+                } elseif (!empty($vgwort)) {
107 107
 
108 108
                     $qucosaUrl = urlencode($this->cObj->typoLink_URL($conf));
109 109
 
110
-                    $confVgwort = array(
110
+                    $confVgwort = array (
111 111
                         'useCacheHash'     => 0,
112 112
                         'parameter'        => $vgwort . $qucosaUrl . ' - piwik_download',
113 113
                     );
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
 
142 142
         if (!is_array($files)) {
143 143
 
144
-            return array();
144
+            return array ();
145 145
 
146 146
         }
147 147
 
148 148
         foreach ($files as $key => $file) {
149 149
 
150
-            $singleFile = array();
150
+            $singleFile = array ();
151 151
 
152 152
             foreach ($file->attributes('mext', 1) as $attribute => $value) {
153 153
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $xPath = '//slub:info/slub:vgwortOpenKey';
183 183
         $vgwortOpenKey = $this->doc->mets->xpath($xPath)[0];
184 184
 
185
-        if (!empty($vgwortOpenKey) or $vgwortOpenKey != FALSE ) {
185
+        if (!empty($vgwortOpenKey) or $vgwortOpenKey != FALSE) {
186 186
 
187 187
             if (GeneralUtility::getIndpEnv('TYPO3_SSL')) {
188 188
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  * @subpackage    tx_dpf
25 25
  * @access    public
26 26
  */
27
-class DownloadTool extends \tx_dlf_plugin
28
-{
27
+class DownloadTool extends \tx_dlf_plugin {
29 28
 
30 29
     /**
31 30
      * The main method of the PlugIn
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
      *
38 37
      * @return    string        The content that is displayed on the website
39 38
      */
40
-    public function main($content, $conf)
41
-    {
39
+    public function main($content, $conf) {
42 40
 
43 41
         $this->init($conf);
44 42
 
@@ -131,8 +129,7 @@  discard block
 block discarded – undo
131 129
 
132 130
      * @return array of attachments
133 131
      */
134
-    protected function getAttachments()
135
-    {
132
+    protected function getAttachments() {
136 133
 
137 134
         // Get pdf documents
138 135
         $xPath = 'mets:fileSec/mets:fileGrp[@USE="' . $this->conf['fileGrpDownload'] . '"]/mets:file';
@@ -174,8 +171,7 @@  discard block
 block discarded – undo
174 171
         return $attachments;
175 172
     }
176 173
 
177
-    protected function getVGWortUrl()
178
-    {
174
+    protected function getVGWortUrl() {
179 175
 
180 176
         // Get VG-Wort-OpenKey for document
181 177
         $this->doc->mets->registerXPathNamespace("slub", 'http://slub-dresden.de/');
Please login to merge, or discard this patch.
Classes/Services/ProcessNumber/ProcessNumberGenerator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             $datetime = new \DateTime();
32 32
             $currentYear = $datetime->format('y');
33 33
 
34
-            $processNumber = $processNumberRepository->getHighestProcessNumberByOwnerIdAndYear(strtolower($ownerId),$currentYear);
34
+            $processNumber = $processNumberRepository->getHighestProcessNumberByOwnerIdAndYear(strtolower($ownerId), $currentYear);
35 35
 
36 36
             if ($processNumber) {
37 37
                 $counter = $processNumber->getCounter() + 1;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
 use EWW\Dpf\Domain\Model\ProcessNumber;
21 21
 use EWW\Dpf\Domain\Repository\ClientRepository;
22 22
 
23
-class ProcessNumberGenerator
24
-{
23
+class ProcessNumberGenerator {
25 24
     public function getProcessNumber($ownerId = NULL) {
26 25
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
27 26
         $processNumberRepository = $objectManager->get(ProcessNumberRepository::class);
Please login to merge, or discard this patch.
Classes/Services/Transfer/FedoraRepository.php 4 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@
 block discarded – undo
35 35
     protected $documentTransferLogRepository;
36 36
 
37 37
     /**
38
-    * clientConfigurationManager
39
-    *
40
-    * @var \EWW\Dpf\Configuration\ClientConfigurationManager
41
-    * @inject
42
-    */
38
+     * clientConfigurationManager
39
+     *
40
+     * @var \EWW\Dpf\Configuration\ClientConfigurationManager
41
+     * @inject
42
+     */
43 43
     protected $clientConfigurationManager;
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 use \EWW\Dpf\Services\Logger\TransferLogger;
23 23
 use \Httpful\Request;
24 24
 
25
-class FedoraRepository implements Repository
26
-{
25
+class FedoraRepository implements Repository {
27 26
 
28 27
     /**
29 28
      * documentTransferLogRepository
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * @return string
65 64
      * @throws \Exception
66 65
      */
67
-    public function ingest($document, $metsXml)
68
-    {
66
+    public function ingest($document, $metsXml) {
69 67
         try {
70 68
 
71 69
             $response = Request::post($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection())
@@ -84,8 +82,7 @@  discard block
 block discarded – undo
84 82
                 TransferLogger::Log('INGEST', $document->getUid(), null, $response);
85 83
                 throw new \EWW\Dpf\Exceptions\IngestDocumentErrorException("Fedora error while ingest document.");
86 84
             }
87
-        }
88
-        catch (\Exception $exception) {
85
+        } catch (\Exception $exception) {
89 86
             TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage());
90 87
 
91 88
             if ($exception instanceof \Httpful\Exception\ConnectionErrorException) {
@@ -111,8 +108,7 @@  discard block
 block discarded – undo
111 108
      * @return string
112 109
      * @throws \Exception
113 110
      */
114
-    public function update($document, $metsXml)
115
-    {
111
+    public function update($document, $metsXml) {
116 112
 
117 113
         $remoteId = $document->getObjectIdentifier();
118 114
 
@@ -157,8 +153,7 @@  discard block
 block discarded – undo
157 153
      * @return string
158 154
      * @throws \Exception
159 155
      */
160
-    public function retrieve($remoteId)
161
-    {
156
+    public function retrieve($remoteId) {
162 157
 
163 158
         try {
164 159
             $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/objects/" . $remoteId . "/methods/qucosa:SDef/getMETSDissemination")
@@ -198,8 +193,7 @@  discard block
 block discarded – undo
198 193
      * @return string
199 194
      * @throws \Exception
200 195
      */
201
-    public function getNextDocumentId()
202
-    {
196
+    public function getNextDocumentId() {
203 197
         try {
204 198
             $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/management/getNextPID?numPIDs=1&namespace=qucosa&xml=true")
205 199
                 ->authenticateWith($this->clientConfigurationManager->getFedoraUser(), $this->clientConfigurationManager->getFedoraPassword())
@@ -240,8 +234,7 @@  discard block
 block discarded – undo
240 234
      * @return boolean
241 235
      * @throws \Exception
242 236
      */
243
-    public function delete($document, $state)
244
-    {
237
+    public function delete($document, $state) {
245 238
 
246 239
         $remoteId = $document->getObjectIdentifier();
247 240
 
@@ -294,8 +287,7 @@  discard block
 block discarded – undo
294 287
      * @param  \Httpful\Response $response
295 288
      * @return string
296 289
      */
297
-    protected function getRemoteDocumentId($response)
298
-    {
290
+    protected function getRemoteDocumentId($response) {
299 291
 
300 292
         // Get repository ID and write into document
301 293
         $responseDom = new \DOMDocument();
@@ -312,8 +304,7 @@  discard block
 block discarded – undo
312 304
         return null;
313 305
     }
314 306
 
315
-    protected function getOwnerId()
316
-    {
307
+    protected function getOwnerId() {
317 308
         $ownerId = $this->clientConfigurationManager->getOwnerId();
318 309
         if (empty($ownerId)) {
319 310
             throw new \Exception('Owner id can not be empty or null!');
@@ -322,8 +313,7 @@  discard block
 block discarded – undo
322 313
         return $ownerId;
323 314
     }
324 315
 
325
-    protected function getSWORDCollection()
326
-    {
316
+    protected function getSWORDCollection() {
327 317
         return $this->clientConfigurationManager->getSwordCollectionNamespace();
328 318
     }
329 319
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
             if (!$response->hasErrors() && $response->code == 201) {
82 82
                 return $this->getRemoteDocumentId($response);
83 83
             } else {
84
-                TransferLogger::Log('INGEST', $document->getUid(), null, $response);
84
+                TransferLogger::Log('INGEST', $document->getUid(), NULL, $response);
85 85
                 throw new \EWW\Dpf\Exceptions\IngestDocumentErrorException("Fedora error while ingest document.");
86 86
             }
87 87
         }
88 88
         catch (\Exception $exception) {
89
-            TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage());
89
+            TransferLogger::Log('INGEST', $document->getUid(), NULL, $exception->getMessage());
90 90
 
91 91
             if ($exception instanceof \Httpful\Exception\ConnectionErrorException) {
92 92
                 $message = $exception->getMessage();
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             }
101 101
         }
102 102
 
103
-        return null;
103
+        return NULL;
104 104
     }
105 105
 
106 106
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 throw new \EWW\Dpf\Exceptions\UpdateDocumentErrorException("Fedora error while update document.");
134 134
             }
135 135
         } catch (\Exception $exception) {
136
-            TransferLogger::Log('UPDATE', $document->getUid(), null, $exception->getMessage());
136
+            TransferLogger::Log('UPDATE', $document->getUid(), NULL, $exception->getMessage());
137 137
 
138 138
             if ($exception instanceof \Httpful\Exception\ConnectionErrorException) {
139 139
                 $message = $exception->getMessage();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             }
148 148
         }
149 149
 
150
-        return null;
150
+        return NULL;
151 151
     }
152 152
 
153 153
     /**
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
             if (!$response->hasErrors() && $response->code == 200) {
171 171
                 return $response->__toString();
172 172
             } else {
173
-                TransferLogger::Log('RETRIEVE', null, $remoteId, $response);
173
+                TransferLogger::Log('RETRIEVE', NULL, $remoteId, $response);
174 174
                 throw new \EWW\Dpf\Exceptions\RetrieveDocumentErrorException("Fedora has returned an error.");
175 175
             }
176 176
         } catch (\Exception $exception) {
177
-            TransferLogger::Log('RETRIEVE', null, $remoteId, $exception->getMessage());
177
+            TransferLogger::Log('RETRIEVE', NULL, $remoteId, $exception->getMessage());
178 178
 
179 179
             if ($exception instanceof \Httpful\Exception\ConnectionErrorException) {
180 180
                 $message = $exception->getMessage();
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             }
189 189
         }
190 190
 
191
-        return null;
191
+        return NULL;
192 192
     }
193 193
 
194 194
     /**
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
             if (!$response->hasErrors() && $response->code == 200) {
212 212
                 return $response->__toString();
213 213
             } else {
214
-                TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, null, $response);
214
+                TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, NULL, $response);
215 215
                 throw new \EWW\Dpf\Exceptions\NextDocumentIdErrorException("Fedora error while getting a document id.");
216 216
             }
217 217
         } catch (\Exception $exception) {
218
-            TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, null, $exception->getMessage());
218
+            TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, NULL, $exception->getMessage());
219 219
 
220 220
             if ($exception instanceof \Httpful\Exception\ConnectionErrorException) {
221 221
                 $message = $exception->getMessage();
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             }
230 230
         }
231 231
 
232
-        return null;
232
+        return NULL;
233 233
     }
234 234
 
235 235
     /**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
             // if transfer successful
257 257
             if (!$response->hasErrors() && $response->code == 204) {
258
-                return true;
258
+                return TRUE;
259 259
             } else {
260 260
                 TransferLogger::Log('DELETE', $document->getUid(), $remoteId, $response);
261 261
                 switch ($state) {
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 }
272 272
             }
273 273
         } catch (\Exception $exception) {
274
-            TransferLogger::Log('DELETE', $document->getUid(), null, $exception->getMessage());
274
+            TransferLogger::Log('DELETE', $document->getUid(), NULL, $exception->getMessage());
275 275
 
276 276
             if ($exception instanceof \Httpful\Exception\ConnectionErrorException) {
277 277
                 $message = $exception->getMessage();
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             }
286 286
         }
287 287
 
288
-        return false;
288
+        return FALSE;
289 289
     }
290 290
 
291 291
     /**
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             return $objectIdentifier;
310 310
         }
311 311
 
312
-        return null;
312
+        return NULL;
313 313
     }
314 314
 
315 315
     protected function getOwnerId()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     protected $response;
53 53
 
54
-    protected $errors = array();
54
+    protected $errors = array ();
55 55
 
56 56
     const X_ON_BEHALF_OF = 'X-On-Behalf-Of';
57 57
     const QUCOSA_TYPE    = 'application/vnd.qucosa.mets+xml';
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 
230 230
         $remoteId = $document->getObjectIdentifier();
231 231
 
232
-        $stateParam = ($state)? "?" . $state : "";
232
+        $stateParam = ($state) ? "?" . $state : "";
233 233
 
234 234
         try {
235 235
             $response = Request::delete($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection() . "/" . $remoteId . $stateParam)
Please login to merge, or discard this patch.
Classes/Services/MetsExporter.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -439,7 +439,7 @@
 block discarded – undo
439 439
 
440 440
                 $domXPath2 = \EWW\Dpf\Helper\XPath::create($doc2);
441 441
 
442
-                  // second part nested xpath
442
+                    // second part nested xpath
443 443
                 if ($match[2] && $secondMatch[2]) {
444 444
                     // import node from nested
445 445
                     $docXMLNested = new \DOMDocument();
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
      *
25 25
      * @var array
26 26
      */
27
-    protected $formData = array();
27
+    protected $formData = array ();
28 28
 
29 29
     /**
30 30
      * files from form
31 31
      * @var array
32 32
      */
33
-    protected $files = array();
33
+    protected $files = array ();
34 34
 
35 35
     /**
36 36
      * metsData
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                     $nestedXml = $this->parseXPath($nested);
369 369
 
370 370
                     // object xpath without nested element []
371
-                    $newPath[1] = str_replace('['.$match[2].']', '', $newPath[1]);
371
+                    $newPath[1] = str_replace('[' . $match[2] . ']', '', $newPath[1]);
372 372
 
373 373
                     $xml = $this->parseXPath($newPath[1]);
374 374
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
                     $nestedXml = $this->parseXPath($nested);
430 430
 
431 431
                     // object xpath without nested element []
432
-                    $newPath[1] = str_replace('['.$match[2].']', '', $newPath[1]);
432
+                    $newPath[1] = str_replace('[' . $match[2] . ']', '', $newPath[1]);
433 433
 
434 434
                     $xml2 = $this->parseXPath($path . $newPath[1]);
435 435
                 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * simpleXMLElement
74 74
      */
75
-    protected $sxe = null;
75
+    protected $sxe = NULL;
76 76
 
77 77
     /**
78 78
      * xPathXMLGenerator
79 79
      * @var object
80 80
      */
81
-    protected $parser = null;
81
+    protected $parser = NULL;
82 82
 
83 83
     /**
84 84
      * ref id counter
@@ -172,26 +172,26 @@  discard block
 block discarded – undo
172 172
         $xmlData = $modsWrap->firstChild->firstChild->firstChild->firstChild;
173 173
 
174 174
         // import mods into mets
175
-        $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, true);
175
+        $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, TRUE);
176 176
         $xmlData->appendChild($nodeAppendModsData);
177 177
 
178 178
         // add SLUB data
179
-        $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, true);
179
+        $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, TRUE);
180 180
         $modsWrap->firstChild->appendChild($nodeAppendModsData);
181 181
 
182 182
         if ($fileSection) {
183 183
             // add filesection
184
-            $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, true);
184
+            $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, TRUE);
185 185
             $modsWrap->firstChild->appendChild($nodeAppendModsData);
186 186
         }
187 187
 
188 188
         if ($structureMap) {
189 189
             // add structure map
190
-            $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, true);
190
+            $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, TRUE);
191 191
             $modsWrap->firstChild->appendChild($nodeAppendModsData);
192 192
         }
193 193
 
194
-        $modsWrap->formatOutput = true;
194
+        $modsWrap->formatOutput = TRUE;
195 195
         $modsWrap->encoding     = 'UTF-8';
196 196
 
197 197
         $this->metsData = $modsWrap;
@@ -253,28 +253,28 @@  discard block
 block discarded – undo
253 253
                 $attributeXPath .= '[@ID="QUCOSA_' . $counter . '"]';
254 254
             }
255 255
 
256
-            $existsExtensionFlag = false;
256
+            $existsExtensionFlag = FALSE;
257 257
             $i                   = 0;
258 258
             // loop each object
259 259
             if (!empty($values)) {
260 260
                 foreach ($values as $value) {
261 261
 
262 262
                     if ($value['modsExtension']) {
263
-                        $existsExtensionFlag = true;
263
+                        $existsExtensionFlag = TRUE;
264 264
                         // mods extension
265 265
                         $counter            = sprintf("%'03d", $this->counter);
266 266
                         $referenceAttribute = $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]';
267 267
 
268 268
                         $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping'];
269 269
 
270
-                        $xml = $this->customXPath($path, false, $value['value']);
270
+                        $xml = $this->customXPath($path, FALSE, $value['value']);
271 271
                     } else {
272 272
                         $path = $mapping . $attributeXPath . '%/' . $value['mapping'];
273 273
 
274 274
                         if ($i == 0) {
275
-                            $newGroupFlag = true;
275
+                            $newGroupFlag = TRUE;
276 276
                         } else {
277
-                            $newGroupFlag = false;
277
+                            $newGroupFlag = FALSE;
278 278
                         }
279 279
 
280 280
                         $xml = $this->customXPath($path, $newGroupFlag, $value['value']);
@@ -286,12 +286,12 @@  discard block
 block discarded – undo
286 286
             } else {
287 287
                 if (!empty($attributeXPath)) {
288 288
                     $path = $mapping . $attributeXPath;
289
-                    $xml  = $this->customXPath($path, true, '', true);
289
+                    $xml  = $this->customXPath($path, TRUE, '', TRUE);
290 290
                 }
291 291
             }
292 292
             if (!$existsExtensionFlag && $group['modsExtensionMapping']) {
293 293
                 $xPath = $group['modsExtensionMapping'] . $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]';
294
-                $xml   = $this->customXPath($xPath, true, '', true);
294
+                $xml   = $this->customXPath($xPath, TRUE, '', TRUE);
295 295
             }
296 296
             if ($group['modsExtensionMapping']) {
297 297
                 $this->counter++;
@@ -321,13 +321,13 @@  discard block
 block discarded – undo
321 321
      * @param  string $value form value
322 322
      * @return xml    created xml
323 323
      */
324
-    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
324
+    public function customXPath($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE)
325 325
     {
326 326
         if (!$attributeOnly) {
327 327
             // Explode xPath
328 328
             $newPath = explode('%', $xPath);
329 329
 
330
-            $praedicateFlag = false;
330
+            $praedicateFlag = FALSE;
331 331
             $explodedXPath  = explode('[', $newPath[0]);
332 332
             if (count($explodedXPath) > 1) {
333 333
                 // praedicate is given
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
                     $path = $explodedXPath[0];
340 340
                 }
341 341
 
342
-                $praedicateFlag = true;
342
+                $praedicateFlag = TRUE;
343 343
             } else {
344 344
                 $path = $newPath[0];
345 345
             }
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
                     $nodeList = $xPath->query('/mods:mods' . $match[1]);
390 390
                     $node = $nodeList->item(0);
391 391
 
392
-                    $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true);
392
+                    $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE);
393 393
 
394 394
                     $node->appendChild($importNode);
395 395
                 }
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 
401 401
                 $node = $domNodeList->item(0)->firstChild;
402 402
 
403
-                $nodeAppendModsData = $this->xmlData->importNode($node, true);
403
+                $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
404 404
                 $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
405 405
             } else {
406 406
                 // first xpath doesn't exist
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
                     $nodeList = $xPath->query('/mods:mods/' . $path . $match[1]);
449 449
                     $node = $nodeList->item(0);
450 450
 
451
-                    $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true);
451
+                    $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE);
452 452
 
453 453
                     $node->appendChild($importNode);
454 454
                 }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                 $domNode2 = $domXPath2->query('/mods:mods/' . $path)->item(0)->childNodes->item(0);
457 457
 
458 458
                 // merge xml nodes
459
-                $nodeToBeAppended = $doc1->importNode($domNode2, true);
459
+                $nodeToBeAppended = $doc1->importNode($domNode2, TRUE);
460 460
 
461 461
                 $domNode->item(0)->appendChild($nodeToBeAppended);
462 462
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                 $firstChild = $this->xmlData->firstChild;
466 466
                 $firstItem  = $doc1->getElementsByTagName('mods')->item(0)->firstChild;
467 467
 
468
-                $nodeAppendModsData = $this->xmlData->importNode($firstItem, true);
468
+                $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE);
469 469
                 $firstChild->appendChild($nodeAppendModsData);
470 470
 
471 471
                 return $doc1->saveXML();
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 
485 485
             $node = $domNodeList->item(0)->firstChild;
486 486
 
487
-            $nodeAppendModsData = $this->xmlData->importNode($node, true);
487
+            $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
488 488
             $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
489 489
 
490 490
             return $docXML->saveXML();
@@ -493,13 +493,13 @@  discard block
 block discarded – undo
493 493
         return $this->xmlData->saveXML();
494 494
     }
495 495
 
496
-    public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
496
+    public function customXPathSlub($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE)
497 497
     {
498 498
         if (!$attributeOnly) {
499 499
             // Explode xPath
500 500
             $newPath = explode('%', $xPath);
501 501
 
502
-            $praedicateFlag = false;
502
+            $praedicateFlag = FALSE;
503 503
             $explodedXPath  = explode('[', $newPath[0]);
504 504
             if (count($explodedXPath) > 1) {
505 505
                 // praedicate is given
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
                     $path = $explodedXPath[0];
512 512
                 }
513 513
 
514
-                $praedicateFlag = true;
514
+                $praedicateFlag = TRUE;
515 515
             } else {
516 516
                 $path = $newPath[0];
517 517
             }
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 
539 539
                 $node = $domNodeList->item(0)->firstChild;
540 540
 
541
-                $nodeAppendModsData = $this->xmlData->importNode($node, true);
541
+                $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
542 542
                 $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
543 543
             } else {
544 544
                 // first xpath doesn't exist
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
                 $domNode2 = $domXPath2->query('/slub:info/' . $path)->item(0)->childNodes->item(0);
568 568
 
569 569
                 // merge xml nodes
570
-                $nodeToBeAppended = $doc1->importNode($domNode2, true);
570
+                $nodeToBeAppended = $doc1->importNode($domNode2, TRUE);
571 571
 
572 572
                 $domNode->item(0)->appendChild($nodeToBeAppended);
573 573
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
                 $firstChild = $this->xmlData->firstChild;
578 578
                 $firstItem  = $doc1->getElementsByTagName('info')->item(0)->firstChild;
579 579
 
580
-                $nodeAppendModsData = $this->xmlData->importNode($firstItem, true);
580
+                $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE);
581 581
                 $firstChild->appendChild($nodeAppendModsData);
582 582
 
583 583
                 return $doc1->saveXML();
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
             $node = $domNodeList->item(0)->firstChild;
598 598
 
599
-            $nodeAppendModsData = $this->xmlData->importNode($node, true);
599
+            $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
600 600
             $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
601 601
 
602 602
             return $docXML->saveXML();
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
         $second = $this->slubData;
847 847
 
848 848
         foreach ($second->childNodes as $node) {
849
-            $importNode = $domDocument->importNode($node, true);
849
+            $importNode = $domDocument->importNode($node, TRUE);
850 850
             $domWrapElement->appendChild($importNode);
851 851
         }
852 852
 
@@ -902,14 +902,14 @@  discard block
 block discarded – undo
902 902
 
903 903
                             $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping'];
904 904
 
905
-                            $xml = $this->customXPathSlub($path, false, $value['value']);
905
+                            $xml = $this->customXPathSlub($path, FALSE, $value['value']);
906 906
                         } else {
907 907
                             $path = $mapping . $attributeXPath . '%/' . $value['mapping'];
908 908
 
909 909
                             if ($i == 0) {
910
-                                $newGroupFlag = true;
910
+                                $newGroupFlag = TRUE;
911 911
                             } else {
912
-                                $newGroupFlag = false;
912
+                                $newGroupFlag = FALSE;
913 913
                             }
914 914
 
915 915
                             $xml = $this->customXPathSlub($path, $newGroupFlag, $value['value']);
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
                 } else {
923 923
                     if (!empty($attributeXPath)) {
924 924
                         $path = $mapping . $attributeXPath;
925
-                        $xml  = $this->customXPathSlub($path, true, '', true);
925
+                        $xml  = $this->customXPathSlub($path, TRUE, '', TRUE);
926 926
                     }
927 927
                 }
928 928
 
Please login to merge, or discard this patch.
Braces   +24 added lines, -48 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * MetsExporter
19 19
  */
20
-class MetsExporter
21
-{
20
+class MetsExporter {
22 21
     /**
23 22
      * formData
24 23
      *
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
     /**
97 96
      * Constructor
98 97
      */
99
-    public function __construct()
100
-    {
98
+    public function __construct() {
101 99
         // mets data beginning
102 100
         $this->metsHeader = '<mets:mets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
103 101
                             xmlns:mets="http://www.loc.gov/METS/" xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -138,8 +136,7 @@  discard block
 block discarded – undo
138 136
      * returns the mets xml string
139 137
      * @return string mets xml
140 138
      */
141
-    public function getMetsData()
142
-    {
139
+    public function getMetsData() {
143 140
         $xml = $this->metsData->saveXML();
144 141
 
145 142
         $xml = preg_replace("/eww=\"\d-\d-\d\"/", '${1}${2}${3}', $xml);
@@ -152,8 +149,7 @@  discard block
 block discarded – undo
152 149
      * returns the mods xml string
153 150
      * @return string mods xml
154 151
      */
155
-    public function getModsData()
156
-    {
152
+    public function getModsData() {
157 153
         return $this->modsData->saveXML();
158 154
     }
159 155
 
@@ -161,8 +157,7 @@  discard block
 block discarded – undo
161 157
      * Build mets data structure
162 158
      * @return string mets xml
163 159
      */
164
-    public function buildMets()
165
-    {
160
+    public function buildMets() {
166 161
         // get mods domDocument
167 162
         $modsWrap = $this->buildModsWrap();
168 163
         // get mets filesection
@@ -203,8 +198,7 @@  discard block
 block discarded – undo
203 198
      * @param  xml $xml xml data which should be wrapped with mods
204 199
      * @return xml wrapped xml
205 200
      */
206
-    public function wrapMods($xml)
207
-    {
201
+    public function wrapMods($xml) {
208 202
         $newXML = $this->modsHeader;
209 203
 
210 204
         $newXML = str_replace("</mods:mods>", $xml . "</mods:mods>", $newXML);
@@ -212,8 +206,7 @@  discard block
 block discarded – undo
212 206
         return $newXML;
213 207
     }
214 208
 
215
-    public function wrapSlub($xml)
216
-    {
209
+    public function wrapSlub($xml) {
217 210
         $newXML = $this->slubHeader;
218 211
 
219 212
         $newXML = str_replace("</slub:info>", $xml . "</slub:info>", $newXML);
@@ -225,8 +218,7 @@  discard block
 block discarded – undo
225 218
      * build mods from form array
226 219
      * @param array $array structured form data array
227 220
      */
228
-    public function buildModsFromForm($array)
229
-    {
221
+    public function buildModsFromForm($array) {
230 222
         $this->xmlData = $this->modsData;
231 223
         // Build xml mods from form fields
232 224
         // loop each group
@@ -308,8 +300,7 @@  discard block
 block discarded – undo
308 300
      * @param  xpath $xPath xPath expression
309 301
      * @return xml
310 302
      */
311
-    public function parseXPath($xPath)
312
-    {
303
+    public function parseXPath($xPath) {
313 304
 
314 305
         $this->parser->generateXmlFromXPath($xPath);
315 306
         $xml = $this->parser->getXML();
@@ -323,8 +314,7 @@  discard block
 block discarded – undo
323 314
      * @param  string $value form value
324 315
      * @return xml    created xml
325 316
      */
326
-    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
327
-    {
317
+    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) {
328 318
         if (!$attributeOnly) {
329 319
             // Explode xPath
330 320
             $newPath = explode('%', $xPath);
@@ -495,8 +485,7 @@  discard block
 block discarded – undo
495 485
         return $this->xmlData->saveXML();
496 486
     }
497 487
 
498
-    public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
499
-    {
488
+    public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) {
500 489
         if (!$attributeOnly) {
501 490
             // Explode xPath
502 491
             $newPath = explode('%', $xPath);
@@ -610,8 +599,7 @@  discard block
 block discarded – undo
610 599
      * Builds the xml wrapping part for mods
611 600
      * @return xml
612 601
      */
613
-    public function buildModsWrap()
614
-    {
602
+    public function buildModsWrap() {
615 603
         // Build wrap for mod
616 604
 
617 605
         $domDocument = new \DOMDocument();
@@ -649,8 +637,7 @@  discard block
 block discarded – undo
649 637
      * Builds xml amdSection
650 638
      * @return xml
651 639
      */
652
-    public function buildAmdSection()
653
-    {
640
+    public function buildAmdSection() {
654 641
         // Build xml amd:sec
655 642
 
656 643
         $domDocument = new \DOMDocument();
@@ -661,8 +648,7 @@  discard block
 block discarded – undo
661 648
         $amdSec = $domDocument->createElement('mets:amdSec');
662 649
     }
663 650
 
664
-    public function setMods($value = '')
665
-    {
651
+    public function setMods($value = '') {
666 652
         $domDocument = new \DOMDocument();
667 653
         if (is_null(@$domDocument->loadXML($value))) {
668 654
             throw new \Exception("Couldn't load MODS data");
@@ -670,13 +656,11 @@  discard block
 block discarded – undo
670 656
         $this->modsData = $domDocument;
671 657
     }
672 658
 
673
-    public function setFileData($value = '')
674
-    {
659
+    public function setFileData($value = '') {
675 660
         $this->files = $value;
676 661
     }
677 662
 
678
-    public function loopFiles($array, $domElement, $domDocument)
679
-    {
663
+    public function loopFiles($array, $domElement, $domDocument) {
680 664
         $i = 0;
681 665
         // set xml for uploded files
682 666
         foreach ($array as $key => $value) {
@@ -721,8 +705,7 @@  discard block
 block discarded – undo
721 705
      * Builds the xml fileSection part if files are uploaded
722 706
      * @return xml
723 707
      */
724
-    public function buildFileSection()
725
-    {
708
+    public function buildFileSection() {
726 709
         if (empty($this->files['original']) && empty($this->files['download'])) {
727 710
             return;
728 711
         }
@@ -769,8 +752,7 @@  discard block
 block discarded – undo
769 752
      * Builds the xml structMap part if files are uploaded
770 753
      * @return xml
771 754
      */
772
-    public function buildStructureMap()
773
-    {
755
+    public function buildStructureMap() {
774 756
         // Build xml Mets:structMap
775 757
 
776 758
         $domDocument = new \DOMDocument();
@@ -809,8 +791,7 @@  discard block
 block discarded – undo
809 791
         return $domDocument;
810 792
     }
811 793
 
812
-    public function setSlubInfo($value = '')
813
-    {
794
+    public function setSlubInfo($value = '') {
814 795
         // build DOMDocument with slub xml
815 796
         $domDocument = new \DOMDocument();
816 797
         $domDocument->loadXML($value);
@@ -822,8 +803,7 @@  discard block
 block discarded – undo
822 803
      * @param  Array $array Array with slub information
823 804
      * @return xml        xml slubInfo
824 805
      */
825
-    public function buildMetsSlub()
826
-    {
806
+    public function buildMetsSlub() {
827 807
         $domDocument = new \DOMDocument();
828 808
         $domDocument->loadXML('<mets:amdSec ID="AMD_000" xmlns:mets="http://www.loc.gov/METS/"></mets:amdSec>');
829 809
         $domWrapElement = $domDocument->firstChild;
@@ -864,8 +844,7 @@  discard block
 block discarded – undo
864 844
      * returns the mods xml string
865 845
      * @return string mods xml
866 846
      */
867
-    public function getSlubData()
868
-    {
847
+    public function getSlubData() {
869 848
         return $this->slubData->saveXML();
870 849
     }
871 850
 
@@ -873,8 +852,7 @@  discard block
 block discarded – undo
873 852
      *
874 853
      * @param string $slubInfoData
875 854
      */
876
-    public function buildSlubInfoFromForm($slubInfoData, $documentType, $processNumber)
877
-    {
855
+    public function buildSlubInfoFromForm($slubInfoData, $documentType, $processNumber) {
878 856
         $this->xmlData = $this->slubData;
879 857
         if (is_array($slubInfoData['metadata'])) {
880 858
             foreach ($slubInfoData['metadata'] as $key => $group) {
@@ -957,8 +935,7 @@  discard block
 block discarded – undo
957 935
      *
958 936
      * @return string slub info xml
959 937
      */
960
-    public function getSlubInfoData()
961
-    {
938
+    public function getSlubInfoData() {
962 939
         return $this->slubData->saveXML();
963 940
     }
964 941
 
@@ -967,8 +944,7 @@  discard block
 block discarded – undo
967 944
      * @param string $objId
968 945
      * @return void
969 946
      */
970
-    public function setObjId($objId)
971
-    {
947
+    public function setObjId($objId) {
972 948
         $this->objId = $objId;
973 949
     }
974 950
 }
Please login to merge, or discard this patch.
Classes/Controller/SearchFEController.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $this->currentPage = 1;
89 89
         } else {
90 90
             // restore query
91
-            $this->query = (!empty($session[$this->action]['query'])) ? $session[$this->action]['query'] : array();
91
+            $this->query = (!empty($session[$this->action]['query'])) ? $session[$this->action]['query'] : array ();
92 92
             // set current page
93 93
             if ((!empty($currentPage))) {
94 94
                 $this->currentPage = MathUtility::forceIntegerInRange($currentPage, 1);
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
      */
198 198
     private function viewAssign()
199 199
     {
200
-        $this->view->assign('query',       $this->query);
201
-        $this->view->assign('resultList',  $this->resultList);
200
+        $this->view->assign('query', $this->query);
201
+        $this->view->assign('resultList', $this->resultList);
202 202
         $this->view->assign('currentPage', $this->currentPage);
203 203
     }
204 204
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 $message,
125 125
                 '',
126 126
                 $severity,
127
-                true
127
+                TRUE
128 128
             );
129 129
         }
130 130
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                 $message,
156 156
                 '',
157 157
                 $severity,
158
-                true
158
+                TRUE
159 159
             );
160 160
         }
161 161
     }
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 /**
20 20
  * SearchFEController
21 21
  */
22
-class SearchFEController extends \EWW\Dpf\Controller\AbstractSearchController
23
-{
22
+class SearchFEController extends \EWW\Dpf\Controller\AbstractSearchController {
24 23
 
25 24
     /**
26 25
      * action
@@ -63,8 +62,7 @@  discard block
 block discarded – undo
63 62
     /**
64 63
      * __construct
65 64
      */
66
-    public function __construct()
67
-    {
65
+    public function __construct() {
68 66
         // get session data
69 67
         $session = $this->getSessionData('tx_dpf_frontendsearch');
70 68
         // get action
@@ -105,8 +103,7 @@  discard block
 block discarded – undo
105 103
      * @return void
106 104
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
107 105
      */
108
-    public function initializeSearchAction()
109
-    {
106
+    public function initializeSearchAction() {
110 107
         if ($this->action == 'extendedSearch') {
111 108
             $this->forward('extendedSearch');
112 109
         }
@@ -116,8 +113,7 @@  discard block
 block discarded – undo
116 113
      * action search
117 114
      * @return void
118 115
      */
119
-    public function searchAction()
120
-    {
116
+    public function searchAction() {
121 117
         try {
122 118
             if (!empty($this->query['fulltext'])) {
123 119
                 $query = $this->searchFulltext($this->query['fulltext']);
@@ -145,8 +141,7 @@  discard block
 block discarded – undo
145 141
      * @return void
146 142
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
147 143
      */
148
-    public function initializeExtendedSearchAction()
149
-    {
144
+    public function initializeExtendedSearchAction() {
150 145
         if ($this->action == 'search') {
151 146
             $this->forward('search');
152 147
         }
@@ -156,8 +151,7 @@  discard block
 block discarded – undo
156 151
      * action extendedSearch
157 152
      * @return void
158 153
      */
159
-    public function extendedSearchAction()
160
-    {
154
+    public function extendedSearchAction() {
161 155
         try {
162 156
             $this->docTypes();
163 157
             if (!empty(implode('', $this->query))) {
@@ -185,8 +179,7 @@  discard block
 block discarded – undo
185 179
      * @param  array $query
186 180
      * @return array $results
187 181
      */
188
-    private function getResults($query)
189
-    {
182
+    private function getResults($query) {
190 183
         $size = $this->settings['list']['paginate']['itemsPerPage'];
191 184
 
192 185
         $query['body']['from'] = ($this->currentPage - 1) * $size;
@@ -202,8 +195,7 @@  discard block
 block discarded – undo
202 195
      * dummy action for showSearchForm Action used in sidebar
203 196
      * @return void
204 197
      */
205
-    public static function showSearchFormAction()
206
-    {
198
+    public static function showSearchFormAction() {
207 199
 
208 200
     }
209 201
 
@@ -211,8 +203,7 @@  discard block
 block discarded – undo
211 203
      * set session data
212 204
      * @return void
213 205
      */
214
-    private function setSession()
215
-    {
206
+    private function setSession() {
216 207
         $session[$this->action] = array (
217 208
                 'query'       => $this->query,
218 209
                 'currentPage' => $this->currentPage
@@ -224,8 +215,7 @@  discard block
 block discarded – undo
224 215
      * create docTypes
225 216
      * @return void
226 217
      */
227
-    private function docTypes()
228
-    {
218
+    private function docTypes() {
229 219
         // get document types
230 220
         $allTypes = $this->documentTypeRepository->findAll();
231 221
         // add empty field
@@ -241,8 +231,7 @@  discard block
 block discarded – undo
241 231
      * create view
242 232
      * @return void
243 233
      */
244
-    private function viewAssign()
245
-    {
234
+    private function viewAssign() {
246 235
         $this->view->assign('query',       $this->query);
247 236
         $this->view->assign('resultList',  $this->resultList);
248 237
         $this->view->assign('currentPage', $this->currentPage);
Please login to merge, or discard this patch.
Classes/Controller/GetFileController.php 3 patches
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -179,20 +179,20 @@
 block discarded – undo
179 179
             return 'Error while fetching headers';
180 180
         }
181 181
 
182
-        $contentDispFlag = false;
183
-        $contentTypeFlag = false;
182
+        $contentDispFlag = FALSE;
183
+        $contentTypeFlag = FALSE;
184 184
 
185 185
         foreach ($headers as $value) {
186 186
 
187 187
             if (FALSE !== stripos($value, 'Content-Disposition')) {
188 188
                 header($value);
189
-                $contentDispFlag = true;
189
+                $contentDispFlag = TRUE;
190 190
                 continue;
191 191
             }
192 192
 
193 193
             if (FALSE !== stripos($value, 'Content-Type')) {
194 194
                 header($value);
195
-                $contentTypeFlag = true;
195
+                $contentTypeFlag = TRUE;
196 196
                 continue;
197 197
             }
198 198
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
 /**
47 47
  * GetFileController
48 48
  */
49
-class GetFileController extends \EWW\Dpf\Controller\AbstractController
50
-{
49
+class GetFileController extends \EWW\Dpf\Controller\AbstractController {
51 50
 
52 51
     /**
53 52
      * documentRepository
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
      */
66 65
     protected $clientConfigurationManager;
67 66
 
68
-    public function attachmentAction()
69
-    {
67
+    public function attachmentAction() {
70 68
 
71 69
         $piVars = GeneralUtility::_GP('tx_dpf'); // get GET params from powermail
72 70
 
@@ -237,8 +235,7 @@  discard block
 block discarded – undo
237 235
 
238 236
     }
239 237
 
240
-    private static function sanitizeFilename($filename)
241
-    {
238
+    private static function sanitizeFilename($filename) {
242 239
         // remove anything which isn't a word, whitespace, number or any of the following caracters -_~,;[]().
243 240
         $filename = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $filename);
244 241
         // turn diacritical characters to ASCII
@@ -250,8 +247,7 @@  discard block
 block discarded – undo
250 247
         return $filename;
251 248
     }
252 249
 
253
-    private function buildMetsXml($document)
254
-    {
250
+    private function buildMetsXml($document) {
255 251
 
256 252
         $exporter = new \EWW\Dpf\Services\MetsExporter();
257 253
         $fileData = $document->getCurrentFileData();
@@ -275,8 +271,7 @@  discard block
 block discarded – undo
275 271
         return $metsXml;
276 272
     }
277 273
 
278
-    private function isForbidden($action)
279
-    {
274
+    private function isForbidden($action) {
280 275
         $allowed =
281 276
             array_key_exists('allowedActions', $this->settings)
282 277
             && is_array($this->settings['allowedActions'])
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         switch ($piVars['action']) {
83 83
             case 'mets':
84
-                $path = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
84
+                $path = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
85 85
                 break;
86 86
 
87 87
             case 'preview':
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 $source = explode(':', $qid);
147 147
                 if ($source[0] == 'qucosa') {
148 148
 
149
-                    $path = rtrim('http://' . $fedoraHost, "/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
149
+                    $path = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
150 150
                     $metsXml = str_replace('&', '&amp;', file_get_contents($path));
151 151
                     $dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml);
152 152
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         if (TRUE === $isRepositoryObject) {
200 200
             if (TRUE === $restrictToActiveDocuments) {
201 201
                 // if restriction applies, check object state before dissemination
202
-                $objectProfileURI = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'?format=XML';
202
+                $objectProfileURI = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '?format=XML';
203 203
                 $objectProfileXML = file_get_contents($objectProfileURI);
204 204
                 if (FALSE !== $objectProfileXML) {
205 205
                     $objectProfileDOM = new \DOMDocument('1.0', 'UTF-8');
Please login to merge, or discard this patch.
Classes/Services/Transfer/Repository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-interface Repository
18
-{
17
+interface Repository {
19 18
 
20 19
     public function ingest($document, $metsXml);
21 20
 
Please login to merge, or discard this patch.
Classes/Services/Transfer/FileId.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function __construct($document)
23 23
     {
24 24
 
25
-        $idList   = array();
25
+        $idList   = array ();
26 26
         $this->id = 0;
27 27
 
28 28
         if (is_a($document->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,13 +14,11 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class FileId
18
-{
17
+class FileId {
19 18
 
20 19
     protected $id = 0;
21 20
 
22
-    public function __construct($document)
23
-    {
21
+    public function __construct($document) {
24 22
 
25 23
         $idList   = array();
26 24
         $this->id = 0;
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
 
43 41
     }
44 42
 
45
-    public function getId($file)
46
-    {
43
+    public function getId($file) {
47 44
 
48 45
         $fileId = $file->getDatastreamIdentifier();
49 46
         if (empty($fileId)) {
Please login to merge, or discard this patch.