Passed
Pull Request — master (#103)
by Alexander
03:32
created
Classes/Common/Helper.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 if (!preg_match('/[0-9]{8}-[0-9]{1}/i', $id)) {
143 143
                     return false;
144 144
                 } elseif ($checksum == 10) {
145
-                    return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD');
145
+                    return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD');
146 146
                 } elseif (substr($id, -1, 1) != $checksum) {
147 147
                     return false;
148 148
                 }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv);
308 308
         // Merge initialisation vector and encrypted data.
309 309
         if ($encrypted !== false) {
310
-            $encrypted = base64_encode($iv . $encrypted);
310
+            $encrypted = base64_encode($iv.$encrypted);
311 311
         }
312 312
         return $encrypted;
313 313
     }
@@ -361,8 +361,8 @@  discard block
 block discarded – undo
361 361
     public static function getHookObjects($scriptRelPath)
362 362
     {
363 363
         $hookObjects = [];
364
-        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'])) {
365
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) {
364
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) {
365
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) {
366 366
                 $hookObjects[] = GeneralUtility::makeInstance($classRef);
367 367
             }
368 368
         }
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
             !$uid
389 389
             || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'])
390 390
         ) {
391
-            self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR);
391
+            self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR);
392 392
             return '';
393 393
         }
394 394
 
@@ -399,15 +399,15 @@  discard block
 block discarded – undo
399 399
         // Should we check for a specific PID, too?
400 400
         if ($pid !== -1) {
401 401
             $pid = max(intval($pid), 0);
402
-            $where = $queryBuilder->expr()->eq($table . '.pid', $pid);
402
+            $where = $queryBuilder->expr()->eq($table.'.pid', $pid);
403 403
         }
404 404
 
405 405
         // Get index_name from database.
406 406
         $result = $queryBuilder
407
-            ->select($table . '.index_name AS index_name')
407
+            ->select($table.'.index_name AS index_name')
408 408
             ->from($table)
409 409
             ->where(
410
-                $queryBuilder->expr()->eq($table . '.uid', $uid),
410
+                $queryBuilder->expr()->eq($table.'.uid', $uid),
411 411
                 $where,
412 412
                 self::whereExpression($table)
413 413
             )
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
         if ($resArray = $result->fetch()) {
418 418
             return $resArray['index_name'];
419 419
         } else {
420
-            self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING);
420
+            self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING);
421 421
             return '';
422 422
         }
423 423
     }
@@ -436,9 +436,9 @@  discard block
 block discarded – undo
436 436
         // Analyze code and set appropriate ISO table.
437 437
         $isoCode = strtolower(trim($code));
438 438
         if (preg_match('/^[a-z]{3}$/', $isoCode)) {
439
-            $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'Resources/Private/Data/iso-639-2b.xml';
439
+            $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'Resources/Private/Data/iso-639-2b.xml';
440 440
         } elseif (preg_match('/^[a-z]{2}$/', $isoCode)) {
441
-            $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'Resources/Private/Data/iso-639-1.xml';
441
+            $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'Resources/Private/Data/iso-639-1.xml';
442 442
         } else {
443 443
             // No ISO code, return unchanged.
444 444
             return $code;
@@ -456,13 +456,13 @@  discard block
 block discarded – undo
456 456
                 $lang = $languageService->getLLL($isoCode, $iso639);
457 457
             }
458 458
         } else {
459
-            self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR);
459
+            self::log('Unexpected TYPO3_MODE "'.\TYPO3_MODE.'"', LOG_SEVERITY_ERROR);
460 460
             return $code;
461 461
         }
462 462
         if (!empty($lang)) {
463 463
             return $lang;
464 464
         } else {
465
-            self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE);
465
+            self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE);
466 466
             return $code;
467 467
         }
468 468
     }
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
             '-' => 39,
558 558
             ':' => 17,
559 559
         ];
560
-        $urn = strtolower($base . $id);
560
+        $urn = strtolower($base.$id);
561 561
         if (preg_match('/[^a-z0-9:-]/', $urn)) {
562 562
             self::log('Invalid chars in given parameters', LOG_SEVERITY_WARNING);
563 563
             return '';
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
             $checksum += ($i + 1) * intval(substr($digits, $i, 1));
572 572
         }
