Passed
Pull Request — master (#123)
by
unknown
11:14
created
Configuration/TCA/Overrides/tt_content.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -16,67 +16,67 @@
 block discarded – undo
16 16
 // Plugin "audioplayer".
17 17
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_audioplayer'] = 'layout,select_key,pages,recursive';
18 18
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_audioplayer'] = 'pi_flexform';
19
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/AudioPlayer.xml');
19
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:'.'dlf/Configuration/FlexForms/AudioPlayer.xml');
20 20
 // Plugin "basket".
21 21
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_basket'] = 'layout,select_key,pages,recursive';
22 22
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_basket'] = 'pi_flexform';
23
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Basket.xml');
23
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Basket.xml');
24 24
 // Plugin "calendar".
25 25
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_calendar'] = 'layout,select_key,pages,recursive';
26 26
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_calendar'] = 'pi_flexform';
27
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Calendar.xml');
27
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Calendar.xml');
28 28
 // Plugin "collection".
29 29
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_collection'] = 'layout,select_key,pages,recursive';
30 30
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_collection'] = 'pi_flexform';
31
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Collection.xml');
31
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Collection.xml');
32 32
 // Plugin "feeds".
33 33
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_feeds'] = 'layout,select_key,pages,recursive';
34 34
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_feeds'] = 'pi_flexform';
35
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Feeds.xml');
35
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Feeds.xml');
36 36
 // Plugin "listview".
37 37
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_listview'] = 'layout,select_key,pages,recursive';
38 38
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_listview'] = 'pi_flexform';
39
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/ListView.xml');
39
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:'.'dlf/Configuration/FlexForms/ListView.xml');
40 40
 // Plugin "metadata".
41 41
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_metadata'] = 'layout,select_key,pages,recursive';
42 42
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_metadata'] = 'pi_flexform';
43
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Metadata.xml');
43
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Metadata.xml');
44 44
 // Plugin "navigation".
45 45
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_navigation'] = 'layout,select_key,pages,recursive';
46 46
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_navigation'] = 'pi_flexform';
47
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Navigation.xml');
47
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Navigation.xml');
48 48
 // Plugin "oaipmh".
49 49
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_oaipmh'] = 'layout,select_key,pages,recursive';
50 50
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_oaipmh'] = 'pi_flexform';
51
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/OaiPmh.xml');
51
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:'.'dlf/Configuration/FlexForms/OaiPmh.xml');
52 52
 // Plugin "pagegrid".
53 53
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pagegrid'] = 'layout,select_key,pages,recursive';
54 54
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pagegrid'] = 'pi_flexform';
55
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/PageGrid.xml');
55
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:'.'dlf/Configuration/FlexForms/PageGrid.xml');
56 56
 // Plugin "pageview".
57 57
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pageview'] = 'layout,select_key,pages,recursive';
58 58
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pageview'] = 'pi_flexform';
59
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/PageView.xml');
59
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:'.'dlf/Configuration/FlexForms/PageView.xml');
60 60
 // Plugin "search".
61 61
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_search'] = 'layout,select_key,pages,recursive';
62 62
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_search'] = 'pi_flexform';
63
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Search.xml');
63
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Search.xml');
64 64
 // Plugin "statistics".
65 65
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_statistics'] = 'layout,select_key,pages,recursive';
66 66
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_statistics'] = 'pi_flexform';
67
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Statistics.xml');
67
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Statistics.xml');
68 68
 // Plugin "tableofcontents".
69 69
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_tableofcontents'] = 'layout,select_key,pages,recursive';
70 70
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_tableofcontents'] = 'pi_flexform';
71
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/TableOfContents.xml');
71
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:'.'dlf/Configuration/FlexForms/TableOfContents.xml');
72 72
 // Plugin "toolbox".
73 73
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_toolbox'] = 'layout,select_key,pages,recursive';
74 74
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_toolbox'] = 'pi_flexform';
75
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Toolbox.xml');
75
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Toolbox.xml');
76 76
 // Plugin "view3d".
77 77
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_view3d'] = 'layout,select_key,pages,recursive';
78 78
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_view3d'] = 'pi_flexform';
79
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_view3d', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/View3D.xml');
79
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_view3d', 'FILE:EXT:'.'dlf/Configuration/FlexForms/View3D.xml');
80 80
 
81 81
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
82 82
     'Dlf',
Please login to merge, or discard this patch.
Classes/Common/MetsDocument.php 3 patches
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     {
189 189
         $file = $this->getFileInfo($id);
190 190
         if ($file['mimeType'] === 'application/vnd.kitodo.iiif') {
191
-            $file['location'] = (strrpos($file['location'], 'info.json') === strlen($file['location']) - 9) ? $file['location'] : (strrpos($file['location'], '/') === strlen($file['location']) ? $file['location'] . 'info.json' : $file['location'] . '/info.json');
191
+            $file['location'] = (strrpos($file['location'], 'info.json') === strlen($file['location']) - 9) ? $file['location'] : (strrpos($file['location'], '/') === strlen($file['location']) ? $file['location'].'info.json' : $file['location'].'/info.json');
192 192
             $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif');
193 193
             IiifHelper::setUrlReader(IiifUrlReader::getInstance());
194 194
             IiifHelper::setMaxThumbnailHeight($conf['thumbnailHeight']);
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
                 return $service->getImageUrl();
199 199
             }
200 200
         } elseif ($file['mimeType'] === 'application/vnd.netfpx') {
201
-            $baseURL = $file['location'] . (strpos($file['location'], '?') === false ? '?' : '');
201
+            $baseURL = $file['location'].(strpos($file['location'], '?') === false ? '?' : '');
202 202
             // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server'
203
-            return $baseURL . '&CVT=jpeg';
203
+            return $baseURL.'&CVT=jpeg';
204 204
         }
205 205
         return $file['location'];
206 206
     }
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
      */
230 230
     public function getFileLocation(string $id): string
231 231
     {
232
-        $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]');
232
+        $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]');
233 233
         if (
234 234
             !empty($id)
235 235
             && !empty($location)
236 236
         ) {
237 237
             return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href;
238 238
         } else {
239
-            $this->logger->warning('There is no file node with @ID "' . $id . '"');
239
+            $this->logger->warning('There is no file node with @ID "'.$id.'"');
240 240
             return '';
241 241
         }
242 242
     }
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
      */
247 247
     public function getFileMimeType(string $id): string
248 248
     {
249
-        $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE');
249
+        $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE');
250 250
         if (
251 251
             !empty($id)
252 252
             && !empty($mimetype)
253 253
         ) {
254 254
             return (string) $mimetype[0];
255 255
         } else {
256
-            $this->logger->warning('There is no file node with @ID "' . $id . '" or no MIME type specified');
256
+            $this->logger->warning('There is no file node with @ID "'.$id.'" or no MIME type specified');
257 257
             return '';
258 258
         }
259 259
     }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             return $this->logicalUnits[$id];
274 274
         } elseif (!empty($id)) {
275 275
             // Get specified logical unit.
276
-            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]');
276
+            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]');
277 277
         } else {
278 278
             // Get all logical units at top level.
279 279
             $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div');
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         $cPid = max($cPid, 0);
462 462
         if ($cPid == 0 && ($this->cPid || $this->pid)) {
463 463
             // Retain current PID.
464
-            $cPid = $this->cPid ?: $this->pid;
464
+            $cPid = $this->cPid ? : $this->pid;
465 465
         }
466 466
         return $cPid;
467 467
     }
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
         if (isset($this->fileInfos[$id]) || in_array('dmdSec', $metadataSections)) {
529 529
             return $metadata;
530 530
         } else {
531
-            $this->logger->warning('No supported descriptive metadata found for logical structure with @ID "' . $id . '"');
531
+            $this->logger->warning('No supported descriptive metadata found for logical structure with @ID "'.$id.'"');
532 532
             return [];
533 533
         }
534 534
     }
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         if (!empty($this->logicalUnits[$id])) {
548 548
             return [$this->logicalUnits[$id]['type']];
549 549
         } else {
550
-            $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE');
550
+            $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE');
551 551
             if (!empty($struct)) {
552 552
                 return [(string) $struct[0]];
553 553
             }
@@ -690,13 +690,13 @@  discard block
 block discarded – undo
690 690
             if ($resArray['format'] > 0 && !empty($resArray['xpath_sorting'])) {
691 691
                 $values = $domXPath->evaluate($resArray['xpath_sorting'], $domNode);
692 692
                 if ($values instanceof \DOMNodeList && $values->length > 0) {
693
-                    $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue);
693
+                    $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue);
694 694
                 } elseif (!($values instanceof \DOMNodeList)) {
695
-                    $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values);
695
+                    $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values);
696 696
                 }
