Passed
Pull Request — master (#14)
by
unknown
02:57
created
ext_emconf.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
         'suggests' => []
25 25
     ],
26 26
     'state' => 'stable',
27
-    'uploadfolder' => false,
27
+    'uploadfolder' => FALSE,
28 28
     'createDirs' => '',
29
-    'clearCacheOnLoad' => false,
29
+    'clearCacheOnLoad' => FALSE,
30 30
     'author' => 'Sebastian Meyer (Maintainer)',
31 31
     'author_email' => '[email protected]',
32 32
     'author_company' => 'Kitodo. Key to digital objects e. V.',
Please login to merge, or discard this patch.
class.ext_update.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
         foreach ($rows as $row) {
118 118
             if ($row['format'] === 0 && $row['xpath']) {
119
-                $uids[] = (int)$row['uid'];
119
+                $uids[] = (int) $row['uid'];
120 120
             }
121 121
         }
122 122
         return $uids;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $result = $queryBuilder
225 225
             ->select('COLUMN_NAME')
226 226
             ->from('INFORMATION_SCHEMA.COLUMNS')
227
-            ->where('TABLE_NAME="tx_dlf_documents" AND TABLE_SCHEMA="' . $database . '" AND COLUMN_NAME="document_format"')
227
+            ->where('TABLE_NAME="tx_dlf_documents" AND TABLE_SCHEMA="'.$database.'" AND COLUMN_NAME="document_format"')
228 228
             ->execute();
229 229
         while ($resArray = $result->fetch()) {
230 230
             if ($resArray['COLUMN_NAME'] === 'document_format') {
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
                     $solrInfo['username']
415 415
                     && $solrInfo['password']
416 416
                 ) {
417
-                    $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host'];
417
+                    $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host'];
418 418
                 } else {
419 419
                     $host = $solrInfo['host'];
420 420
                 }
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
                 ]);
427 427
                 // Build request for adding new Solr core.
428 428
                 // @see http://wiki.apache.org/solr/CoreAdmin
429
-                $url = $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/admin/cores?wt=xml&action=CREATE&name=' . $resArray['index_name'] . '&instanceDir=' . $resArray['index_name'] . '&dataDir=data&configSet=dlf';
429
+                $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml&action=CREATE&name='.$resArray['index_name'].'&instanceDir='.$resArray['index_name'].'&dataDir=data&configSet=dlf';
430 430
                 $response = @simplexml_load_string(file_get_contents($url, false, $context));
431 431
                 // Process response.
432 432
                 if ($response) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class ext_update