573 573
         $checksum = substr(intval($checksum / intval(substr($digits, -1, 1))), -1, 1);
574
-        return $base . $id . $checksum;
574
+        return $base.$id.$checksum;
575 575
     }
576 576
 
577 577
     /**
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
         // Sanitize input.
666 666
         $pid = max(intval($pid), 0);
667 667
         if (!$pid) {
668
-            self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING);
668
+            self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING);
669 669
             return $index_name;
670 670
         }
671 671
         /** @var \TYPO3\CMS\Frontend\Page\PageRepository $pageRepository */
@@ -687,13 +687,13 @@  discard block
 block discarded – undo
687 687
         // First fetch the uid of the received index_name
688 688
         $result = $queryBuilder
689 689
             ->select(
690
-                $table . '.uid AS uid',
691
-                $table . '.l18n_parent AS l18n_parent'
690
+                $table.'.uid AS uid',
691
+                $table.'.l18n_parent AS l18n_parent'
692 692
             )
693 693
             ->from($table)
694 694
             ->where(
695
-                $queryBuilder->expr()->eq($table . '.pid', $pid),
696
-                $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($index_name)),
695
+                $queryBuilder->expr()->eq($table.'.pid', $pid),
696
+                $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($index_name)),
697 697
                 self::whereExpression($table, true)
698 698
             )
699 699
             ->setMaxResults(1)
@@ -706,12 +706,12 @@  discard block
 block discarded – undo
706 706
             $resArray = $allResults[0];
707 707
 
708 708
             $result = $queryBuilder
709
-                ->select($table . '.index_name AS index_name')
709
+                ->select($table.'.index_name AS index_name')
710 710
                 ->from($table)
711 711
                 ->where(
712
-                    $queryBuilder->expr()->eq($table . '.pid', $pid),
713
-                    $queryBuilder->expr()->eq($table . '.uid', $resArray['l18n_parent']),
714
-                    $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($languageAspect->getContentId())),
712
+                    $queryBuilder->expr()->eq($table.'.pid', $pid),
713
+                    $queryBuilder->expr()->eq($table.'.uid', $resArray['l18n_parent']),
714
+                    $queryBuilder->expr()->eq($table.'.sys_language_uid', intval($languageAspect->getContentId())),
715 715
                     self::whereExpression($table, true)
716 716
                 )
717 717
                 ->setMaxResults(1)
@@ -729,14 +729,14 @@  discard block
 block discarded – undo
729 729
         if (empty($labels[$table][$pid][$languageAspect->getContentId()][$index_name])) {
730 730
             // Check if this table is allowed for translation.
731 731
             if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'])) {
732
-                $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]);
732
+                $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]);
733 733
                 if ($languageAspect->getContentId() > 0) {
734 734
                     $additionalWhere = $queryBuilder->expr()->andX(
735 735
                         $queryBuilder->expr()->orX(
736
-                            $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]),
737
-                            $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($languageAspect->getContentId()))
736
+                            $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]),
737
+                            $queryBuilder->expr()->eq($table.'.sys_language_uid', intval($languageAspect->getContentId()))
738 738
                         ),
739
-                        $queryBuilder->expr()->eq($table . '.l18n_parent', 0)
739
+                        $queryBuilder->expr()->eq($table.'.l18n_parent', 0)
740 740
                     );
741 741
                 }
742 742
 
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
                     ->select('*')
746 746
                     ->from($table)
747 747
                     ->where(
748
-                        $queryBuilder->expr()->eq($table . '.pid', $pid),
748
+                        $queryBuilder->expr()->eq($table.'.pid', $pid),
749 749
                         $additionalWhere,
750 750
                         self::whereExpression($table, true)
751 751
                     )
@@ -763,10 +763,10 @@  discard block
 block discarded – undo
763 763
                         }
764 764
                     }
765 765
                 } else {
766
-                    self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE);
766
+                    self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE);
767 767
                 }
768 768
             } else {
769
-                self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING);
769
+                self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING);
770 770
             }
771 771
         }
772 772
 
@@ -808,9 +808,9 @@  discard block
 block discarded – undo
808 808
             return GeneralUtility::makeInstance(ConnectionPool::class)
809 809
                 ->getQueryBuilderForTable($table)