697 697
             }
698
-            if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) {
699
-                $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0];
698
+            if (empty($metadata[$resArray['index_name'].'_sorting'][0])) {
699
+                $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];
700 700
             }
701 701
         }
702 702
     }
@@ -756,11 +756,11 @@  discard block
 block discarded – undo
756 756
                         return true;
757 757
                     }
758 758
                 } else {
759
-                    $this->logger->warning('Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->mdSec[$dmdId]['type'] . '"');
759
+                    $this->logger->warning('Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->mdSec[$dmdId]['type'].'"');
760 760
                 }
761 761
             }
762 762
         } else {
763
-            $this->logger->notice('Unsupported metadata format "' . $this->mdSec[$dmdId]['type'] . '" in ' . $mdSectionType . ' with @ID "' . $dmdId . '"');
763
+            $this->logger->notice('Unsupported metadata format "'.$this->mdSec[$dmdId]['type'].'" in '.$mdSectionType.' with @ID "'.$dmdId.'"');
764 764
         }
765 765
         return false;
766 766
     }
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
             $dmdIds = $this->logicalUnits[$id]['dmdId'] ?? '';
868 868
             $admIds = $this->logicalUnits[$id]['admId'] ?? '';
869 869
         } else {
870
-            $mdSec = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]')[0];
870
+            $mdSec = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]')[0];
871 871
             if ($mdSec) {
872 872
                 $dmdIds = (string) $mdSec->attributes()->DMDID;
873 873
                 $admIds = (string) $mdSec->attributes()->ADMID;
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
 
898 898
         return array_filter(
899 899
             $allMdIds,
900
-            function ($element) {
900
+            function($element) {
901 901
                 return !empty($element);
902 902
             }
903 903
         );
@@ -923,7 +923,7 @@  discard block
 block discarded – undo
923 923
      */
924 924
     public function getStructureDepth(string $logId)
925 925
     {
926
-        $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*');
926
+        $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*');
927 927
         if (!empty($ancestors)) {
928 928
             return count($ancestors);
929 929
         } else {
@@ -947,9 +947,9 @@  discard block
 block discarded – undo
947 947
             $this->registerNamespaces($this->mets);
948 948
         } else {
949 949
             if (!empty($location)) {
950
-                $this->logger->error('No METS part found in document with location "' . $location . '".');
950
+                $this->logger->error('No METS part found in document with location "'.$location.'".');
951 951
             } elseif (!empty($this->recordId)) {
952
-                $this->logger->error('No METS part found in document with recordId "' . $this->recordId . '".');
952
+                $this->logger->error('No METS part found in document with recordId "'.$this->recordId.'".');
953 953
             } else {
954 954
                 $this->logger->error('No METS part found in current document.');
955 955
             }
@@ -970,7 +970,7 @@  discard block
 block discarded – undo
970 970
                 return true;
971 971
             }
972 972
         }
973
-        $this->logger->error('Could not load XML file from "' . $location . '"');
973
+        $this->logger->error('Could not load XML file from "'.$location.'"');
974 974
         return false;
975 975
     }
976 976
 
@@ -1093,10 +1093,10 @@  discard block
 block discarded – undo
1093 1093
 
1094 1094
         if (!empty($mdType) && !empty($this->formats[(string) $mdType[0]])) {
1095 1095
             $type = (string) $mdType[0];
1096
-            $xml = $element->xpath('./mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']);
1096
+            $xml = $element->xpath('./mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']);
1097 1097
         } elseif (!empty($otherMdType) && !empty($this->formats[(string) $otherMdType[0]])) {
1098 1098
             $type = (string) $otherMdType[0];
1099
-            $xml = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']);
1099
+            $xml = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']);
1100 1100
         }
1101 1101
 
1102 1102
         if (empty($xml)) {
@@ -1289,9 +1289,9 @@  discard block
 block discarded – undo
1289 1289
             || $forceReload
1290 1290
         ) {
1291 1291
             // Retain current PID.
1292
-            $cPid = $this->cPid ?: $this->pid;
1292
+            $cPid = $this->cPid ? : $this->pid;
1293 1293
             if (!$cPid) {
1294
-                $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions');
1294
+                $this->logger->error('Invalid PID '.$cPid.' for structure definitions');
1295 1295
                 $this->thumbnailLoaded = true;
1296 1296
                 return $this->thumbnail;
1297 1297
             }
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
                 if (!empty($resArray['thumbnail'])) {
1329 1329
                     $strctType = Helper::getIndexNameFromUid($resArray['thumbnail'], 'tx_dlf_structures', $cPid);
1330 1330
                     // Check if this document has a structure element of the desired type.
1331
-                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID');
1331
+                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID');
1332 1332
                     if (!empty($strctIds)) {
1333 1333
                         $strctId = (string) $strctIds[0];
1334 1334
                     }
@@ -1351,7 +1351,7 @@  discard block
 block discarded – undo
1351 1351
                     }
1352 1352
                 }
1353 1353
             } else {
1354
-                $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database');
1354
+                $this->logger->error('No structure of type "'.$metadata['type'][0].'" found in database');
1355 1355
             }
1356 1356
             $this->thumbnailLoaded = true;
1357 1357
         }
@@ -1397,7 +1397,7 @@  discard block
 block discarded – undo