27
-{
26
+class ext_update {
28 27
     /**
29 28
      * This holds the output ready to return
30 29
      *
Please login to merge, or discard this patch.
Upper-Lower-Casing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
     public function access(): bool
44 44
     {
45 45
         if (count($this->getMetadataConfig())) {
46
-            return true;
46
+            return TRUE;
47 47
         }
48 48
         if ($this->oldIndexRelatedTableNames()) {
49
-            return true;
49
+            return TRUE;
50 50
         }
51 51
         if ($this->solariumSolrUpdateRequired()) {
52
-            return true;
52
+            return TRUE;
53 53
         }
54 54
         if (count($this->oldFormatClasses())) {
55
-            return true;
55
+            return TRUE;
56 56
         }
57 57
         if ($this->hasNoFormatForDocument()) {
58
-            return true;
58
+            return TRUE;
59 59
         }
60
-        return false;
60
+        return FALSE;
61 61
     }
62 62
 
63 63
     /**
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
             // Instantiate search object.
143 143
             $solr = Solr::getInstance($resArray['index_name']);
144 144
             if (!$solr->ready) {
145
-                return true;
145
+                return TRUE;
146 146
             }
147 147
         }
148
-        return false;
148
+        return FALSE;
149 149
     }
150 150
 
151 151
     /**
@@ -201,10 +201,10 @@  discard block
 block discarded – undo
201 201
                 || $resArray['column_name'] === 'boost'
202 202
                 || $resArray['column_name'] === 'autocomplete'
203 203
             ) {
204
-                return true;
204
+                return TRUE;
205 205
             }
206 206
         }
207
-        return false;
207
+        return FALSE;
208 208
     }
209 209
 
210 210
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      * @param bool $checkStructureOnly
215 215
      * @return bool
216 216
      */
217
-    protected function hasNoFormatForDocument($checkStructureOnly = false): bool
217
+    protected function hasNoFormatForDocument($checkStructureOnly = FALSE): bool
218 218
     {
219 219
         // Check if column "document_format" exists.
220 220
         $database = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'];
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         while ($resArray = $result->fetch()) {
230 230
             if ($resArray['COLUMN_NAME'] === 'document_format') {
231 231
                 if ($checkStructureOnly) {
232
-                    return false;
232
+                    return FALSE;
233 233
                 }
234 234
                 // Check if column has empty fields.
235 235
                 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('INFORMATION_SCHEMA.COLUMNS');
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
                     ->fetchColumn(0);
242 242
 
243 243
                 if ($count === 0) {
244
-                    return false;
244
+                    return FALSE;
245 245
                 }
246 246
             }
247 247
         }
248
-        return true;
248
+        return TRUE;
249 249
     }
250 250
 
251 251
     /**
@@ -271,14 +271,14 @@  discard block
 block discarded – undo
271 271
 
272 272
         if ($result) {
273 273
             Helper::addMessage(
274
-                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsOkay', true),
275
-                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', true),
274
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsOkay', TRUE),
275
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
276 276
                 \TYPO3\CMS\Core\Messaging\FlashMessage::OK
277 277
             );
278 278
         } else {
279 279
             Helper::addMessage(
280
-                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsNotOkay', true),
281
-                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', true),
280
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsNotOkay', TRUE),
281
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
282 282
                 \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
283 283
             );
284 284
         }
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
                 ->execute();
313 313
         }
314 314
         Helper::addMessage(
315
-            $GLOBALS['LANG']->getLL('update.FormatClassesOkay', true),
316
-            $GLOBALS['LANG']->getLL('update.FormatClasses', true),
315
+            $GLOBALS['LANG']->getLL('update.FormatClassesOkay', TRUE),
316
+            $GLOBALS['LANG']->getLL('update.FormatClasses', TRUE),
317 317
             \TYPO3\CMS\Core\Messaging\FlashMessage::OK
318 318
         );
319 319
         $this->content .= Helper::renderFlashMessages();
@@ -368,14 +368,14 @@  discard block
 block discarded – undo
368 368
                 unset($data);
369 369
                 if (!empty($substUids)) {
370 370
                     Helper::addMessage(
371
-                        $GLOBALS['LANG']->getLL('update.metadataConfigOkay', true),
372
-                        $GLOBALS['LANG']->getLL('update.metadataConfig', true),
371
+                        $GLOBALS['LANG']->getLL('update.metadataConfigOkay', TRUE),
372
+                        $GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
373 373
                         \TYPO3\CMS\Core\Messaging\FlashMessage::OK
374 374
                     );
375 375
                 } else {
376 376
                     Helper::addMessage(
377
-                        $GLOBALS['LANG']->getLL('update.metadataConfigNotOkay', true),
378
-                        $GLOBALS['LANG']->getLL('update.metadataConfig', true),
377
+                        $GLOBALS['LANG']->getLL('update.metadataConfigNotOkay', TRUE),
378
+                        $GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
379 379
                         \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
380 380
                     );
381 381
                 }
@@ -427,20 +427,20 @@  discard block
 block discarded – undo
427 427
                 // Build request for adding new Solr core.
428 428
                 // @see http://wiki.apache.org/solr/CoreAdmin
429 429
                 $url = $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/admin/cores?wt=xml&action=CREATE&name=' . $resArray['index_name'] . '&instanceDir=' . $resArray['index_name'] . '&dataDir=data&configSet=dlf';
430
-                $response = @simplexml_load_string(file_get_contents($url, false, $context));
430
+                $response = @simplexml_load_string(file_get_contents($url, FALSE, $context));
431 431
                 // Process response.
432 432
                 if ($response) {
433 433
                     $status = $response->xpath('//lst[@name="responseHeader"]/int[@name="status"]');
434 434
                     if (
435
-                        $status !== false
435
+                        $status !== FALSE
436 436
                         && $status[0] === 0
437 437
                     ) {
438 438
                         continue;
439 439
                     }
440 440
                 }
441 441
                 Helper::addMessage(
442
-                    $GLOBALS['LANG']->getLL('update.solariumSolrUpdateNotOkay', true),
443
-                    sprintf($GLOBALS['LANG']->getLL('update.solariumSolrUpdate', true), $resArray['index_name']),
442
+                    $GLOBALS['LANG']->getLL('update.solariumSolrUpdateNotOkay', TRUE),
443
+                    sprintf($GLOBALS['LANG']->getLL('update.solariumSolrUpdate', TRUE), $resArray['index_name']),
444 444
                     \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
445 445
                 );
446 446
                 $this->content .= Helper::renderFlashMessages();
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
             }
449 449
         }
450 450
         Helper::addMessage(
451
-            $GLOBALS['LANG']->getLL('update.solariumSolrUpdateOkay', true),
452
-            $GLOBALS['LANG']->getLL('update.solariumSolrUpdate', true),
451
+            $GLOBALS['LANG']->getLL('update.solariumSolrUpdateOkay', TRUE),
452
+            $GLOBALS['LANG']->getLL('update.solariumSolrUpdate', TRUE),
453 453
             \TYPO3\CMS\Core\Messaging\FlashMessage::OK
454 454
         );
455 455
         $this->content .= Helper::renderFlashMessages();
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
             ->update('tx_dlf_documents')
470 470
             ->where(
471 471
                 $queryBuilder->expr()->orX(
472
-                    $queryBuilder->expr()->eq('document_format', $queryBuilder->createNamedParameter(null)),
472
+                    $queryBuilder->expr()->eq('document_format', $queryBuilder->createNamedParameter(NULL)),
473 473
                     $queryBuilder->expr()->eq('document_format', $queryBuilder->createNamedParameter(''))
474 474
                 )
475 475
             )
@@ -478,14 +478,14 @@  discard block
 block discarded – undo
478 478
 
479 479
         if ($result) {
480 480
             Helper::addMessage(
481
-                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntriesOkay', true),
482
-                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntries', true),
481
+                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntriesOkay', TRUE),
482
+                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntries', TRUE),
483 483
                 \TYPO3\CMS\Core\Messaging\FlashMessage::OK
484 484
             );
485 485
         } else {
486 486
             Helper::addMessage(
487
-                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntriesNotOkay', true),
488
-                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntries', true),
487
+                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntriesNotOkay', TRUE),
488
+                $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntries', TRUE),
489 489
                 \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
490 490
             );
491 491
         }
Please login to merge, or discard this patch.