810 810
                 ->expr()
811
-                ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0);
811
+                ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0);
812 812
         } else {
813
-            self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR);
813
+            self::log('Unexpected TYPO3_MODE "'.\TYPO3_MODE.'"', LOG_SEVERITY_ERROR);
814 814
             return '1=-1';
815 815
         }
816 816
     }
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
      */
850 850
     public static function polyfillExtbaseClassesForTYPO3v9()
851 851
     {
852
-        $classes = require __DIR__ . '/../../Configuration/Extbase/Persistence/Classes.php';
852
+        $classes = require __DIR__.'/../../Configuration/Extbase/Persistence/Classes.php';
853 853
 
854 854
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
855 855
         $configurationManager = $objectManager->get(ConfigurationManager::class);
Please login to merge, or discard this patch.
Classes/Command/BaseCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
 
275 275
         if ($doc !== null) {
276 276
             // Get the closest ancestor of the current document which has a MPTR child.
277
-            $parentMptr = $doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $doc->toplevelId . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
277
+            $parentMptr = $doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$doc->toplevelId.'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
278 278
             if (!empty($parentMptr)) {
279 279
                 $parentLocation = (string) $parentMptr[0]->attributes('http://www.w3.org/1999/xlink')->href;
280 280
 
Please login to merge, or discard this patch.
Classes/Command/IndexCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->initializeRepositories($input->getOption('pid'));
97 97
 
98 98
         if ($this->storagePid == 0) {
99
-            $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.');
99
+            $io->error('ERROR: No valid PID ('.$this->storagePid.') given.');
100 100
             exit(1);
101 101
         }
102 102
 
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
112 112
                 $output_solrCores = [];
113 113
                 foreach ($allSolrCores as $index_name => $uid) {
114
-                    $output_solrCores[] = $uid . ' : ' . $index_name;
114
+                    $output_solrCores[] = $uid.' : '.$index_name;
115 115
                 }
116 116
                 if (empty($output_solrCores)) {
117
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
117
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n");
118 118
                     exit(1);
119 119
                 } else {
120
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
120
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n");
121 121
                     exit(1);
122 122
                 }
123 123
             }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             $document = $this->documentRepository->findByUid($input->getOption('doc'));
158 158
 
159 159
             if ($document === null) {
160
-                $io->error('ERROR: Document with UID "' . $input->getOption('doc') . '" could not be found on PID ' . $this->storagePid . ' .');
160
+                $io->error('ERROR: Document with UID "'.$input->getOption('doc').'" could not be found on PID '.$this->storagePid.' .');
161 161
                 exit(1);
162 162
             } else {
163 163
                 $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true);
@@ -182,17 +182,17 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         if ($doc === null) {
185
-            $io->error('ERROR: Document "' . $input->getOption('doc') . '" could not be loaded.');
185
+            $io->error('ERROR: Document "'.$input->getOption('doc').'" could not be loaded.');
186 186
             exit(1);
187 187
         }
188 188
 
189 189
         $document->setSolrcore($solrCoreUid);
190 190
 
191 191
         if ($dryRun) {
192
-            $io->section('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
192
+            $io->section('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
193 193
         } else {
194 194
             if ($io->isVerbose()) {
195
-                $io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
195
+                $io->section('Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
196 196
             }
197 197
             $document->setDoc($doc);
198 198
             // save to database
Please login to merge, or discard this patch.
Classes/Command/ReindexCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $this->initializeRepositories($input->getOption('pid'));
101 101
 
102 102
         if ($this->storagePid == 0) {
103
-            $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.');
103
+            $io->error('ERROR: No valid PID ('.$this->storagePid.') given.');
104 104
             exit(1);
105 105
         }
106 106
 
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
116 116
                 $output_solrCores = [];
117 117
                 foreach ($allSolrCores as $index_name => $uid) {
118
-                    $output_solrCores[] = $uid . ' : ' . $index_name;
118
+                    $output_solrCores[] = $uid.' : '.$index_name;
119 119
                 }
120 120
                 if (empty($output_solrCores)) {
121
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
121
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n");
122 122
                     exit(1);
123 123
                 } else {
124
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
124
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n");
125 125
                     exit(1);
126 126
                 }
127 127
             }
@@ -163,15 +163,15 @@  discard block
 block discarded – undo
163 163
             $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true);
164 164
 
165 165
             if ($doc === null) {
166
-                $io->warning('WARNING: Document "' . $document->getLocation() . '" could not be loaded. Skip to next document.');
166
+                $io->warning('WARNING: Document "'.$document->getLocation().'" could not be loaded. Skip to next document.');
167 167
                 continue;
168 168
             }
169 169
 
170 170
             if ($dryRun) {
171
-                $io->writeln('DRY RUN: Would index ' . ($id + 1) . '/' . count($documents) . '  with UID "' . $document->getUid() . '" ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
171
+                $io->writeln('DRY RUN: Would index '.($id + 1).'/'.count($documents).'  with UID "'.$document->getUid().'" ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
172 172
             } else {
173 173
                 if ($io->isVerbose()) {
174
-                    $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . ($id + 1) . '/' . count($documents) . ' with UID "' . $document->getUid() . '" ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
174
+                    $io->writeln(date('Y-m-d H:i:s').' Indexing '.($id + 1).'/'.count($documents).' with UID "'.$document->getUid().'" ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
175 175
                 }
176 176
                 $document->setDoc($doc);
177 177
                 // save to database
Please login to merge, or discard this patch.
Classes/Command/HarvestCommand.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $this->initializeRepositories($input->getOption('pid'));
111 111
 
112 112
         if ($this->storagePid == 0) {
113
-            $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.');
113
+            $io->error('ERROR: No valid PID ('.$this->storagePid.') given.');
114 114
             exit(1);
115 115
         }
116 116
 
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
129 129
                 $output_solrCores = [];
130 130
                 foreach ($allSolrCores as $index_name => $uid) {
131
-                    $output_solrCores[] = $uid . ' : ' . $index_name;
131
+                    $output_solrCores[] = $uid.' : '.$index_name;
132 132
                 }
133 133
                 if (empty($output_solrCores)) {
134
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
134
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n");
135 135
                     exit(1);
136 136
                 } else {
137
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
137
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n");
138 138
                     exit(1);
139 139
                 }
140 140
             }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             exit(1);
155 155
         }
156 156
         if (!GeneralUtility::isValidUrl($baseUrl)) {
157
-            $io->error('ERROR: No valid OAI Base URL set for library with given UID ("' . $input->getOption('lib') . '").');
157
+            $io->error('ERROR: No valid OAI Base URL set for library with given UID ("'.$input->getOption('lib').'").');
158 158
             exit(1);
159 159
         } else {
160 160
             try {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 }
196 196
             }
197 197
             if (empty($set)) {
198
-                $io->error('ERROR: OAI interface does not provide a set with given setSpec ("' . $input->getOption('set') . '").');
198
+                $io->error('ERROR: OAI interface does not provide a set with given setSpec ("'.$input->getOption('set').'").');
199 199
                 exit(1);
200 200
             }
201 201
         }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         }
209 209
 
210 210
         // Process all identifiers.
211
-        $baseLocation = $baseUrl . (parse_url($baseUrl, PHP_URL_QUERY) ? '&' : '?');
211
+        $baseLocation = $baseUrl.(parse_url($baseUrl, PHP_URL_QUERY) ? '&' : '?');
212 212
         foreach ($identifiers as $identifier) {
213 213
             // Build OAI GetRecord URL...
214 214
             $params = [
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
                 'metadataPrefix' => 'mets',
217 217
                 'identifier' => (string) $identifier->identifier
218 218
             ];
219
-            $docLocation = $baseLocation . http_build_query($params);
219
+            $docLocation = $baseLocation.http_build_query($params);
220 220
             // ...index the document...
221 221
             $document = null;
222 222
             $doc = Doc::getInstance($docLocation, ['storagePid' => $this->storagePid], true);
223 223
 
224 224
             if ($doc === null) {
225
-                $io->warning('WARNING: Document "' . $docLocation . '" could not be loaded. Skip to next document.');
225
+                $io->warning('WARNING: Document "'.$docLocation.'" could not be loaded. Skip to next document.');
226 226
                 continue;
227 227
             }
228 228
 
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
             $document->setSolrcore($solrCoreUid);
240 240
 
241 241
             if ($dryRun) {
242
-                $io->writeln('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
242
+                $io->writeln('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
243 243
             } else {
244 244
                 if ($io->isVerbose()) {
245
-                    $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.');
245
+                    $io->writeln(date('Y-m-d H:i:s').' Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.');
246 246
                 }
247 247
                 $document->setDoc($doc);
248 248
                 // save to database
@@ -267,6 +267,6 @@  discard block
 block discarded – undo
267 267
      */
268 268
     protected function handleOaiError(BaseoaipmhException $exception, SymfonyStyle $io)
269 269
     {
270
-        $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:' . "\n    " . $exception->getMessage());
270
+        $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:'."\n    ".$exception->getMessage());
271 271
     }
272 272
 }
Please login to merge, or discard this patch.
Classes/Updates/MigrateSettings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getDescription(): string
56 56
     {
57
-        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to' .
58
-            ' make use of the Extbase naming scheme. Therefore it updates the field values' .
57
+        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to'.
58
+            ' make use of the Extbase naming scheme. Therefore it updates the field values'.
59 59
             ' "pi_flexform" within the tt_content table';
60 60
     }
61 61
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         foreach ($fields as $field) {
171 171
             // change the index attribute if it doesn't start with 'settings.' yet
172 172
             if (strpos($field['index'], 'settings.') === false) {
173
-                $field['index'] = 'settings.' . $field['index'];
173
+                $field['index'] = 'settings.'.$field['index'];
174 174
             }
175 175
         }
176 176
 
Please login to merge, or discard this patch.
Classes/Updates/FileLocationUpdater.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
                             $queryBuilder->createNamedParameter('', \PDO::PARAM_STR)
173 173
                         ),
174 174
                         $queryBuilder->expr()->comparison(
175
-                            'CAST(CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS DECIMAL) AS CHAR)',
175
+                            'CAST(CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS DECIMAL) AS CHAR)',
176 176
                             ExpressionBuilder::NEQ,
177
-                            'CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS CHAR)'
177
+                            'CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS CHAR)'
178 178
                         )
179 179
                     )
180 180
                     ->orderBy('uid')
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 }
188 188
             } catch (DBALException $e) {
189 189
                 throw new \RuntimeException(
190
-                    'Database query failed. Error was: ' . $e->getPrevious()->getMessage(),
190
+                    'Database query failed. Error was: '.$e->getPrevious()->getMessage(),
191 191
                     1511950673
192 192
                 );
193 193
             }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
247 247
 
248 248
         $fileUid = null;
249
-        $sourcePath = Environment::getPublicPath() . '/' . $fieldItem;
249
+        $sourcePath = Environment::getPublicPath().'/'.$fieldItem;
250 250
 
251 251
         // maybe the file was already moved, so check if the original file still exists
252 252
         if (file_exists($sourcePath)) {
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
                 $fulltext['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpFulltext]);
147 147
                 break;
148 148
             } else {
149
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
149
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
150 150
             }
151 151
         }
152 152
         if (empty($fulltext)) {
153
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpFulltext'] . '"');
153
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpFulltext'].'"');
154 154
         }
155 155
         return $fulltext;
156 156
     }
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
         $viewerConfiguration = '$(document).ready(function() {
169 169
                 if (dlfUtils.exists(dlfViewer)) {
170 170
                     tx_dlf_viewer = new dlfViewer({
171
-                        controls: ["' . implode('", "', $this->controls) . '"],
172
-                        div: "' . $this->settings['elementId'] . '",
173
-                        images: ' . json_encode($this->images) . ',
174
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
175
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
176
-                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . '
171
+                        controls: ["' . implode('", "', $this->controls).'"],
172
+                        div: "' . $this->settings['elementId'].'",
173
+                        images: ' . json_encode($this->images).',
174
+                        fulltexts: ' . json_encode($this->fulltexts).',
175
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
176
+                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).'
177 177
                     });
178 178
                 }
179 179
             });';
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
                 $image['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpImages]);
272 272
                 break;
273 273
             } else {
274
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
274
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
275 275
             }
276 276
         }
277 277
         if (empty($image)) {
278
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpImages'] . '"');
278
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpImages'].'"');
279 279
         }
280 280
         return $image;
281 281
     }
Please login to merge, or discard this patch.