1397 1397
     {
1398 1398
         if (empty($this->parentHref)) {
1399 1399
             // Get the closest ancestor of the current document which has a MPTR child.
1400
-            $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $this->toplevelId . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
1400
+            $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->toplevelId.'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
1401 1401
             if (!empty($parentMptr)) {
1402 1402
                 $this->parentHref = (string) $parentMptr[0]->attributes('http://www.w3.org/1999/xlink')->href;
1403 1403
             }
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
  * @property-read SimpleXMLElement $mets this holds the XML file's METS part as SimpleXMLElement object
67 67
  * @property-read string $parentHref URL of the parent document (determined via mptr element), or empty string if none is available
68 68
  */
69
-final class MetsDocument extends AbstractDocument
70
-{
69
+final class MetsDocument extends AbstractDocument {
71 70
     /**
72 71
      * @access protected
73 72
      * @var string[] Subsections / tags that may occur within `<mets:amdSec>`
@@ -427,8 +426,7 @@  discard block
 block discarded – undo
427 426
      *
428 427
      * @return ?string thumbnail or null if not found
429 428
      */
430
-    private function getThumbnail(string $id = '')
431
-    {
429
+    private function getThumbnail(string $id = '') {
432 430
         // Load plugin configuration.
433 431
         $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
434 432
         $fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
@@ -772,8 +770,7 @@  discard block
 block discarded – undo
772 770
      *
773 771
      * @return bool true if extraction successful, false otherwise
774 772
      */
775
-    private function extractMetadataIfTypeSupported(string $dmdId, string $mdSectionType, array &$metadata)
776
-    {
773
+    private function extractMetadataIfTypeSupported(string $dmdId, string $mdSectionType, array &$metadata) {
777 774
         // Is this metadata format supported?
778 775
         if (!empty($this->formats[$this->mdSec[$dmdId]['type']])) {
779 776
             if (!empty($this->formats[$this->mdSec[$dmdId]['type']]['class'])) {
@@ -805,8 +802,7 @@  discard block
 block discarded – undo
805 802
      *
806 803
      * @return array additional metadata data queried from database
807 804
      */
808
-    private function getAdditionalMetadataFromDatabase(int $cPid, string $dmdId)
809
-    {
805
+    private function getAdditionalMetadataFromDatabase(int $cPid, string $dmdId) {
810 806
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
811 807
             ->getQueryBuilderForTable('tx_dlf_metadata');
812 808
         // Get hidden records, too.
@@ -951,8 +947,7 @@  discard block
 block discarded – undo
951 947
     /**
952 948
      * @see AbstractDocument::getStructureDepth()
953 949
      */
954
-    public function getStructureDepth(string $logId)
955
-    {
950
+    public function getStructureDepth(string $logId) {
956 951
         $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*');
957 952
         if (!empty($ancestors)) {
958 953
             return count($ancestors);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *
104 104
      * @see MetsDocument::$mdSec
105 105
      */
106
-    protected bool $mdSecLoaded = false;
106
+    protected bool $mdSecLoaded = FALSE;
107 107
 
108 108
     /**
109 109
      * @access protected
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      *
126 126
      * @see $fileGrps
127 127
      */
128
-    protected bool $fileGrpsLoaded = false;
128
+    protected bool $fileGrpsLoaded = FALSE;
129 129
 
130 130
     /**
131 131
      * @access protected
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                 return $service->getImageUrl();
202 202
             }
203 203
         } elseif ($file['mimeType'] === 'application/vnd.netfpx') {
204
-            $baseURL = $file['location'] . (strpos($file['location'], '?') === false ? '?' : '');
204
+            $baseURL = $file['location'] . (strpos($file['location'], '?') === FALSE ? '?' : '');
205 205
             // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server'
206 206
             return $baseURL . '&CVT=jpeg';
207 207
         }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             $this->fileInfos[$id]['mimeType'] = $this->getFileMimeType($id);
225 225
         }
226 226
 
227
-        return $this->fileInfos[$id] ?? null;
227
+        return $this->fileInfos[$id] ?? NULL;
228 228
     }
229 229
 
230 230
     /**
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     /**
265 265
      * @see AbstractDocument::getLogicalStructure()
266 266
      */
267
-    public function getLogicalStructure(string $id, bool $recursive = false): array
267
+    public function getLogicalStructure(string $id, bool $recursive = FALSE): array
268 268
     {
269 269
         $details = [];
270 270
         // Is the requested logical unit already loaded?
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
      *
306 306
      * @return array Array of the element's id, label, type and physical page indexes/mptr link
307 307
      */
308
-    protected function getLogicalStructureInfo(SimpleXMLElement $structure, bool $recursive = false): array
308
+    protected function getLogicalStructureInfo(SimpleXMLElement $structure, bool $recursive = FALSE): array
309 309
     {
310 310
         $attributes = $structure->attributes();
311 311
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
             'pagination' => '',
324 324
             'type' => isset($attributes['TYPE']) ? (string) $attributes['TYPE'] : '',
325 325
             'description' => '',
326
-            'thumbnailId' => null,
326
+            'thumbnailId' => NULL,
327 327
             'files' => [],
328 328
         ];
329 329
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
             $details['children'] = [];
359 359
             foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) {
360 360
                 // Repeat for all children.
361
-                $details['children'][] = $this->getLogicalStructureInfo($child, true);
361
+                $details['children'][] = $this->getLogicalStructureInfo($child, TRUE);
362 362
             }
363 363
         }
364 364
         return $details;
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             && array_key_exists($details['id'], $this->smLinks['l2p'])
405 405
         ) {
406 406
             // Link logical structure to the first corresponding physical page/track.
407
-            $details['points'] = max((int) array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, true), 1);
407
+            $details['points'] = max((int) array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, TRUE), 1);
408 408
             $details['thumbnailId'] = $this->getThumbnail();
409 409
             // Get page/track number of the first page/track related to this structure element.
410 410
             $details['pagination'] = $this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['orderlabel'];
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
             $details['points'] = 1;
414 414
             $details['thumbnailId'] = $this->getThumbnail();
415 415
         }
416
-        if ($details['thumbnailId'] === null) {
416
+        if ($details['thumbnailId'] === NULL) {
417 417
             unset($details['thumbnailId']);
418 418
         }
419 419
     }
@@ -433,14 +433,14 @@  discard block
 block discarded – undo
433 433
         $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
434 434
         $fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
435 435
 
436
-        $thumbnail = null;
436
+        $thumbnail = NULL;
437 437
 
438 438
         while ($fileGrpThumb = array_shift($fileGrpsThumb)) {
439 439
             if (empty($id)) {
440
-                $thumbnail = $this->physicalStructureInfo[$this->physicalStructure[1]]['files'][$fileGrpThumb] ?? null;
440
+                $thumbnail = $this->physicalStructureInfo[$this->physicalStructure[1]]['files'][$fileGrpThumb] ?? NULL;
441 441
             } else {
442
-                $parentId = $this->smLinks['l2p'][$id][0] ?? null;
443
-                $thumbnail = $this->physicalStructureInfo[$parentId]['files'][$fileGrpThumb] ?? null;
442
+                $parentId = $this->smLinks['l2p'][$id][0] ?? NULL;
443
+                $thumbnail = $this->physicalStructureInfo[$parentId]['files'][$fileGrpThumb] ?? NULL;
444 444
             }
445 445
 
446 446
             if (!empty($thumbnail)) {
@@ -601,13 +601,13 @@  discard block
 block discarded – undo
601 601
     private function extractAndProcessMetadata(string $dmdId, string $mdSectionType, array &$metadata, int $cPid, array $metadataSections): bool
602 602
     {
603 603
         if ($this->hasMetadataSection($metadataSections, $mdSectionType, 'dmdSec')) {
604
-            return true;
604
+            return TRUE;
605 605
         }
606 606
 
607 607
         $metadataExtracted = $this->extractMetadataIfTypeSupported($dmdId, $mdSectionType, $metadata);
608 608
 
609 609
         if (!$metadataExtracted) {
610
-            return false;
610
+            return FALSE;
611 611
         }
612 612
 
613 613
         $additionalMetadata = $this->getAdditionalMetadataFromDatabase($cPid, $dmdId);
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 
619 619
         $this->processAdditionalMetadata($additionalMetadata, $domXPath, $domNode, $metadata);
620 620
 
621
-        return true;
621
+        return TRUE;
622 622
     }
623 623
 
624 624
     /**
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
                     $obj = GeneralUtility::makeInstance($class);
784 784
                     if ($obj instanceof MetadataInterface) {
785 785
                         $obj->extractMetadata($this->mdSec[$dmdId]['xml'], $metadata, GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'general')['useExternalApisForMetadata']);
786
-                        return true;
786
+                        return TRUE;
787 787
                     }
788 788
                 } else {
789 789
                     $this->logger->warning('Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->mdSec[$dmdId]['type'] . '"');
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
         } else {
793 793
             $this->logger->notice('Unsupported metadata format "' . $this->mdSec[$dmdId]['type'] . '" in ' . $mdSectionType . ' with @ID "' . $dmdId . '"');
794 794
         }
795
-        return false;
795
+        return FALSE;
796 796
     }
797 797
 
798 798
     /**
@@ -992,16 +992,16 @@  discard block
 block discarded – undo
992 992
     protected function loadLocation(string $location): bool
993 993
     {
994 994
         $fileResource = Helper::getUrl($location);
995
-        if ($fileResource !== false) {
995
+        if ($fileResource !== FALSE) {
996 996
             $xml = Helper::getXmlFileAsString($fileResource);
997 997
             // Set some basic properties.
998
-            if ($xml !== false) {
998
+            if ($xml !== FALSE) {
999 999
                 $this->xml = $xml;
1000
-                return true;
1000
+                return TRUE;
1001 1001
             }
1002 1002
         }
1003 1003
         $this->logger->error('Could not load XML file from "' . $location . '"');
1004
-        return false;
1004
+        return FALSE;
1005 1005
     }
1006 1006
 
1007 1007
     /**
@@ -1023,9 +1023,9 @@  discard block
 block discarded – undo
1023 1023
 
1024 1024
         if ($preloadedDocument instanceof SimpleXMLElement) {
1025 1025
             $this->xml = $preloadedDocument;
1026
-            return true;
1026
+            return TRUE;
1027 1027
         }
1028
-        return false;
1028
+        return FALSE;
1029 1029
     }
1030 1030
 
1031 1031
     /**
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
             foreach ($this->mets->xpath('./mets:dmdSec') as $dmdSecTag) {
1052 1052
                 $dmdSec = $this->processMdSec($dmdSecTag);
1053 1053
 
1054
-                if ($dmdSec !== null) {
1054
+                if ($dmdSec !== NULL) {
1055 1055
                     $this->mdSec[$dmdSec['id']] = $dmdSec;
1056 1056
                     $this->dmdSec[$dmdSec['id']] = $dmdSec;
1057 1057
                 }
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
                     // TODO: Should we check that the format may occur within this type (e.g., to ignore VIDEOMD within rightsMD)?
1069 1069
                     $mdSec = $this->processMdSec($mdSecTag);
1070 1070
 
1071
-                    if ($mdSec !== null) {
1071
+                    if ($mdSec !== NULL) {
1072 1072
                         $this->mdSec[$mdSec['id']] = $mdSec;
1073 1073
 
1074 1074
                         $childIds[] = $mdSec['id'];
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
                 }
1082 1082
             }
1083 1083
 
1084
-            $this->mdSecLoaded = true;
1084
+            $this->mdSecLoaded = TRUE;
1085 1085
         }
1086 1086
         return $this->mdSec;
1087 1087
     }
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
     {
1113 1113
         $mdId = (string) $element->attributes()->ID;
1114 1114
         if (empty($mdId)) {
1115
-            return null;
1115
+            return NULL;
1116 1116
         }
1117 1117
 
1118 1118
         $this->registerNamespaces($element);
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
         }
1131 1131
 
1132 1132
         if (empty($xml)) {
1133
-            return null;
1133
+            return NULL;
1134 1134
         }
1135 1135
 
1136 1136
         $this->registerNamespaces($xml[0]);
@@ -1191,9 +1191,9 @@  discard block
 block discarded – undo
1191 1191
                 !empty($extConf['fileGrpFulltext'])
1192 1192
                 && array_intersect(GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']), $this->fileGrps) !== []
1193 1193
             ) {
1194
-                $this->hasFulltext = true;
1194
+                $this->hasFulltext = TRUE;
1195 1195
             }
1196
-            $this->fileGrpsLoaded = true;
1196
+            $this->fileGrpsLoaded = TRUE;
1197 1197
         }
1198 1198
         return $this->fileGrps;
1199 1199
     }
@@ -1254,7 +1254,7 @@  discard block
 block discarded – undo
1254 1254
 
1255 1255
                 $this->physicalStructure = $this->getPhysicalElements($elementNodes, $fileUse);
1256 1256
             }
1257
-            $this->physicalStructureLoaded = true;
1257
+            $this->physicalStructureLoaded = TRUE;
1258 1258
         }
1259 1259
         return $this->physicalStructure;
1260 1260
     }
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
                     $this->smLinks['p2l'][(string) $smLink->attributes('http://www.w3.org/1999/xlink')->to][] = (string) $smLink->attributes('http://www.w3.org/1999/xlink')->from;
1343 1343
                 }
1344 1344
             }
1345
-            $this->smLinksLoaded = true;
1345
+            $this->smLinksLoaded = TRUE;
1346 1346
         }
1347 1347
         return $this->smLinks;
1348 1348
     }
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
     /**
1351 1351
      * @see AbstractDocument::magicGetThumbnail()
1352 1352
      */
1353
-    protected function magicGetThumbnail(bool $forceReload = false): string
1353
+    protected function magicGetThumbnail(bool $forceReload = FALSE): string
1354 1354
     {
1355 1355
         if (
1356 1356
             !$this->thumbnailLoaded
@@ -1360,14 +1360,14 @@  discard block
 block discarded – undo
1360 1360
             $cPid = $this->cPid ?: $this->pid;
1361 1361
             if (!$cPid) {
1362 1362
                 $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions');
1363
-                $this->thumbnailLoaded = true;
1363
+                $this->thumbnailLoaded = TRUE;
1364 1364
                 return $this->thumbnail;
1365 1365
             }
1366 1366
             // Load extension configuration.
1367 1367
             $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
1368 1368
             if (empty($extConf['fileGrpThumbs'])) {
1369 1369
                 $this->logger->warning('No fileGrp for thumbnails specified');
1370
-                $this->thumbnailLoaded = true;
1370
+                $this->thumbnailLoaded = TRUE;
1371 1371
                 return $this->thumbnail;
1372 1372
             }
1373 1373
             $strctId = $this->magicGetToplevelId();
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
             } else {
1422 1422
                 $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database');
1423 1423
             }
1424
-            $this->thumbnailLoaded = true;
1424
+            $this->thumbnailLoaded = TRUE;
1425 1425
         }
1426 1426
         return $this->thumbnail;
1427 1427
     }
@@ -1499,8 +1499,8 @@  discard block
 block discarded – undo
1499 1499
     public function __toString(): string
1500 1500
     {
1501 1501
         $xml = new \DOMDocument('1.0', 'utf-8');
1502
-        $xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), true));
1503
-        $xml->formatOutput = true;
1502
+        $xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), TRUE));
1503
+        $xml->formatOutput = TRUE;
1504 1504
         return $xml->saveXML();
1505 1505
     }
1506 1506
 
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
     public function __wakeup(): void
1516 1516
     {
1517 1517
         $xml = Helper::getXmlFileAsString($this->asXML);
1518
-        if ($xml !== false) {
1518
+        if ($xml !== FALSE) {
1519 1519
             $this->asXML = '';
1520 1520
             $this->xml = $xml;
1521 1521
             // Rebuild the unserializable properties.
Please login to merge, or discard this patch.
Classes/Common/Helper.php 3 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 } elseif ($checksum == 10) {
149 149
                     //TODO: Binary operation "+" between string and 1 results in an error.
150 150
                     // @phpstan-ignore-next-line
151
-                    return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD');
151
+                    return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD');
152 152
                 } elseif (substr($id, -1, 1) != $checksum) {
153 153
                     return false;
154 154
                 }
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv);
355 355
         // Merge initialization vector and encrypted data.
356 356
         if ($encrypted !== false) {
357
-            $encrypted = base64_encode($iv . $encrypted);
357
+            $encrypted = base64_encode($iv.$encrypted);
358 358
         }
359 359
         return $encrypted;
360 360
     }
@@ -396,8 +396,8 @@  discard block
 block discarded – undo
396 396
     public static function getHookObjects(string $scriptRelPath): array
397 397
     {
398 398
         $hookObjects = [];
399
-        if (is_array(self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'])) {
400
-            foreach (self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) {
399
+        if (is_array(self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'])) {
400
+            foreach (self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) {
401 401
                 $hookObjects[] = GeneralUtility::makeInstance($classRef);
402 402
             }
403 403
         }
@@ -426,12 +426,12 @@  discard block
 block discarded – undo
426 426
             // NOTE: Only use tables that don't have too many entries!
427 427
             || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'])
428 428
         ) {
429
-            self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR);
429
+            self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR);
430 430
             return '';
431 431
         }
432 432
 
433
-        $makeCacheKey = function ($pid, $uid) {
434
-            return $pid . '.' . $uid;
433
+        $makeCacheKey = function($pid, $uid) {
434
+            return $pid.'.'.$uid;
435 435
         };
436 436
 
437 437
         static $cache = [];
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
 
442 442
             $result = $queryBuilder
443 443
                 ->select(
444
-                    $table . '.index_name AS index_name',
445
-                    $table . '.uid AS uid',
446
-                    $table . '.pid AS pid',
444
+                    $table.'.index_name AS index_name',
445
+                    $table.'.uid AS uid',
446
+                    $table.'.pid AS pid',
447 447
                 )
448 448
                 ->from($table)
449 449
                 ->execute();
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         $result = $cache[$table][$cacheKey] ?? '';
462 462
 
463 463
         if ($result === '') {
464
-            self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING);
464
+            self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING);
465 465
         }
466 466
 
467 467
         return $result;
@@ -490,11 +490,11 @@  discard block
 block discarded – undo
490 490
             // No ISO code, return unchanged.
491 491
             return $code;
492 492
         }
493
-        $lang = LocalizationUtility::translate('LLL:' . $file . ':' . $code);
493
+        $lang = LocalizationUtility::translate('LLL:'.$file.':'.$code);
494 494
         if (!empty($lang)) {
495 495
             return $lang;
496 496
         } else {
497
-            self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE);
497
+            self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE);
498 498
             return $code;
499 499
         }
500 500
     }
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
         // Sanitize input.
659 659
         $pid = max((int) $pid, 0);
660 660
         if (!$pid) {
661
-            self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING);
661
+            self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING);
662 662
             return $indexName;
663 663
         }
664 664
         /** @var PageRepository $pageRepository */
@@ -681,13 +681,13 @@  discard block
 block discarded – undo
681 681
         // First fetch the uid of the received index_name
682 682
         $result = $queryBuilder
683 683
             ->select(
684
-                $table . '.uid AS uid',
685
-                $table . '.l18n_parent AS l18n_parent'
684
+                $table.'.uid AS uid',
685
+                $table.'.l18n_parent AS l18n_parent'
686 686
             )
687 687
             ->from($table)
688 688
             ->where(
689
-                $queryBuilder->expr()->eq($table . '.pid', $pid),
690
-                $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($indexName)),
689
+                $queryBuilder->expr()->eq($table.'.pid', $pid),
690
+                $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($indexName)),
691 691
                 self::whereExpression($table, true)
