Passed
Pull Request — master (#64)
by
unknown
03:05
created
Classes/Services/parser/src/nbsp/bitter/Tokens/HTML.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             ],
29 29
             'comment'     => [
30 30
                 Lexer::MATCH => '<!--',
31
-                Lexer::CALL  => function ($in, $out, $token) {
31
+                Lexer::CALL  => function($in, $out, $token) {
32 32
                     $out->startToken('comment');
33 33
 
34 34
                     $begin = $token;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             ],
55 55
             'doctype'     => [
56 56
                 Lexer::MATCH => '<!(?!--)',
57
-                Lexer::CALL  => function ($in, $out, $token) {
57
+                Lexer::CALL  => function($in, $out, $token) {
58 58
                     $out->startToken('comment');
59 59
 
60 60
                     $begin = $token;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             ],
81 81
             'instruction' => [
82 82
                 Lexer::MATCH => '<[?]xml.*?[?]>',
83
-                Lexer::CALL  => function ($in, $out, $token) {
83
+                Lexer::CALL  => function($in, $out, $token) {
84 84
                     $out->startToken('type instruction');
85 85
 
86 86
                     $in = new Input();
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             ],
94 94
             'element'     => [
95 95
                 Lexer::MATCH => '</?[a-z_\-][a-z0-9_\-\.:]*.*?/?>',
96
-                Lexer::CALL  => function ($in, $out, $token) {
96
+                Lexer::CALL  => function($in, $out, $token) {
97 97
                     $out->startToken('type element');
98 98
 
99 99
                     $in = new Input();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                     "'.*?'",
126 126
                     '".*?"',
127 127
                 ],
128
-                Lexer::CALL  => function ($in, $out, $token) {
128
+                Lexer::CALL  => function($in, $out, $token) {
129 129
                     $out->startToken('value string');
130 130
 
131 131
                     $in = new Input();
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,15 +12,13 @@  discard block
 block discarded – undo
12 12
 use nbsp\bitter\Input;
13 13
 use nbsp\bitter\Lexer;
14 14
 
15
-trait HTML
16
-{
15
+trait HTML {
17 16
     /**
18 17
      * HTML tokens.
19 18
      *
20 19
      * @return array
21 20
      */
22
-    public function tokens()
23
-    {
21
+    public function tokens() {
24 22
         return [
25 23
             'entity'      => [
26 24
                 Lexer::MATCH => '&([#][0-9]{1,4}|[#]x[a-f0-9]{1,4}|[a-z\-]+);',
@@ -112,8 +110,7 @@  discard block
 block discarded – undo
112 110
      *
113 111
      * @return array
114 112
      */
115
-    public function attribute()
116
-    {
113
+    public function attribute() {
117 114
         return [
118 115
             'attribute' => [
119 116
                 Lexer::MATCH => '[a-z_\-][a-z0-9_\-\.:]*\s*=?\s*',
@@ -144,8 +141,7 @@  discard block
 block discarded – undo
144 141
      *
145 142
      * @return array
146 143
      */
147
-    public function element()
148
-    {
144
+    public function element() {
149 145
         return Lexer::extend($this->attribute(), [
150 146
             'begin' => [
151 147
                 Lexer::MATCH => '^</?',
@@ -164,8 +160,7 @@  discard block
 block discarded – undo
164 160
         ]);
165 161
     }
166 162
 
167
-    public function entity()
168
-    {
163
+    public function entity() {
169 164
         return [
170 165
             'entity' => [
171 166
                 Lexer::MATCH => '&([#][0-9]{1,4}|[#]x[a-f0-9]{1,4}|[a-z\-]+);',
@@ -179,8 +174,7 @@  discard block
 block discarded – undo
179 174
      *
180 175
      * @return array
181 176
      */
182
-    public function instruction()
183
-    {
177
+    public function instruction() {
184 178
         return Lexer::extend($this->attribute(), [
185 179
             'begin' => [
186 180
                 Lexer::MATCH => '^<[?]xml',
@@ -194,8 +188,7 @@  discard block
 block discarded – undo
194 188
         ]);
195 189
     }
196 190
 
197
-    public function string()
198
-    {
191
+    public function string() {
199 192
         return Lexer::extend($this->entity(), [
200 193
             // Empty:
201 194
             'empty' => [
Please login to merge, or discard this patch.
Classes/Services/parser/src/nbsp/bitter/Tokens/XSLT.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         return Lexer::extend($this->htmlTokens(), [
32 32
             'element' => [
33
-                Lexer::CALL => function ($in, $out, $token) {
33
+                Lexer::CALL => function($in, $out, $token) {
34 34
                     $out->startToken('type element');
35 35
 
36 36
                     $in = new Input();
@@ -48,16 +48,16 @@  discard block
 block discarded – undo
48 48
     {
49 49
         return Lexer::extend($this->htmlAttribute(), [
50 50
             'string' => [
51
-                Lexer::CALL => function ($in, $out, $token) {
51
+                Lexer::CALL => function($in, $out, $token) {
52 52
                     Lexer::choose($in, $out, $token, [
53 53
                         [
54 54
                             Lexer::BEFORE => '%\b(match|select|test)=$%i',
55
-                            Lexer::CALL   => function ($in, $out) {
55
+                            Lexer::CALL   => function($in, $out) {
56 56
                                 $out->startToken('value string xpath');
57 57
                             },
58 58
                         ],
59 59
                         [
60
-                            Lexer::CALL => function ($in, $out) {
60
+                            Lexer::CALL => function($in, $out) {
61 61
                                 $out->startToken('value string');
62 62
                             },
63 63
                         ],
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 use nbsp\bitter\Input;
13 13
 use nbsp\bitter\Lexer;
14 14
 
15
-trait XSLT
16
-{
15
+trait XSLT {
17 16
     use HTML {
18 17
         HTML::attribute as htmlAttribute;
19 18
         HTML::element as htmlElement;
@@ -26,8 +25,7 @@  discard block
 block discarded – undo
26 25
      *
27 26
      * @return array
28 27
      */
29
-    function tokens()
30
-    {
28
+    function tokens() {
31 29
         return Lexer::extend($this->htmlTokens(), [
32 30
             'element' => [
33 31
                 Lexer::CALL => function ($in, $out, $token) {
@@ -44,8 +42,7 @@  discard block
 block discarded – undo
44 42
         ]);
45 43
     }
46 44
 
47
-    function attribute()
48
-    {
45
+    function attribute() {
49 46
         return Lexer::extend($this->htmlAttribute(), [
50 47
             'string' => [
51 48
                 Lexer::CALL => function ($in, $out, $token) {
@@ -74,13 +71,11 @@  discard block
 block discarded – undo
74 71
         ]);
75 72
     }
76 73
 
77
-    function element()
78
-    {
74
+    function element() {
79 75
         return Lexer::extend($this->attribute(), $this->htmlElement());
80 76
     }
81 77
 
82
-    function string()
83
-    {
78
+    function string() {
84 79
         return Lexer::extend($this->htmlString(), [
85 80
             'xpath' => [
86 81
                 Lexer::MATCH => '[{].*?[}]',
Please login to merge, or discard this patch.
Classes/Services/parser/src/nbsp/bitter/Tokens/PHP.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         return [
25 25
             'commentLine'  => [
26 26
                 Lexer::MATCH => '(//|[#]).*?$',
27
-                Lexer::CALL  => function ($in, $out, $token) {
27
+                Lexer::CALL  => function($in, $out, $token) {
28 28
                     $out->startToken('comment line');
29 29
 
30 30
                     $in = new Input();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
             'commentBlock' => [
40 40
                 Lexer::MATCH => '/[*].*?[*]/',
41
-                Lexer::CALL  => function ($in, $out, $token) {
41
+                Lexer::CALL  => function($in, $out, $token) {
42 42
                     $out->startToken('comment block');
43 43
 
44 44
                     $in = new Input();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                     '(\\\|::)?[a-z_][a-z0-9_]*',
56 56
                     '<\?php|\?>',
57 57
                 ],
58
-                Lexer::CALL  => function ($in, $out, $token) {
58
+                Lexer::CALL  => function($in, $out, $token) {
59 59
                     $data = token_get_all('<?php ' . $token);
60 60
 
61 61
                     // Detect PHP keywords:
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
             'variable'     => [
139 139
                 Lexer::MATCH => '(\$|->|::[$])[a-z_][a-z0-9_]*',
140
-                Lexer::CALL  => function ($in, $out, $token) {
140
+                Lexer::CALL  => function($in, $out, $token) {
141 141
                     Lexer::choose($in, $out, $token, [
142 142
                         [
143 143
                             Lexer::AFTER => '%^\s*[(]%',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
             'stringDouble' => [
158 158
                 Lexer::MATCH => '"[^"\\\]*(?:\\\.[^"\\\]*)*"',
159
-                Lexer::CALL  => function ($in, $out, $token) {
159
+                Lexer::CALL  => function($in, $out, $token) {
160 160
                     $out->startToken('value string double');
161 161
 
162 162
                     $in = new Input();
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
             'stringSingle' => [
172 172
                 Lexer::MATCH => '\'[^\'\\\]*(?:\\\.[^\'\\\]*)*\'',
173
-                Lexer::CALL  => function ($in, $out, $token) {
173
+                Lexer::CALL  => function($in, $out, $token) {
174 174
                     $out->startToken('value string single');
175 175
 
176 176
                     $in = new Input();
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             // Code:
234 234
             'code'    => [
235 235
                 Lexer::MATCH => '(<code>|`).*?(</code>|`)',
236
-                Lexer::CALL  => function ($in, $out, $token) {
236
+                Lexer::CALL  => function($in, $out, $token) {
237 237
                     $lines    = preg_split("/\r\n|\n|\r/", $token);
238 238
                     $prefixes = $codes = [];
239 239
 
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -13,14 +13,12 @@  discard block
 block discarded – undo
13 13
 use nbsp\bitter\Lexer;
14 14
 use nbsp\bitter\Output;
15 15
 
16
-trait PHP
17
-{
16
+trait PHP {
18 17
     use HTML {
19 18
         HTML::tokens as htmlTokens;
20 19
     }
21 20
 
22
-    function tokens()
23
-    {
21
+    function tokens() {
24 22
         return [
25 23
             'commentLine'  => [
26 24
                 Lexer::MATCH => '(//|[#]).*?$',
@@ -199,8 +197,7 @@  discard block
 block discarded – undo
199 197
      *
200 198
      * @return array
201 199
      */
202
-    function commentLine()
203
-    {
200
+    function commentLine() {
204 201
         return [
205 202
             // Begin:
206 203
             'begin' => [
@@ -215,8 +212,7 @@  discard block
 block discarded – undo
215 212
      *
216 213
      * @return array
217 214
      */
218
-    function commentBlock()
219
-    {
215
+    function commentBlock() {
220 216
         return [
221 217
             // Begin:
222 218
             'begin'   => [
@@ -360,8 +356,7 @@  discard block
 block discarded – undo
360 356
      *
361 357
      * @return array
362 358
      */
363
-    function stringDouble()
364
-    {
359
+    function stringDouble() {
365 360
         return Lexer::extend($this->variable(), [
366 361
             // Empty:
367 362
             'empty'  => [
@@ -394,8 +389,7 @@  discard block
 block discarded – undo
394 389
      *
395 390
      * @return array
396 391
      */
397
-    function stringSingle()
398
-    {
392
+    function stringSingle() {
399 393
         return [
400 394
             // Empty:
401 395
             'empty'  => [
@@ -428,8 +422,7 @@  discard block
 block discarded – undo
428 422
      *
429 423
      * @return array
430 424
      */
431
-    function variable()
432
-    {
425
+    function variable() {
433 426
         return [
434 427
             // Variables:
435 428
             'variable' => [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@
 block discarded – undo
283 283
                     while ($parse->valid()) {
284 284
                         $token = $parse->after('%[\n]|<.*?>|[^<\n]+%');
285 285
 
286
-                        if ($token == null) {
286
+                        if ($token == NULL) {
287 287
                             break;
288 288
                         }
289 289
 
Please login to merge, or discard this patch.
Classes/Services/parser/src/nbsp/bitter/Lexers/PHP.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         Lexer::loop($in, $out, Lexer::extend($this->htmlTokens(), [
52 52
             'beginPHP' => [
53 53
                 Lexer::MATCH => '<\?php',
54
-                Lexer::CALL  => function ($in, $out, $token) {
54
+                Lexer::CALL  => function($in, $out, $token) {
55 55
                     $out->startToken('script php');
56 56
 
57 57
                     $begin = $token;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
 use nbsp\bitter\Output;
15 15
 use nbsp\bitter\Tokens;
16 16
 
17
-class PHP extends Lexer
18
-{
17
+class PHP extends Lexer {
19 18
     use Tokens\PHP;
20 19
 
21 20
     /**
@@ -24,8 +23,7 @@  discard block
 block discarded – undo
24 23
      * @param Output $out
25 24
      * @param string $in
26 25
      */
27
-    public function parse(Input $in, Output $out)
28
-    {
26
+    public function parse(Input $in, Output $out) {
29 27
         $out->startLine();
30 28
         $out->startToken('source php');
31 29
 
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
      * @param Output $out
43 41
      * @param string $in
44 42
      */
45
-    public function parseWithHTML(Input $in, Output $out)
46
-    {
43
+    public function parseWithHTML(Input $in, Output $out) {
47 44
         $out->startLine();
48 45
         $out->startToken('markup html');
49 46
 
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
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class ProcessNumberGenerator
18
-{
17
+class ProcessNumberGenerator {
19 18
     public function getProcessNumber($ownerId = NULL) {
20 19
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\Object\\ObjectManager');
21 20
         $processNumberRepository = $objectManager->get("EWW\\Dpf\\Domain\\Repository\\ProcessNumberRepository");
Please login to merge, or discard this patch.
Classes/Services/Transfer/FedoraRepository.php 3 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   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
 use \EWW\Dpf\Services\Logger\TransferLogger;
24 24
 use \Httpful\Request;
25 25
 
26
-class FedoraRepository implements Repository
27
-{
26
+class FedoraRepository implements Repository {
28 27
 
29 28
     /**
30 29
      * documentTransferLogRepository
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * @param \EWW\Dpf\Domain\Model\Document $document
62 61
      * @return string
63 62
      */
64
-    public function ingest($document, $metsXml)
65
-    {
63
+    public function ingest($document, $metsXml) {
66 64
 
67 65
         try {
68 66
             $response = Request::post($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection())
@@ -96,8 +94,7 @@  discard block
 block discarded – undo
96 94
      * @param string $metsXml
97 95
      * @return string
98 96
      */
99
-    public function update($document, $metsXml)
100
-    {
97
+    public function update($document, $metsXml) {
101 98
 
102 99
         $remoteId = $document->getObjectIdentifier();
103 100
 
@@ -129,8 +126,7 @@  discard block
 block discarded – undo
129 126
      * @param string $remoteId
130 127
      * @return string
131 128
      */
132
-    public function retrieve($remoteId)
133
-    {
129
+    public function retrieve($remoteId) {
134 130
 
135 131
         try {
136 132
             $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/objects/" . $remoteId . "/methods/qucosa:SDef/getMETSDissemination")
@@ -159,8 +155,7 @@  discard block
 block discarded – undo
159 155
      * @param string $remoteId
160 156
      * @return string
161 157
      */
162
-    public function getNextDocumentId()
163
-    {
158
+    public function getNextDocumentId() {
164 159
 
165 160
         try {
166 161
             $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/management/getNextPID?numPIDs=1&namespace=qucosa&xml=true")
@@ -191,8 +186,7 @@  discard block
 block discarded – undo
191 186
      * @param $state
192 187
      * @return boolean
193 188
      */
194
-    public function delete($document, $state)
195
-    {
189
+    public function delete($document, $state) {
196 190
 
197 191
         $remoteId = $document->getObjectIdentifier();
198 192
 
@@ -225,8 +219,7 @@  discard block
 block discarded – undo
225 219
      * @param  \Httpful\Response $response
226 220
      * @return string
227 221
      */
228
-    protected function getRemoteDocumentId($response)
229
-    {
222
+    protected function getRemoteDocumentId($response) {
230 223
 
231 224
         // Get repository ID and write into document
232 225
         $responseDom = new \DOMDocument();
@@ -243,8 +236,7 @@  discard block
 block discarded – undo
243 236
         return null;
244 237
     }
245 238
 
246
-    protected function getOwnerId()
247
-    {
239
+    protected function getOwnerId() {
248 240
         $ownerId = $this->clientConfigurationManager->getOwnerId();
249 241
         if (empty($ownerId)) {
250 242
             throw new \Exception('Owner id can not be empty or null!');
@@ -253,8 +245,7 @@  discard block
 block discarded – undo
253 245
         return $ownerId;
254 246
     }
255 247
 
256
-    protected function getSWORDCollection()
257
-    {
248
+    protected function getSWORDCollection() {
258 249
         return $this->clientConfigurationManager->getSwordCollectionNamespace();
259 250
     }
260 251
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
             if (!$response->hasErrors() && $response->code == 201) {
79 79
                 return $this->getRemoteDocumentId($response);
80 80
             } else {
81
-                TransferLogger::Log('INGEST', $document->getUid(), null, $response);
81
+                TransferLogger::Log('INGEST', $document->getUid(), NULL, $response);
82 82
             }
83 83
         } catch (Exception $exception) {
84 84
             // curl error handling,
85 85
             // but extbase already catches all exceptions
86
-            return null;
86
+            return NULL;
87 87
         }
88 88
 
89
-        return null;
89
+        return NULL;
90 90
     }
91 91
 
92 92
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         } catch (Exception $exception) {
120 120
             // curl error handling,
121 121
             // but extbase already catches all exceptions
122
-            return null;
122
+            return NULL;
123 123
         }
124 124
     }
125 125
 
@@ -142,15 +142,15 @@  discard block
 block discarded – undo
142 142
             if (!$response->hasErrors() && $response->code == 200) {
143 143
                 return $response->__toString();
144 144
             } else {
145
-                TransferLogger::Log('RETRIEVE', null, $remoteId, $response);
145
+                TransferLogger::Log('RETRIEVE', NULL, $remoteId, $response);
146 146
             }
147 147
         } catch (Exception $exception) {
148 148
             // curl error handling,
149 149
             // but extbase already catches all exceptions
150
-            return null;
150
+            return NULL;
151 151
         }
152 152
 
153
-        return null;
153
+        return NULL;
154 154
     }
155 155
 
156 156
     /**
@@ -173,15 +173,15 @@  discard block
 block discarded – undo
173 173
             if (!$response->hasErrors() && $response->code == 200) {
174 174
                 return $response->__toString();
175 175
             } else {
176
-                TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, $remoteId, $response);
176
+                TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, $remoteId, $response);
177 177
             }
178 178
         } catch (\Exception $exception) {
179 179
             // curl error handling,
180 180
             // but extbase already catches all exceptions
181
-            return null;
181
+            return NULL;
182 182
         }
183 183
 
184
-        return null;
184
+        return NULL;
185 185
     }
186 186
 
187 187
     /**
@@ -206,17 +206,17 @@  discard block
 block discarded – undo
206 206
 
207 207
             // if transfer successful
208 208
             if (!$response->hasErrors() && $response->code == 204) {
209
-                return true;
209
+                return TRUE;
210 210
             } else {
211 211
                 TransferLogger::Log('DELETE', $document->getUid(), $remoteId, $response);
212 212
             }
213 213
         } catch (Exception $exception) {
214 214
             // curl error handling,
215 215
             // but extbase already catches all exceptions
216
-            return false;
216
+            return FALSE;
217 217
         }
218 218
 
219
-        return false;
219
+        return FALSE;
220 220
     }
221 221
 
222 222
     /**
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             return $objectIdentifier;
241 241
         }
242 242
 
243
-        return null;
243
+        return NULL;
244 244
     }
245 245
 
246 246
     protected function getOwnerId()
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.
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
         $xml = $this->parser->parse($xPath);
315 306
 
@@ -322,8 +313,7 @@  discard block
 block discarded – undo
322 313
      * @param  string $value form value
323 314
      * @return xml    created xml
324 315
      */
325
-    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
326
-    {
316
+    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) {
327 317
         if (!$attributeOnly) {
328 318
             // Explode xPath
329 319
             $newPath = explode('%', $xPath);
@@ -494,8 +484,7 @@  discard block
 block discarded – undo
494 484
         return $this->xmlData->saveXML();
495 485
     }
496 486
 
497
-    public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
498
-    {
487
+    public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) {
499 488
         if (!$attributeOnly) {
500 489
             // Explode xPath
501 490
             $newPath = explode('%', $xPath);
@@ -609,8 +598,7 @@  discard block
 block discarded – undo
609 598
      * Builds the xml wrapping part for mods
610 599
      * @return xml
611 600
      */
612
-    public function buildModsWrap()
613
-    {
601
+    public function buildModsWrap() {
614 602
         // Build wrap for mod
615 603
 
616 604
         $domDocument = new \DOMDocument();
@@ -648,8 +636,7 @@  discard block
 block discarded – undo
648 636
      * Builds xml amdSection
649 637
      * @return xml
650 638
      */
651
-    public function buildAmdSection()
652
-    {
639
+    public function buildAmdSection() {
653 640
         // Build xml amd:sec
654 641
 
655 642
         $domDocument = new \DOMDocument();
@@ -660,8 +647,7 @@  discard block
 block discarded – undo
660 647
         $amdSec = $domDocument->createElement('mets:amdSec');
661 648
     }
662 649
 
663
-    public function setMods($value = '')
664
-    {
650
+    public function setMods($value = '') {
665 651
         $domDocument = new \DOMDocument();
666 652
         if (is_null(@$domDocument->loadXML($value))) {
667 653
             throw new \Exception("Couldn't load MODS data");
@@ -669,13 +655,11 @@  discard block
 block discarded – undo
669 655
         $this->modsData = $domDocument;
670 656
     }
671 657
 
672
-    public function setFileData($value = '')
673
-    {
658
+    public function setFileData($value = '') {
674 659
         $this->files = $value;
675 660
     }
676 661
 
677
-    public function loopFiles($array, $domElement, $domDocument)
678
-    {
662
+    public function loopFiles($array, $domElement, $domDocument) {
679 663
         $i = 0;
680 664
         // set xml for uploded files
681 665
         foreach ($array as $key => $value) {
@@ -720,8 +704,7 @@  discard block
 block discarded – undo
720 704
      * Builds the xml fileSection part if files are uploaded
721 705
      * @return xml
722 706
      */
723
-    public function buildFileSection()
724
-    {
707
+    public function buildFileSection() {
725 708
 
726 709
         // Build xml Mets:fileSec
727 710
 
@@ -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.
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
@@ -173,26 +173,26 @@  discard block
 block discarded – undo
173 173
         $xmlData = $modsWrap->firstChild->firstChild->firstChild->firstChild;
174 174
 
175 175
         // import mods into mets
176
-        $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, true);
176
+        $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, TRUE);
177 177
         $xmlData->appendChild($nodeAppendModsData);
178 178
 
179 179
         // add SLUB data
180
-        $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, true);
180
+        $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, TRUE);
181 181
         $modsWrap->firstChild->appendChild($nodeAppendModsData);
182 182
 
183 183
         if ($fileSection) {
184 184
             // add filesection
185
-            $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, true);
185
+            $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, TRUE);
186 186
             $modsWrap->firstChild->appendChild($nodeAppendModsData);
187 187
         }
188 188
 
189 189
         if ($structureMap) {
190 190
             // add structure map
191
-            $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, true);
191
+            $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, TRUE);
192 192
             $modsWrap->firstChild->appendChild($nodeAppendModsData);
193 193
         }
194 194
 
195
-        $modsWrap->formatOutput = true;
195
+        $modsWrap->formatOutput = TRUE;
196 196
         $modsWrap->encoding     = 'UTF-8';
197 197
 
198 198
         $this->metsData = $modsWrap;
@@ -254,28 +254,28 @@  discard block
 block discarded – undo
254 254
                 $attributeXPath .= '[@ID="QUCOSA_' . $counter . '"]';
255 255
             }
256 256
 
257
-            $existsExtensionFlag = false;
257
+            $existsExtensionFlag = FALSE;
258 258
             $i                   = 0;
259 259
             // loop each object
260 260
             if (!empty($values)) {
261 261
                 foreach ($values as $value) {
262 262
 
263 263
                     if ($value['modsExtension']) {
264
-                        $existsExtensionFlag = true;
264
+                        $existsExtensionFlag = TRUE;
265 265
                         // mods extension
266 266
                         $counter            = sprintf("%'03d", $this->counter);
267 267
                         $referenceAttribute = $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]';
268 268
 
269 269
                         $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping'];
270 270
 
271
-                        $xml = $this->customXPath($path, false, $value['value']);
271
+                        $xml = $this->customXPath($path, FALSE, $value['value']);
272 272
                     } else {
273 273
                         $path = $mapping . $attributeXPath . '%/' . $value['mapping'];
274 274
 
275 275
                         if ($i == 0) {
276
-                            $newGroupFlag = true;
276
+                            $newGroupFlag = TRUE;
277 277
                         } else {
278
-                            $newGroupFlag = false;
278
+                            $newGroupFlag = FALSE;
279 279
                         }
280 280
 
281 281
                         $xml = $this->customXPath($path, $newGroupFlag, $value['value']);
@@ -287,12 +287,12 @@  discard block
 block discarded – undo
287 287
             } else {
288 288
                 if (!empty($attributeXPath)) {
289 289
                     $path = $mapping . $attributeXPath;
290
-                    $xml  = $this->customXPath($path, true, '', true);
290
+                    $xml  = $this->customXPath($path, TRUE, '', TRUE);
291 291
                 }
292 292
             }
293 293
             if (!$existsExtensionFlag && $group['modsExtensionMapping']) {
294 294
                 $xPath = $group['modsExtensionMapping'] . $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]';
295
-                $xml   = $this->customXPath($xPath, true, '', true);
295
+                $xml   = $this->customXPath($xPath, TRUE, '', TRUE);
296 296
             }
297 297
             if ($group['modsExtensionMapping']) {
298 298
                 $this->counter++;
@@ -322,13 +322,13 @@  discard block
 block discarded – undo
322 322
      * @param  string $value form value
323 323
      * @return xml    created xml
324 324
      */
325
-    public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
325
+    public function customXPath($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE)
326 326
     {
327 327
         if (!$attributeOnly) {
328 328
             // Explode xPath
329 329
             $newPath = explode('%', $xPath);
330 330
 
331
-            $praedicateFlag = false;
331
+            $praedicateFlag = FALSE;
332 332
             $explodedXPath  = explode('[', $newPath[0]);
333 333
             if (count($explodedXPath) > 1) {
334 334
                 // praedicate is given
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
                     $path = $explodedXPath[0];
341 341
                 }
342 342
 
343
-                $praedicateFlag = true;
343
+                $praedicateFlag = TRUE;
344 344
             } else {
345 345
                 $path = $newPath[0];
346 346
             }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                     $nodeList = $xPath->query('/mods:mods' . $match[1]);
391 391
                     $node = $nodeList->item(0);
392 392
 
393
-                    $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true);
393
+                    $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE);
394 394
 
395 395
                     $node->appendChild($importNode);
396 396
                 }
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
                 $node = $domNodeList->item(0)->firstChild;
403 403
 
404
-                $nodeAppendModsData = $this->xmlData->importNode($node, true);
404
+                $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
405 405
                 $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
406 406
             } else {
407 407
                 // first xpath doesn't exist
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
                     $nodeList = $xPath->query('/mods:mods/' . $path . $match[1]);
450 450
                     $node = $nodeList->item(0);
451 451
 
452
-                    $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true);
452
+                    $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE);
453 453
 
454 454
                     $node->appendChild($importNode);
455 455
                 }
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
                 $domNode2 = $domXPath2->query('/mods:mods/' . $path)->item(0)->childNodes->item(0);
458 458
 
459 459
                 // merge xml nodes
460
-                $nodeToBeAppended = $doc1->importNode($domNode2, true);
460
+                $nodeToBeAppended = $doc1->importNode($domNode2, TRUE);
461 461
 
462 462
                 $domNode->item(0)->appendChild($nodeToBeAppended);
463 463
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                 $firstChild = $this->xmlData->firstChild;
467 467
                 $firstItem  = $doc1->getElementsByTagName('mods')->item(0)->firstChild;
468 468
 
469
-                $nodeAppendModsData = $this->xmlData->importNode($firstItem, true);
469
+                $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE);
470 470
                 $firstChild->appendChild($nodeAppendModsData);
471 471
 
472 472
                 return $doc1->saveXML();
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 
486 486
             $node = $domNodeList->item(0)->firstChild;
487 487
 
488
-            $nodeAppendModsData = $this->xmlData->importNode($node, true);
488
+            $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
489 489
             $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
490 490
 
491 491
             return $docXML->saveXML();
@@ -494,13 +494,13 @@  discard block
 block discarded – undo
494 494
         return $this->xmlData->saveXML();
495 495
     }
496 496
 
497
-    public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false)
497
+    public function customXPathSlub($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE)
498 498
     {
499 499
         if (!$attributeOnly) {
500 500
             // Explode xPath
501 501
             $newPath = explode('%', $xPath);
502 502
 
503
-            $praedicateFlag = false;
503
+            $praedicateFlag = FALSE;
504 504
             $explodedXPath  = explode('[', $newPath[0]);
505 505
             if (count($explodedXPath) > 1) {
506 506
                 // praedicate is given
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
                     $path = $explodedXPath[0];
513 513
                 }
514 514
 
515
-                $praedicateFlag = true;
515
+                $praedicateFlag = TRUE;
516 516
             } else {
517 517
                 $path = $newPath[0];
518 518
             }
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 
540 540
                 $node = $domNodeList->item(0)->firstChild;
541 541
 
542
-                $nodeAppendModsData = $this->xmlData->importNode($node, true);
542
+                $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
543 543
                 $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
544 544
             } else {
545 545
                 // first xpath doesn't exist
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
                 $domNode2 = $domXPath2->query('/slub:info/' . $path)->item(0)->childNodes->item(0);
569 569
 
570 570
                 // merge xml nodes
571
-                $nodeToBeAppended = $doc1->importNode($domNode2, true);
571
+                $nodeToBeAppended = $doc1->importNode($domNode2, TRUE);
572 572
 
573 573
                 $domNode->item(0)->appendChild($nodeToBeAppended);
574 574
 
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                 $firstChild = $this->xmlData->firstChild;
579 579
                 $firstItem  = $doc1->getElementsByTagName('info')->item(0)->firstChild;
580 580
 
581
-                $nodeAppendModsData = $this->xmlData->importNode($firstItem, true);
581
+                $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE);
582 582
                 $firstChild->appendChild($nodeAppendModsData);
583 583
 
584 584
                 return $doc1->saveXML();
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 
598 598
             $node = $domNodeList->item(0)->firstChild;
599 599
 
600
-            $nodeAppendModsData = $this->xmlData->importNode($node, true);
600
+            $nodeAppendModsData = $this->xmlData->importNode($node, TRUE);
601 601
             $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData);
602 602
 
603 603
             return $docXML->saveXML();
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
         $second = $this->slubData;
853 853
 
854 854
         foreach ($second->childNodes as $node) {
855
-            $importNode = $domDocument->importNode($node, true);
855
+            $importNode = $domDocument->importNode($node, TRUE);
856 856
             $domWrapElement->appendChild($importNode);
857 857
         }
858 858
 
@@ -909,15 +909,15 @@  discard block
 block discarded – undo
909 909
 
910 910
                             $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping'];
911 911
 
912
-                            $xml = $this->customXPathSlub($path, false, $value['value']);
912
+                            $xml = $this->customXPathSlub($path, FALSE, $value['value']);
913 913
                         } else {
914 914
                             $path = $mapping . $attributeXPath . '%/' . $value['mapping'];
915 915
                             // print_r($path);print_r("\n");
916 916
 
917 917
                             if ($i == 0) {
918
-                                $newGroupFlag = true;
918
+                                $newGroupFlag = TRUE;
919 919
                             } else {
920
-                                $newGroupFlag = false;
920
+                                $newGroupFlag = FALSE;
921 921
                             }
922 922
 
923 923
                             $xml = $this->customXPathSlub($path, $newGroupFlag, $value['value']);
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
                 } else {
931 931
                     if (!empty($attributeXPath)) {
932 932
                         $path = $mapping . $attributeXPath;
933
-                        $xml  = $this->customXPathSlub($path, true, '', true);
933
+                        $xml  = $this->customXPathSlub($path, TRUE, '', TRUE);
934 934
                     }
935 935
                 }
936 936
 
Please login to merge, or discard this patch.
class.ext_update.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             $clients = $clientRepository->findAllByPid($pid);
40 40
             if ($clients) {
41 41
                 if (count($clients) != 1) {
42
-                    throw new \Exception('Invalid number of client records for pid: '.$pid);
42
+                    throw new \Exception('Invalid number of client records for pid: ' . $pid);
43 43
                 }
44 44
             }
45 45
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@
 block discarded – undo
32 32
 
33 33
         $documents = $documentRepository->findDocumentsWithoutProcessNumber();
34 34
 
35
-        if (count($documents) == 0) return;
35
+        if (count($documents) == 0) {
36
+            return;
37
+        }
36 38
 
37 39
         foreach ($documents as $document) {
38 40
             $pid = $document->getPid();
Please login to merge, or discard this patch.
ext_localconf.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,26 +20,26 @@  discard block
 block discarded – undo
20 20
     die('Access denied.');
21 21
 }
22 22
 
23
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array(
23
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array (
24 24
     'extension'   => $_EXTKEY,
25 25
     'title'       => 'Qucosa-Dokumente ans Repository übertragen.',
26 26
     'description' => '',
27 27
 );
28 28
 
29 29
 if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers']) == false) {
30
-    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array();
30
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array ();
31 31
 }
32 32
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'EWW\Dpf\Command\TransferCommandController';
33 33
 
34 34
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
35 35
     'EWW.' . $_EXTKEY,
36 36
     'Qucosaform',
37
-    array(
37
+    array (
38 38
         'DocumentForm'     => 'list,show,new,create,edit,update,delete,cancel',
39 39
         'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut',
40 40
     ),
41 41
     // non-cacheable actions
42
-    array(
42
+    array (
43 43
         'DocumentForm'     => 'list,show,new,create,edit,update,delete,cancel,ajaxGroup,ajaxFileGroup,ajaxField',
44 44
         'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut',
45 45
     )
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
49 49
     'EWW.' . $_EXTKEY,
50 50
     'Frontendsearch',
51
-    array(
51
+    array (
52 52
         'SearchFE' => 'search,extendedSearch,showSearchForm',
53 53
     ),
54 54
     // non-cacheable actions
55
-    array(
55
+    array (
56 56
         'SearchFE' => 'search,extendedSearch'
57 57
     )
58 58
 );
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
61 61
     'EWW.' . $_EXTKEY,
62 62
     'Getfile',
63
-    array(
63
+    array (
64 64
         'GetFile'     => 'attachment',
65 65
     ),
66 66
     // non-cacheable actions
67
-    array(
67
+    array (
68 68
         'GetFile'     => 'attachment',
69 69
     )
70 70
 );
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     'description' => '',
27 27
 );
28 28
 
29
-if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers']) == false) {
29
+if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers']) == FALSE) {
30 30
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array();
31 31
 }
32 32
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'EWW\Dpf\Command\TransferCommandController';
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
     )
70 70
 );
71 71
 
72
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/MetaTags/MetaTags.php', '_metatags', 'list_type', true);
72
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/MetaTags/MetaTags.php', '_metatags', 'list_type', TRUE);
73 73
 $overrideSetup = 'plugin.tx_dpf_metatags.userFunc = EWW\Dpf\Plugins\MetaTags\MetaTags->main';
74 74
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup);
75 75
 
76
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/DownloadTool/DownloadTool.php', '_downloadtool', 'list_type', true);
76
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/DownloadTool/DownloadTool.php', '_downloadtool', 'list_type', TRUE);
77 77
 $overrideSetup = 'plugin.tx_dpf_downloadtool.userFunc = EWW\Dpf\Plugins\DownloadTool\DownloadTool->main';
78 78
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup);
79 79
 
80
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/RelatedListTool/RelatedListTool.php', '_relatedlisttool', 'list_type', true);
80
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/RelatedListTool/RelatedListTool.php', '_relatedlisttool', 'list_type', TRUE);
81 81
 $overrideSetup = 'plugin.tx_dpf_relatedlisttool.userFunc = EWW\Dpf\Plugins\RelatedListTool\RelatedListTool->main';
82 82
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup);
83 83
 
Please login to merge, or discard this patch.