Passed
Pull Request — master (#123)
by
unknown
11:14
created
Classes/Task/BaseTask.php 2 patches
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 BaseTask extends AbstractTask
27
-{
26
+class BaseTask extends AbstractTask {
28 27
 
29 28
     /**
30 29
      * @access protected
@@ -92,8 +91,7 @@  discard block
 block discarded – undo
92 91
      */
93 92
     protected string $set = '';
94 93
 
95
-    public function execute()
96
-    {
94
+    public function execute() {
97 95
         return true;
98 96
     }
99 97
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @access protected
31 31
      * @var bool
32 32
      */
33
-    protected bool $dryRun = false;
33
+    protected bool $dryRun = FALSE;
34 34
 
35 35
     /**
36 36
      * @access protected
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @access protected
73 73
      * @var bool
74 74
      */
75
-    protected bool $all = false;
75
+    protected bool $all = FALSE;
76 76
 
77 77
     /**
78 78
      * @access protected
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
     public function execute()
96 96
     {
97
-        return true;
97
+        return TRUE;
98 98
     }
99 99
 
100 100
     /**
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                 $message,
319 319
                 '',
320 320
                 $severity == FlashMessage::ERROR ? FlashMessage::ERROR : FlashMessage::OK,
321
-                true,
321
+                TRUE,
322 322
                 'core.template.flashMessages'
323 323
             );
324 324
         }
Please login to merge, or discard this patch.
Classes/Task/ReindexAdditionalFieldProvider.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 
64 64
         // Select for collection(s)
65 65
         $fieldName = 'coll';
66
-        $fieldId = 'task_' . $fieldName;
66
+        $fieldId = 'task_'.$fieldName;
67 67
         $options = $this->getCollOptions($taskInfo['coll'], $taskInfo['pid']);
68 68
         ;
69
-        $fieldHtml = '<select name="tx_scheduler[' . $fieldName . '][]" id="' . $fieldId . '" size="10" multiple="multiple">' . implode("\n", $options) . '</select>';
69
+        $fieldHtml = '<select name="tx_scheduler['.$fieldName.'][]" id="'.$fieldId.'" size="10" multiple="multiple">'.implode("\n", $options).'</select>';
70 70
         $additionalFields[$fieldId] = [
71 71
             'code' => $fieldHtml,
72 72
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.coll',
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 
86 86
         // Checkbox for all
87 87
         $fieldName = 'all';
88
-        $fieldId = 'task_' . $fieldName;
89
-        $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' .
90
-            ($taskInfo['all'] ? ' checked="checked"' : '') . '>';
88
+        $fieldId = 'task_'.$fieldName;
89
+        $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.
90
+            ($taskInfo['all'] ? ' checked="checked"' : '').'>';
91 91
         $additionalFields[$fieldId] = [
92 92
             'code' => $fieldHtml,
93 93
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.all',
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $options = [];
112 112
         $collections = $this->getCollections($pid);
113 113
         foreach ($collections as $label => $uid) {
114
-            $options[] = '<option value="' . $uid . '" ' . (in_array($uid, $coll) ? 'selected' : '') . ' >' . $label . '</option>';
114
+            $options[] = '<option value="'.$uid.'" '.(in_array($uid, $coll) ? 'selected' : '').' >'.$label.'</option>';
115 115
         }
116 116
         return $options;
117 117
     }
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 ReindexAdditionalFieldProvider extends BaseAdditionalFieldProvider
29
-{
28
+class ReindexAdditionalFieldProvider 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   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
             $taskInfo['owner'] = $task->getOwner();
49 49
             $taskInfo['all'] = $task->isAll();
50 50
         } else {
51
-            $taskInfo['dryRun'] = false;
51
+            $taskInfo['dryRun'] = FALSE;
52 52
             $taskInfo['coll'] = [];
53 53
             $taskInfo['pid'] = - 1;
54 54
             $taskInfo['solr'] = - 1;
55 55
             $taskInfo['owner'] = '';
56
-            $taskInfo['all'] = false;
56
+            $taskInfo['all'] = FALSE;
57 57
         }
58 58
 
59 59
         $additionalFields = [];
Please login to merge, or discard this patch.
ext_localconf.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 $_EXTKEY = 'dlf';
67 67
 // Register tools for toolbox plugin.
68 68
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = [];
69
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool';
70
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool';
71
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool';
72
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool';
73
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool';
74
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool';
75
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool';
69
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool';
70
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool';
71
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool';
72
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool';
73
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool';
74
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool';
75
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool';
76 76
 // Register hooks.
77 77
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
78 78
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 ];
99 99
 // Register AJAX eID handlers.
100 100
 if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) {
101
-    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
101
+    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main';
102 102
 }
103 103
 // Use Caching Framework for Solr queries
104 104
 $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] ??= [];
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
     'additionalFields' => \Kitodo\Dlf\Task\HarvestAdditionalFieldProvider::class,
98 98
 ];
99 99
 // Register AJAX eID handlers.
100
-if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) {
100
+if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? FALSE) {
101 101
     $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
102 102
 }
103 103
 // Use Caching Framework for Solr queries
Please login to merge, or discard this patch.
Classes/Controller/View3DController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $this->view->assign('is3DViewer', $this->is3dViewer($this->requestData['model']));
37 37
             $embedded3DViewerUrl = $this->buildEmbedded3dViewerUrl($this->requestData['model']);
38 38
             if (!empty($this->requestData['viewer'])) {
39
-                $embedded3DViewerUrl .= '&viewer=' . $this->requestData['viewer'];
39
+                $embedded3DViewerUrl .= '&viewer='.$this->requestData['viewer'];
40 40
             }
41 41
             $this->view->assign('embedded3DViewerUrl', $embedded3DViewerUrl);
42 42
             return;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function buildEmbedded3dViewerUrl(string $model): string
74 74
     {
75
-        return self::MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX . '&model=' . $model;
75
+        return self::MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX.'&model='.$model;
76 76
     }
77 77
 
78 78
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
  *
20 20
  * @access public
21 21
  */
22
-class View3DController extends AbstractController
23
-{
22
+class View3DController extends AbstractController {
24 23
 
25 24
     const MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX = '/?middleware=dlf/embedded3DViewer';
26 25
 
Please login to merge, or discard this patch.
Classes/Middleware/Embedded3DViewer.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $modelInfo = PathUtility::pathinfo($parameters['model']);
70 70
         $modelFormat = $modelInfo["extension"];
71 71
         if (empty($modelFormat)) {
72
-            return $this->warningResponse('Model path "' . $parameters['model'] . '" has no extension format', $request);
72
+            return $this->warningResponse('Model path "'.$parameters['model'].'" has no extension format', $request);
73 73
         }
74 74
 
75 75
         if (empty($parameters['viewer'])) {
@@ -88,30 +88,30 @@  discard block
 block discarded – undo
88 88
         $defaultStorage = $storageRepository->getDefaultStorage();
89 89
 
90 90
         if (!$defaultStorage->hasFolder(self::VIEWER_FOLDER)) {
91
-            return $this->errorResponse('Required folder "' . self::VIEWER_FOLDER . '" was not found in the default storage "' . $defaultStorage->getName() . '"', $request);
91
+            return $this->errorResponse('Required folder "'.self::VIEWER_FOLDER.'" was not found in the default storage "'.$defaultStorage->getName().'"', $request);
92 92
         }
93 93
 
94 94
         $viewerModules = $defaultStorage->getFolder(self::VIEWER_FOLDER);
95 95
         if (!$viewerModules->hasFolder($viewer)) {
96
-            return $this->errorResponse('Viewer folder "' . $viewer . '" was not found under the folder "' . self::VIEWER_FOLDER . '"', $request);
96
+            return $this->errorResponse('Viewer folder "'.$viewer.'" was not found under the folder "'.self::VIEWER_FOLDER.'"', $request);
97 97
         }
98 98
 
99 99
         $viewerFolder = $viewerModules->getSubfolder($viewer);
100 100
         if (!$viewerFolder->hasFile(self::VIEWER_CONFIG_YML)) {
101
-            return $this->errorResponse('Viewer folder "' . $viewer . '" does not contain a file named "' . self::VIEWER_CONFIG_YML . '"', $request);
101
+            return $this->errorResponse('Viewer folder "'.$viewer.'" does not contain a file named "'.self::VIEWER_CONFIG_YML.'"', $request);
102 102
         }
103 103
 
104 104
         /** @var YamlFileLoader $yamlFileLoader */
105 105
         $yamlFileLoader = GeneralUtility::makeInstance(YamlFileLoader::class);
106
-        $viewerConfigPath = $defaultStorage->getName() . "/" . self::VIEWER_FOLDER . "/" . $viewer . "/";
107
-        $config = $yamlFileLoader->load($viewerConfigPath . self::VIEWER_CONFIG_YML)["viewer"];
106
+        $viewerConfigPath = $defaultStorage->getName()."/".self::VIEWER_FOLDER."/".$viewer."/";
107
+        $config = $yamlFileLoader->load($viewerConfigPath.self::VIEWER_CONFIG_YML)["viewer"];
108 108
 
109 109
         if (!isset($config["supportedModelFormats"]) || empty($config["supportedModelFormats"])) {
110
-            return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "' . self::VIEWER_CONFIG_YML . '" of viewer "' . $viewer . '" or has no value', $request);
110
+            return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "'.self::VIEWER_CONFIG_YML.'" of viewer "'.$viewer.'" or has no value', $request);
111 111
         }
112 112
 
113 113
         if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === false) {
114
-            return $this->warningResponse('Viewer "' . $viewer . '" does not support the model format "' . $modelFormat . '"', $request);
114
+            return $this->warningResponse('Viewer "'.$viewer.'" does not support the model format "'.$modelFormat.'"', $request);
115 115
         }
116 116
 
117 117
         $html = $this->getViewerHtml($config, $viewerConfigPath, $viewerFolder, $parameters['model'], $modelInfo);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
  * @subpackage dlf
35 35
  * @access public
36 36
  */
37
-class Embedded3DViewer implements MiddlewareInterface
38
-{
37
+class Embedded3DViewer implements MiddlewareInterface {
39 38
     use LoggerAwareTrait;
40 39
 
41 40
     const VIEWER_FOLDER = "dlf_3d_viewers";
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
             return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "' . self::VIEWER_CONFIG_YML . '" of viewer "' . $viewer . '" or has no value', $request);
111 111
         }
112 112
 
113
-        if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === false) {
113
+        if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === FALSE) {
114 114
             return $this->warningResponse('Viewer "' . $viewer . '" does not support the model format "' . $modelFormat . '"', $request);
115 115
         }
116 116
 
Please login to merge, or discard this patch.