692 692
             )
693 693
             ->setMaxResults(1)
@@ -698,12 +698,12 @@  discard block
 block discarded – undo
698 698
         if ($row) {
699 699
             // Now we use the uid of the l18_parent to fetch the index_name of the translated content element.
700 700
             $result = $queryBuilder
701
-                ->select($table . '.index_name AS index_name')
701
+                ->select($table.'.index_name AS index_name')
702 702
                 ->from($table)
703 703
                 ->where(
704
-                    $queryBuilder->expr()->eq($table . '.pid', $pid),
705
-                    $queryBuilder->expr()->eq($table . '.uid', $row['l18n_parent']),
706
-                    $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId),
704
+                    $queryBuilder->expr()->eq($table.'.pid', $pid),
705
+                    $queryBuilder->expr()->eq($table.'.uid', $row['l18n_parent']),
706
+                    $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId),
707 707
                     self::whereExpression($table, true)
708 708
                 )
709 709
                 ->setMaxResults(1)
@@ -721,14 +721,14 @@  discard block
 block discarded – undo
721 721
         if (empty($labels[$table][$pid][$languageContentId][$indexName])) {
722 722
             // Check if this table is allowed for translation.
723 723
             if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'])) {
724
-                $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]);
724
+                $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]);
725 725
                 if ($languageContentId > 0) {
726 726
                     $additionalWhere = $queryBuilder->expr()->andX(
727 727
                         $queryBuilder->expr()->orX(
728
-                            $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]),
729
-                            $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId)
728
+                            $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]),
729
+                            $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId)
730 730
                         ),
731
-                        $queryBuilder->expr()->eq($table . '.l18n_parent', 0)
731
+                        $queryBuilder->expr()->eq($table.'.l18n_parent', 0)
732 732
                     );
733 733
                 }
734 734
 
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
                     ->select('*')
738 738
                     ->from($table)
739 739
                     ->where(
740
-                        $queryBuilder->expr()->eq($table . '.pid', $pid),
740
+                        $queryBuilder->expr()->eq($table.'.pid', $pid),
741 741
                         $additionalWhere,
742 742
                         self::whereExpression($table, true)
743 743
                     )
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
                         }
756 756
                     }
757 757
                 } else {
758
-                    self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE);
758
+                    self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE);
759 759
                 }
760 760
             } else {
761
-                self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING);
761
+                self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING);
762 762
             }
763 763
         }
764 764
 
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
             return GeneralUtility::makeInstance(ConnectionPool::class)
805 805
                 ->getQueryBuilderForTable($table)
806 806
                 ->expr()
807
-                ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0);
807
+                ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0);
808 808
         } else {
809 809
             self::log('Unexpected TYPO3_MODE', LOG_SEVERITY_ERROR);
810 810
             return '1=-1';
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
         try {
871 871
             $response = $requestFactory->request($url, 'GET', $configuration);
872 872
         } catch (\Exception $e) {
873
-            self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING);
873
+            self::log('Could not fetch data from URL "'.$url.'". Error: '.$e->getMessage().'.', LOG_SEVERITY_WARNING);
874 874
             return false;
875 875
         }
876 876
         return $response->getBody()->getContents();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      *
88 88
      * @return FlashMessageQueue The queue the message was added to
89 89
      */
90
-    public static function addMessage(string $message, string $title, int $severity, bool $session = false, string $queue = 'kitodo.default.flashMessages'): FlashMessageQueue
90
+    public static function addMessage(string $message, string $title, int $severity, bool $session = FALSE, string $queue = 'kitodo.default.flashMessages'): FlashMessageQueue
91 91
     {
92 92
         $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
93 93
         $flashMessageQueue = $flashMessageService->getMessageQueueByIdentifier($queue);
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
                     $checksum = 'X';
127 127
                 }
128 128
                 if (!preg_match('/\d{8}[\dX]{1}/i', $id)) {
129
-                    return false;
129
+                    return FALSE;
130 130
                 } elseif (strtoupper(substr($id, -1, 1)) != $checksum) {
131
-                    return false;
131
+                    return FALSE;
132 132
                 }
133 133
                 break;
134 134
             case 'ZDB':
@@ -136,21 +136,21 @@  discard block
 block discarded – undo
136 136
                     $checksum = 'X';
137 137
                 }
138 138
                 if (!preg_match('/\d{8}-[\dX]{1}/i', $id)) {
139
-                    return false;
139
+                    return FALSE;
140 140
                 } elseif (strtoupper(substr($id, -1, 1)) != $checksum) {
141
-                    return false;
141
+                    return FALSE;
142 142
                 }
143 143
                 break;
144 144
             case 'SWD':
145 145
                 $checksum = 11 - $checksum;
146 146
                 if (!preg_match('/\d{8}-\d{1}/i', $id)) {
147
-                    return false;
147
+                    return FALSE;
148 148
                 } elseif ($checksum == 10) {
149 149
                     //TODO: Binary operation "+" between string and 1 results in an error.
150 150
                     // @phpstan-ignore-next-line
151 151
                     return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD');
152 152
                 } elseif (substr($id, -1, 1) != $checksum) {
153
-                    return false;
153
+                    return FALSE;
154 154
                 }
155 155
                 break;
156 156
             case 'GKD':
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
                     $checksum = 'X';
160 160
                 }
161 161
                 if (!preg_match('/\d{8}-[\dX]{1}/i', $id)) {
162
-                    return false;
162
+                    return FALSE;
163 163
                 } elseif (strtoupper(substr($id, -1, 1)) != $checksum) {
164
-                    return false;
164
+                    return FALSE;
165 165
                 }
166 166
                 break;
167 167
         }
168
-        return true;
168
+        return TRUE;
169 169
     }
170 170
 
171 171
     /**
@@ -202,28 +202,28 @@  discard block
 block discarded – undo
202 202
     public static function decrypt(string $encrypted)
203 203
     {
204 204
         if (
205
-            !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(true))
206
-            || !in_array(self::$hashAlgorithm, openssl_get_md_methods(true))
205
+            !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(TRUE))
206
+            || !in_array(self::$hashAlgorithm, openssl_get_md_methods(TRUE))
207 207
         ) {
208 208
             self::log('OpenSSL library doesn\'t support cipher and/or hash algorithm', LOG_SEVERITY_ERROR);
209
-            return false;
209
+            return FALSE;
210 210
         }
211 211
         if (empty(self::getEncryptionKey())) {
212 212
             self::log('No encryption key set in TYPO3 configuration', LOG_SEVERITY_ERROR);
213
-            return false;
213
+            return FALSE;
214 214
         }
215 215
         if (
216 216
             empty($encrypted)
217 217
             || strlen($encrypted) < openssl_cipher_iv_length(self::$cipherAlgorithm)
218 218
         ) {
219 219
             self::log('Invalid parameters given for decryption', LOG_SEVERITY_ERROR);
220
-            return false;
220
+            return FALSE;
221 221
         }
222 222
         // Split initialisation vector and encrypted data.
223 223
         $binary = base64_decode($encrypted);
224 224
         $iv = substr($binary, 0, openssl_cipher_iv_length(self::$cipherAlgorithm));
225 225
         $data = substr($binary, openssl_cipher_iv_length(self::$cipherAlgorithm));
226
-        $key = openssl_digest(self::getEncryptionKey(), self::$hashAlgorithm, true);
226
+        $key = openssl_digest(self::getEncryptionKey(), self::$hashAlgorithm, TRUE);
227 227
         // Decrypt data.
228 228
         return openssl_decrypt($data, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv);
229 229
     }
@@ -245,15 +245,15 @@  discard block
 block discarded – undo
245 245
         // Don't make simplexml_load_string throw (when $content is an array
246 246
         // or object)
247 247
         if (!is_string($content)) {
248
-            return false;
248
+            return FALSE;
249 249
         }
250 250
 
251 251
         // Turn off libxml's error logging.
252
-        $libxmlErrors = libxml_use_internal_errors(true);
252
+        $libxmlErrors = libxml_use_internal_errors(TRUE);
253 253
 
254 254
         if (\PHP_VERSION_ID < 80000) {
255 255
             // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
256
-            $previousValueOfEntityLoader = libxml_disable_entity_loader(true);
256
+            $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE);
257 257
         }
258 258
 
259 259
         // Try to load XML from file.
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
      */
316 316
     public static function digest(string $string)
317 317
     {
318
-        if (!in_array(self::$hashAlgorithm, openssl_get_md_methods(true))) {
318
+        if (!in_array(self::$hashAlgorithm, openssl_get_md_methods(TRUE))) {
319 319
             self::log('OpenSSL library doesn\'t support hash algorithm', LOG_SEVERITY_ERROR);
320
-            return false;
320
+            return FALSE;
321 321
         }
322 322
         // Hash string.
323 323
         return openssl_digest($string, self::$hashAlgorithm);
@@ -337,23 +337,23 @@  discard block
 block discarded – undo
337 337
     public static function encrypt(string $string)
338 338
     {
339 339
         if (
340
-            !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(true))
341
-            || !in_array(self::$hashAlgorithm, openssl_get_md_methods(true))
340
+            !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(TRUE))
341
+            || !in_array(self::$hashAlgorithm, openssl_get_md_methods(TRUE))
342 342
         ) {
343 343
             self::log('OpenSSL library doesn\'t support cipher and/or hash algorithm', LOG_SEVERITY_ERROR);
344
-            return false;
344
+            return FALSE;
345 345
         }
346 346
         if (empty(self::getEncryptionKey())) {
347 347
             self::log('No encryption key set in TYPO3 configuration', LOG_SEVERITY_ERROR);
348
-            return false;
348
+            return FALSE;
349 349
         }
350 350
         // Generate random initialization vector.
351 351
         $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(self::$cipherAlgorithm));
352
-        $key = openssl_digest(self::getEncryptionKey(), self::$hashAlgorithm, true);
352
+        $key = openssl_digest(self::getEncryptionKey(), self::$hashAlgorithm, TRUE);
353 353
         // Encrypt data.
354 354
         $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv);
355 355
         // Merge initialization vector and encrypted data.
356
-        if ($encrypted !== false) {
356
+        if ($encrypted !== FALSE) {
357 357
             $encrypted = base64_encode($iv . $encrypted);
358 358
         }
359 359
         return $encrypted;
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
     public static function isValidHttpUrl(string $url): bool
555 555
     {
556 556
         if (!GeneralUtility::isValidUrl($url)) {
557
-            return false;
557
+            return FALSE;
558 558
         }
559 559
 
560 560
         try {
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
             return !empty($uri->getScheme());
563 563
         } catch (\InvalidArgumentException $e) {
564 564
             self::log($e->getMessage(), LOG_SEVERITY_ERROR);
565
-            return false;
565
+            return FALSE;
566 566
         }
567 567
     }
568 568
 
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
      *
579 579
      * @return array Array of substituted "NEW..." identifiers and their actual UIDs.
580 580
      */
581
-    public static function processDatabaseAsAdmin(array $data = [], array $cmd = [], $reverseOrder = false, $cmdFirst = false)
581
+    public static function processDatabaseAsAdmin(array $data = [], array $cmd = [], $reverseOrder = FALSE, $cmdFirst = FALSE)
582 582
     {
583 583
         $context = GeneralUtility::makeInstance(Context::class);
584 584
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
             // Instantiate TYPO3 core engine.
590 590
             $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
591 591
             // We do not use workspaces and have to bypass restrictions in DataHandler.
592
-            $dataHandler->bypassWorkspaceRestrictions = true;
592
+            $dataHandler->bypassWorkspaceRestrictions = TRUE;
593 593
             // Load data and command arrays.
594 594
             $dataHandler->start($data, $cmd);
595 595
             // Process command map first if default order is reversed.
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
             ->where(
689 689
                 $queryBuilder->expr()->eq($table . '.pid', $pid),
690 690
                 $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($indexName)),
691
-                self::whereExpression($table, true)
691
+                self::whereExpression($table, TRUE)
692 692
             )
693 693
             ->setMaxResults(1)
694 694
             ->execute();
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
                     $queryBuilder->expr()->eq($table . '.pid', $pid),
705 705
                     $queryBuilder->expr()->eq($table . '.uid', $row['l18n_parent']),
706 706
                     $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId),
707
-                    self::whereExpression($table, true)
707
+                    self::whereExpression($table, TRUE)
708 708
                 )
709 709
                 ->setMaxResults(1)
710 710
                 ->execute();
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
                     ->where(
740 740
                         $queryBuilder->expr()->eq($table . '.pid', $pid),
741 741
                         $additionalWhere,
742
-                        self::whereExpression($table, true)
742
+                        self::whereExpression($table, TRUE)
743 743
                     )
744 744
                     ->setMaxResults(10000)
745 745
                     ->execute();
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
      *
782 782
      * @return string Additional WHERE expression
783 783
      */
784
-    public static function whereExpression(string $table, bool $showHidden = false): string
784
+    public static function whereExpression(string $table, bool $showHidden = FALSE): string
785 785
     {
786 786
         // TODO: Check with applicationType; TYPO3_MODE is removed in v12
787 787
         if (\TYPO3_MODE === 'FE') {
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
     public static function getUrl(string $url)
854 854
     {
855 855
         if (!Helper::isValidHttpUrl($url)) {
856
-            return false;
856
+            return FALSE;
857 857
         }
858 858
 
859 859
         // Get extension configuration.
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
             $response = $requestFactory->request($url, 'GET', $configuration);
872 872
         } catch (\Exception $e) {
873 873
             self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING);
874
-            return false;
874
+            return FALSE;
875 875
         }
876 876
         return $response->getBody()->getContents();
877 877
     }
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
  *
39 39
  * @access public
40 40
  */
41
-class Helper
42
-{
41
+class Helper {
43 42
     /**
44 43
      * @access public
45 44
      * @static
@@ -199,8 +198,7 @@  discard block
 block discarded – undo
199 198
      *
200 199
      * @return mixed The decrypted value or false on error
201 200
      */
202
-    public static function decrypt(string $encrypted)
203
-    {
201
+    public static function decrypt(string $encrypted) {
204 202
         if (
205 203
             !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(true))
206 204
             || !in_array(self::$hashAlgorithm, openssl_get_md_methods(true))
@@ -240,8 +238,7 @@  discard block
 block discarded – undo
240 238
      *
241 239
      * @return \SimpleXMLElement|false
242 240
      */
243
-    public static function getXmlFileAsString($content)
244
-    {
241
+    public static function getXmlFileAsString($content) {
245 242
         // Don't make simplexml_load_string throw (when $content is an array
246 243
         // or object)
247 244
         if (!is_string($content)) {
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
      *
314 311
      * @return mixed Hashed string or false on error
315 312
      */
316
-    public static function digest(string $string)
317
-    {
313
+    public static function digest(string $string) {
318 314
         if (!in_array(self::$hashAlgorithm, openssl_get_md_methods(true))) {
319 315
             self::log('OpenSSL library doesn\'t support hash algorithm', LOG_SEVERITY_ERROR);
320 316
             return false;
@@ -334,8 +330,7 @@  discard block
 block discarded – undo
334 330
      *
335 331
      * @return mixed Encrypted string or false on error
336 332
      */
337
-    public static function encrypt(string $string)
338
-    {
333
+    public static function encrypt(string $string) {
339 334
         if (
340 335
             !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(true))
341 336
             || !in_array(self::$hashAlgorithm, openssl_get_md_methods(true))
@@ -578,8 +573,7 @@  discard block
 block discarded – undo
578 573
      *
579 574
      * @return array Array of substituted "NEW..." identifiers and their actual UIDs.
580 575
      */
581
-    public static function processDatabaseAsAdmin(array $data = [], array $cmd = [], $reverseOrder = false, $cmdFirst = false)
582
-    {
576
+    public static function processDatabaseAsAdmin(array $data = [], array $cmd = [], $reverseOrder = false, $cmdFirst = false) {
583 577
         $context = GeneralUtility::makeInstance(Context::class);
584 578
 
585 579
         if (
@@ -818,8 +812,7 @@  discard block
 block discarded – undo
818 812
      *
819 813
      * @return void
820 814
      */
821
-    private function __construct()
822
-    {
815
+    private function __construct() {
823 816
         // This is a static class, thus no instances should be created.
824 817
     }
825 818
 
@@ -850,8 +843,7 @@  discard block
 block discarded – undo
850 843
      *
851 844
      * @return string|bool
852 845
      */
853
-    public static function getUrl(string $url)
854
-    {
846
+    public static function getUrl(string $url) {
855 847
         if (!Helper::isValidHttpUrl($url)) {
856 848
             return false;
857 849
         }
@@ -932,8 +924,7 @@  discard block
 block discarded – undo
932 924
      *
933 925
      * @return mixed
934 926
      */
935
-    private static function getLocalConfigurationByPath(string $path)
936
-    {
927
+    private static function getLocalConfigurationByPath(string $path) {
937 928
         $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
938 929
 
939 930
         if (array_key_exists(strtok($path, '/'), $configurationManager->getLocalConfiguration())) {
Please login to merge, or discard this patch.
Classes/Common/Solr/SearchResult/Region.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @access public
22 22
  */
23
-class Region
24
-{
23
+class Region {
25 24
 
26 25
     /**
27 26
      * @access private
@@ -87,8 +86,7 @@  discard block
 block discarded – undo
87 86
      *
88 87
      * @return void
89 88
      */
90
-    public function __construct(int $id, array $region)
91
-    {
89
+    public function __construct(int $id, array $region) {
92 90
         $this->id = $id;
93 91
         $this->pageId = $region['pageIdx'] ?? null;
94 92
         $this->xBeginPosition = $region['ulx'];
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     public function __construct(int $id, array $region)
91 91
     {
92 92
         $this->id = $id;
93
-        $this->pageId = $region['pageIdx'] ?? null;
93
+        $this->pageId = $region['pageIdx'] ?? NULL;
94 94
         $this->xBeginPosition = $region['ulx'];
95 95
         $this->xEndPosition = $region['lrx'];
96 96
         $this->yBeginPosition = $region['uly'];
Please login to merge, or discard this patch.
Classes/Task/IndexAdditionalFieldProvider.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
 
60 60
         // Text field for document URL
61 61
         $fieldName = 'doc';
62
-        $fieldId = 'task_' . $fieldName;
63
-        $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >';
62
+        $fieldId = 'task_'.$fieldName;
63
+        $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >';
64 64
         $additionalFields[$fieldId] = [
65 65
             'code' => $fieldHtml,
66 66
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.doc',
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @access public
25 25
  */
26
-class IndexAdditionalFieldProvider extends BaseAdditionalFieldProvider
27
-{
26
+class IndexAdditionalFieldProvider extends BaseAdditionalFieldProvider {
28 27
     /**
29 28
      * Gets additional fields to render in the form to add/edit a task
30 29
      *
@@ -33,8 +32,7 @@  discard block
 block discarded – undo
33 32
      * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
34 33
      * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
35 34
      */
36
-    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
37
-    {
35
+    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) {
38 36
         $currentSchedulerModuleAction = $schedulerModule->getCurrentAction();
39 37
 
40 38
         /** @var BaseTask $task */
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             $taskInfo['solr'] = $task->getSolr();
46 46
             $taskInfo['owner'] = $task->getOwner();
47 47
         } else {
48
-            $taskInfo['dryRun'] = false;
48
+            $taskInfo['dryRun'] = FALSE;
49 49
             $taskInfo['doc'] = 'https://';
50 50
             $taskInfo['pid'] = - 1;
51 51
             $taskInfo['solr'] = - 1;
Please login to merge, or discard this patch.
Classes/Task/HarvestAdditionalFieldProvider.php 3 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
 
66 66
         // Text field for library
67 67
         $fieldName = 'lib';
68
-        $fieldId = 'task_' . $fieldName;
68
+        $fieldId = 'task_'.$fieldName;
69 69
 
70 70
         $allLibraries = $this->getLibraries($taskInfo['pid']);
71 71
         $options = [];
72 72
         $options[] = '<option value="-1"></option>';
73 73
         foreach ($allLibraries as $label => $uid) {
74
-            $options[] = '<option value="' . $uid . '" ' . ($taskInfo['lib'] == $uid ? 'selected' : '') . ' >' . $label . '</option>';
74
+            $options[] = '<option value="'.$uid.'" '.($taskInfo['lib'] == $uid ? 'selected' : '').' >'.$label.'</option>';
75 75
         }
76 76
 
77
-        $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>';
77
+        $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>';
78 78
         $additionalFields[$fieldId] = [
79 79
             'code' => $fieldHtml,
80 80
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.lib',
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 
91 91
         // Text field for from
92 92
         $fieldName = 'from';
93
-        $fieldId = 'task_' . $fieldName;
94
-        $fieldHtml = '<input type="date" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >';
93
+        $fieldId = 'task_'.$fieldName;
94
+        $fieldHtml = '<input type="date" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >';
95 95
         $additionalFields[$fieldId] = [
96 96
             'code' => $fieldHtml,
97 97
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.from',
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 
102 102
         // Text field for until
103 103
         $fieldName = 'until';
104
-        $fieldId = 'task_' . $fieldName;
105
-        $fieldHtml = '<input type="date" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >';
104
+        $fieldId = 'task_'.$fieldName;
105
+        $fieldHtml = '<input type="date" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >';
106 106
         $additionalFields[$fieldId] = [
107 107
             'code' => $fieldHtml,
108 108
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.until',
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 
113 113
         // Text field for set
114 114
         $fieldName = 'set';
115
-        $fieldId = 'task_' . $fieldName;
116
-        $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >';
115
+        $fieldId = 'task_'.$fieldName;
116
+        $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >';
117 117
         $additionalFields[$fieldId] = [
118 118
             'code' => $fieldHtml,
119 119
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.set',
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * @access public
27 27
  */
28
-class HarvestAdditionalFieldProvider extends BaseAdditionalFieldProvider
29
-{
28
+class HarvestAdditionalFieldProvider extends BaseAdditionalFieldProvider {
30 29
     /**
31 30
      * Gets additional fields to render in the form to add/edit a task
32 31
      *
@@ -35,8 +34,7 @@  discard block
 block discarded – undo
35 34
      * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
36 35
      * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
37 36
      */
38
-    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
39
-    {
37
+    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) {
40 38
         $currentSchedulerModuleAction = $schedulerModule->getCurrentAction();
41 39
 
42 40
         /** @var BaseTask $task */
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $taskInfo['until'] = $task->getUntil();
50 50
             $taskInfo['set'] = $task->getSet();
51 51
         } else {
52
-            $taskInfo['dryRun'] = false;
52
+            $taskInfo['dryRun'] = FALSE;
53 53
             $taskInfo['lib'] = - 1;
54 54
             $taskInfo['pid'] = - 1;
55 55
             $taskInfo['solr'] = - 1;
Please login to merge, or discard this patch.
Classes/Task/ReindexTask.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,8 @@
 block discarded – undo
23 23
  *
24 24
  * @access public
25 25
  */
26
-class ReindexTask extends BaseTask
27
-{
28
-    public function execute()
29
-    {
26
+class ReindexTask extends BaseTask {
27
+    public function execute() {
30 28
         $inputArray = [];
31 29
         if ($this->dryRun) {
32 30
             $inputArray['--dry-run'] = true;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $inputArray = [];
31 31
         if ($this->dryRun) {
32
-            $inputArray['--dry-run'] = true;
32
+            $inputArray['--dry-run'] = TRUE;
33 33
         }
34 34
         if (count($this->coll)) {
35 35
             $inputArray['-c'] = implode(',', $this->coll);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $inputArray['-o'] = $this->owner;
41 41
         }
42 42
         if ($this->all) {
43
-            $inputArray['--all'] = true;
43
+            $inputArray['--all'] = TRUE;
44 44
         }
45 45
 
46 46
         $reindexCommand = GeneralUtility::makeInstance(\Kitodo\Dlf\Command\ReindexCommand::class);
Please login to merge, or discard this patch.
Classes/Task/BaseAdditionalFieldProvider.php 3 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         if (isset($submittedData['doc']) && empty($submittedData['doc'])) {
64 64
             Helper::addMessage(
65
-                Helper::getLanguageService()->getLL('additionalFields.doc') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
65
+                Helper::getLanguageService()->getLL('additionalFields.doc').' '.Helper::getLanguageService()->getLL('additionalFields.valid'),
66 66
                 $messageTitle,
67 67
                 $messageSeverity,
68 68
                 true,
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         if ((isset($submittedData['pid']) && (int) $submittedData['pid'] <= 0) || !isset($submittedData['pid'])) {
75 75
             Helper::addMessage(
76
-                Helper::getLanguageService()->getLL('additionalFields.pid') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
76
+                Helper::getLanguageService()->getLL('additionalFields.pid').' '.Helper::getLanguageService()->getLL('additionalFields.valid'),
77 77
                 $messageTitle,
78 78
                 $messageSeverity,
79 79
                 true,
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
         if ((isset($submittedData['lib']) && (int) $submittedData['lib'] <= 0)) {
91 91
             Helper::addMessage(
92
-                Helper::getLanguageService()->getLL('additionalFields.lib') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
92
+                Helper::getLanguageService()->getLL('additionalFields.lib').' '.Helper::getLanguageService()->getLL('additionalFields.valid'),
93 93
                 $messageTitle,
94 94
                 $messageSeverity,
95 95
                 true,
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         if ((isset($submittedData['solr']) && (int) $submittedData['solr'] <= 0) || !isset($submittedData['solr'])) {
102 102
             Helper::addMessage(
103
-                Helper::getLanguageService()->getLL('additionalFields.solr') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
103
+                Helper::getLanguageService()->getLL('additionalFields.solr').' '.Helper::getLanguageService()->getLL('additionalFields.valid'),
104 104
                 $messageTitle,
105 105
                 $messageSeverity,
106 106
                 true,
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
     protected function getDryRunField(bool $dryRun): array
179 179
     {
180 180
         $fieldName = 'dryRun';
181
-        $fieldId = 'task_' . $fieldName;
182
-        $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($dryRun ? ' checked="checked"' : '') . '>';
181
+        $fieldId = 'task_'.$fieldName;
182
+        $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($dryRun ? ' checked="checked"' : '').'>';
183 183
         return [
184 184
             'code' => $fieldHtml,
185 185
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.dryRun',
@@ -201,15 +201,15 @@  discard block
 block discarded – undo
201 201
     protected function getSolrField(int $solr, int $pid): array
202 202
     {
203 203
         $fieldName = 'solr';
204
-        $fieldId = 'task_' . $fieldName;
204
+        $fieldId = 'task_'.$fieldName;
205 205
 
206 206
         $allSolrCores = $this->getSolrCores($pid);
207 207
         $options = [];
208 208
         $options[] = '<option value="-1"></option>';
209 209
         foreach ($allSolrCores as $label => $uid) {
210
-            $options[] = '<option value="' . $uid . '" ' . ($solr == $uid ? 'selected' : '') . ' >' . $label . '</option>';
210
+            $options[] = '<option value="'.$uid.'" '.($solr == $uid ? 'selected' : '').' >'.$label.'</option>';
211 211
         };
212
-        $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>';
212
+        $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>';
213 213
         return [
214 214
             'code' => $fieldHtml,
215 215
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.solr',
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     protected function getPidField(int $pid): array
231 231
     {
232 232
         $fieldName = 'pid';
233
-        $fieldId = 'task_' . $fieldName;
233
+        $fieldId = 'task_'.$fieldName;
234 234
 
235 235
         $pageRepository = GeneralUtility::makeInstance(PageTreeRepository::class);
236 236
         $pages = $pageRepository->getTree(0);
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
         $options = [];
239 239
         foreach ($pages['_children'] as $page) {
240 240
             if ($page['doktype'] == 254) {
241
-                $options[] = '<option value="' . $page['uid'] . '" ' . ($pid == $page['uid'] ? 'selected' : '') . ' >' . $page['title'] . '</option>';
241
+                $options[] = '<option value="'.$page['uid'].'" '.($pid == $page['uid'] ? 'selected' : '').' >'.$page['title'].'</option>';
242 242
             }
243 243
         }
244 244
 
245
-        $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>';
245
+        $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>';
246 246
         return [
247 247
             'code' => $fieldHtml,
248 248
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.pid',
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
     protected function getOwnerField(string $owner): array
264 264
     {
265 265
         $fieldName = 'owner';
266
-        $fieldId = 'task_' . $fieldName;
267
-        $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $owner . '" >';
266
+        $fieldId = 'task_'.$fieldName;
267
+        $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$owner.'" >';
268 268
         return [
269 269
             'code' => $fieldHtml,
270 270
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.owner',
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  *
30 30
  * @access public
31 31
  */
32
-class BaseAdditionalFieldProvider implements AdditionalFieldProviderInterface
33
-{
32
+class BaseAdditionalFieldProvider implements AdditionalFieldProviderInterface {
34 33
     /**
35 34
      * Gets additional fields to render in the form to add/edit a task
36 35
      *
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
40 39
      * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
41 40
      */
42
-    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
43
-    {
41
+    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) {
44 42
         return [];
45 43
     }
46 44
 
@@ -51,8 +49,7 @@  discard block
 block discarded – undo
51 49
      * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
52 50
      * @return bool TRUE if validation was ok (or selected class is not relevant), FALSE otherwise
53 51
      */
54
-    public function validateAdditionalFields(array &$submittedData, SchedulerModuleController $schedulerModule)
55
-    {
52
+    public function validateAdditionalFields(array &$submittedData, SchedulerModuleController $schedulerModule) {
56 53
         $fieldsValid = true;
57 54
 
58 55
         Helper::getLanguageService()->includeLLFile('EXT:dlf/Resources/Private/Language/locallang_tasks.xlf');
@@ -130,8 +127,7 @@  discard block
 block discarded – undo
130 127
      * @param BaseTask $task Reference to the scheduler backend module
131 128
      * @return void
132 129
      */
133
-    public function saveAdditionalFields(array $submittedData, AbstractTask $task)
134
-    {
130
+    public function saveAdditionalFields(array $submittedData, AbstractTask $task) {
135 131
         /** @var BaseTask $task */
136 132
         $task->setDryRun(!empty($submittedData['dryRun']));
137 133
         if (isset($submittedData['doc'])) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function validateAdditionalFields(array &$submittedData, SchedulerModuleController $schedulerModule)
55 55
     {
56
-        $fieldsValid = true;
56
+        $fieldsValid = TRUE;
57 57
 
58 58
         Helper::getLanguageService()->includeLLFile('EXT:dlf/Resources/Private/Language/locallang_tasks.xlf');
59 59
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
                 Helper::getLanguageService()->getLL('additionalFields.doc') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
66 66
                 $messageTitle,
67 67
                 $messageSeverity,
68
-                true,
68
+                TRUE,
69 69
                 'core.template.flashMessages'
70 70
             );
71
-            $fieldsValid = false;
71
+            $fieldsValid = FALSE;
72 72
         }
73 73
 
74 74
         if ((isset($submittedData['pid']) && (int) $submittedData['pid'] <= 0) || !isset($submittedData['pid'])) {
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
                 Helper::getLanguageService()->getLL('additionalFields.pid') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
77 77
                 $messageTitle,
78 78
                 $messageSeverity,
79
-                true,
79
+                TRUE,
80 80
                 'core.template.flashMessages'
81 81
             );
82
-            $fieldsValid = false;
82
+            $fieldsValid = FALSE;
83 83
         }
84 84
 
85 85
         if (!$submittedData['uid']) {
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
                 Helper::getLanguageService()->getLL('additionalFields.lib') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
93 93
                 $messageTitle,
94 94
                 $messageSeverity,
95
-                true,
95
+                TRUE,
96 96
                 'core.template.flashMessages'
97 97
             );
98
-            $fieldsValid = false;
98
+            $fieldsValid = FALSE;
99 99
         }
100 100
 
101 101
         if ((isset($submittedData['solr']) && (int) $submittedData['solr'] <= 0) || !isset($submittedData['solr'])) {
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
                 Helper::getLanguageService()->getLL('additionalFields.solr') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
104 104
                 $messageTitle,
105 105
                 $messageSeverity,
106
-                true,
106
+                TRUE,
107 107
                 'core.template.flashMessages'
108 108
             );
109
-            $fieldsValid = false;
109
+            $fieldsValid = FALSE;
110 110
         }
111 111
 
112 112
         if (((isset($submittedData['coll']) && isset($submittedData['all'])) || (!isset($submittedData['coll']) && !isset($submittedData['all'])))
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
                 Helper::getLanguageService()->getLL('additionalFields.collOrAll'),
116 116
                 $messageTitle,
117 117
                 $messageSeverity,
118
-                true,
118
+                TRUE,
119 119
                 'core.template.flashMessages'
120 120
             );
121
-            $fieldsValid = false;
121
+            $fieldsValid = FALSE;
122 122
         }
123 123
         return $fieldsValid;
124 124
     }
Please login to merge, or discard this patch.
Classes/Task/HarvestTask.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,8 @@
 block discarded – undo
23 23
  *
24 24
  * @access public
25 25
  */
26
-class HarvestTask extends BaseTask
27
-{
28
-    public function execute()
29
-    {
26
+class HarvestTask extends BaseTask {
27
+    public function execute() {
30 28
         $inputArray = [];
31 29
         if ($this->dryRun) {
32 30
             $inputArray['--dry-run'] = true;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $inputArray = [];
31 31
         if ($this->dryRun) {
32
-            $inputArray['--dry-run'] = true;
32
+            $inputArray['--dry-run'] = TRUE;
33 33
         }
34 34
         $inputArray['-l'] = $this->lib;
35 35
         $inputArray['-p'] = $this->pid;
Please login to merge, or discard this patch.