Passed
Pull Request — master (#123)
by
unknown
04:25
created
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   +3 added lines, -3 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,10 +40,10 @@  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
         if (!empty($this->softCommit)) {
46
-            $inputArray['--softCommit'] = true;
46
+            $inputArray['--softCommit'] = TRUE;
47 47
         }
48 48
 
49 49
         $reindexCommand = GeneralUtility::makeInstance(\Kitodo\Dlf\Command\ReindexCommand::class);
Please login to merge, or discard this patch.
Classes/Task/BaseAdditionalFieldProvider.php 3 patches
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.
Spacing   +17 added lines, -17 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)) {
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,
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         if ((isset($submittedData['lib']) && (int) $submittedData['lib'] <= 0)) {
102 102
             Helper::addMessage(
103
-                Helper::getLanguageService()->getLL('additionalFields.lib') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
103
+                Helper::getLanguageService()->getLL('additionalFields.lib').' '.Helper::getLanguageService()->getLL('additionalFields.valid'),
104 104
                 $messageTitle,
105 105
                 $messageSeverity,
106 106
                 true,
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         if ((isset($submittedData['solr']) && (int) $submittedData['solr'] <= 0) || !isset($submittedData['solr'])) {
113 113
             Helper::addMessage(
114
-                Helper::getLanguageService()->getLL('additionalFields.solr') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
114
+                Helper::getLanguageService()->getLL('additionalFields.solr').' '.Helper::getLanguageService()->getLL('additionalFields.valid'),
115 115
                 $messageTitle,
116 116
                 $messageSeverity,
117 117
                 true,
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
     protected function getDryRunField(bool $dryRun): array
193 193
     {
194 194
         $fieldName = 'dryRun';
195
-        $fieldId = 'task_' . $fieldName;
196
-        $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($dryRun ? ' checked="checked"' : '') . '>';
195
+        $fieldId = 'task_'.$fieldName;
196
+        $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($dryRun ? ' checked="checked"' : '').'>';
197 197
         return [
198 198
             'code' => $fieldHtml,
199 199
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.dryRun',
@@ -215,15 +215,15 @@  discard block
 block discarded – undo
215 215
     protected function getSolrField(int $solr, int $pid = null): array
216 216
     {
217 217
         $fieldName = 'solr';
218
-        $fieldId = 'task_' . $fieldName;
218
+        $fieldId = 'task_'.$fieldName;
219 219
 
220 220
         $allSolrCores = $this->getSolrCores($pid);
221 221
         $options = [];
222 222
         $options[] = '<option value="-1"></option>';
223 223
         foreach ($allSolrCores as $label => $uid) {
224
-            $options[] = '<option value="' . $uid . '" ' . ($solr == $uid ? 'selected' : '') . ' >' . $label . '</option>';
224
+            $options[] = '<option value="'.$uid.'" '.($solr == $uid ? 'selected' : '').' >'.$label.'</option>';
225 225
         };
226
-        $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>';
226
+        $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>';
227 227
         return [
228 228
             'code' => $fieldHtml,
229 229
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.solr',
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     protected function getPidField(int $pid): array
245 245
     {
246 246
         $fieldName = 'pid';
247
-        $fieldId = 'task_' . $fieldName;
247
+        $fieldId = 'task_'.$fieldName;
248 248
 
249 249
         $pageRepository = GeneralUtility::makeInstance(PageTreeRepository::class);
250 250
         $pages = $pageRepository->getTree(0);
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
         $options = [];
253 253
         foreach ($pages['_children'] as $page) {
254 254
             if ($page['doktype'] == 254) {
255
-                $options[] = '<option value="' . $page['uid'] . '" ' . ($pid == $page['uid'] ? 'selected' : '') . ' >' . $page['title'] . '</option>';
255
+                $options[] = '<option value="'.$page['uid'].'" '.($pid == $page['uid'] ? 'selected' : '').' >'.$page['title'].'</option>';
256 256
             }
257 257
         }
258 258
 
259
-        $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>';
259
+        $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>';
260 260
         return [
261 261
             'code' => $fieldHtml,
262 262
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.pid',
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
     protected function getOwnerField(string $owner): array
278 278
     {
279 279
         $fieldName = 'owner';
280
-        $fieldId = 'task_' . $fieldName;
281
-        $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $owner . '" >';
280
+        $fieldId = 'task_'.$fieldName;
281
+        $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$owner.'" >';
282 282
         return [
283 283
             'code' => $fieldHtml,
284 284
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.owner',
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
         $result = $queryBuilder->execute();
313 313
 
314 314
         while ($record = $result->fetchAssociative()) {
315
-            $solrCores[$record['label'] . ' (' . $record['index_name'] . ')'] = $record['uid'];
315
+            $solrCores[$record['label'].' ('.$record['index_name'].')'] = $record['uid'];
316 316
         }
317 317
 
318 318
         return $solrCores;
@@ -330,8 +330,8 @@  discard block
 block discarded – undo
330 330
     protected function getSoftCommitField(bool $softCommit): array
331 331
     {
332 332
         $fieldName = 'softCommit';
333
-        $fieldId = 'task_' . $fieldName;
334
-        $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($softCommit ? ' checked="checked"' : '') . '>';
333
+        $fieldId = 'task_'.$fieldName;
334
+        $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($softCommit ? ' checked="checked"' : '').'>';
335 335
         return [
336 336
             'code' => $fieldHtml,
337 337
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.softCommit',
Please login to merge, or discard this patch.
Upper-Lower-Casing   +16 added lines, -16 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)) {
@@ -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 (!isset($submittedData['commit']) && !isset($submittedData['optimize']) && !isset($submittedData['pid']) && ($submittedData['class'] != 'Kitodo\Dlf\Task\SuggestBuildTask')) {
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
                 Helper::getLanguageService()->getLL('additionalFields.commitOrOptimize'),
88 88
                 $messageTitle,
89 89
                 $messageSeverity,
90
-                true,
90
+                TRUE,
91 91
                 'core.template.flashMessages'
92 92
             );
93
-            $fieldsValid = false;
93
+            $fieldsValid = FALSE;
94 94
         }
95 95
 
96 96
         if (!$submittedData['uid']) {
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
                 Helper::getLanguageService()->getLL('additionalFields.lib') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
104 104
                 $messageTitle,
105 105
                 $messageSeverity,
106
-                true,
106
+                TRUE,
107 107
                 'core.template.flashMessages'
108 108
             );
109
-            $fieldsValid = $messageSeverity === FlashMessage::ERROR ? false : $fieldsValid;
109
+            $fieldsValid = $messageSeverity === FlashMessage::ERROR ? FALSE : $fieldsValid;
110 110
         }
111 111
 
112 112
         if ((isset($submittedData['solr']) && (int) $submittedData['solr'] <= 0) || !isset($submittedData['solr'])) {
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
                 Helper::getLanguageService()->getLL('additionalFields.solr') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'),
115 115
                 $messageTitle,
116 116
                 $messageSeverity,
117
-                true,
117
+                TRUE,
118 118
                 'core.template.flashMessages'
119 119
             );
120
-            $fieldsValid = $messageSeverity === FlashMessage::ERROR ? false : $fieldsValid;
120
+            $fieldsValid = $messageSeverity === FlashMessage::ERROR ? FALSE : $fieldsValid;
121 121
         }
122 122
 
123 123
         if (((isset($submittedData['coll']) && isset($submittedData['all'])) || (!isset($submittedData['coll']) && !isset($submittedData['all'])))
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
                 Helper::getLanguageService()->getLL('additionalFields.collOrAll'),
127 127
                 $messageTitle,
128 128
                 $messageSeverity,
129
-                true,
129
+                TRUE,
130 130
                 'core.template.flashMessages'
131 131
             );
132
-            $fieldsValid = $messageSeverity === FlashMessage::ERROR ? false : $fieldsValid;
132
+            $fieldsValid = $messageSeverity === FlashMessage::ERROR ? FALSE : $fieldsValid;
133 133
         }
134 134
         return $fieldsValid;
135 135
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      *
213 213
      * @return array additional field solr dropdown
214 214
      */
215
-    protected function getSolrField(int $solr, int $pid = null): array
215
+    protected function getSolrField(int $solr, int $pid = NULL): array
216 216
     {
217 217
         $fieldName = 'solr';
218 218
         $fieldId = 'task_' . $fieldName;
@@ -296,14 +296,14 @@  discard block
 block discarded – undo
296 296
      *
297 297
      * @return array Array of valid Solr cores
298 298
      */
299
-    private function getSolrCores(int $pid = null): array
299
+    private function getSolrCores(int $pid = NULL): array
300 300
     {
301 301
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_dlf_solrcores');
302 302
 
303 303
         $solrCores = [];
304 304
         $result = $queryBuilder->select('uid', 'label', 'index_name')
305 305
             ->from('tx_dlf_solrcores');
306
-        if ($pid !== null) {
306
+        if ($pid !== NULL) {
307 307
             $queryBuilder->where(
308 308
                 $queryBuilder->expr()
309 309
                     ->eq('pid', $queryBuilder->createNamedParameter((int) $pid, Connection::PARAM_INT))
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   +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
         $inputArray['-l'] = $this->lib;
35 35
         $inputArray['-p'] = $this->pid;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             $inputArray['--set'] = $this->set;
45 45
         }
46 46
         if (!empty($this->softCommit)) {
47
-            $inputArray['--softCommit'] = true;
47
+            $inputArray['--softCommit'] = TRUE;
48 48
         }
49 49
 
50 50
         $harvestCommand = GeneralUtility::makeInstance(\Kitodo\Dlf\Command\HarvestCommand::class);
Please login to merge, or discard this patch.
Classes/Task/IndexTask.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 IndexTask extends BaseTask
27
-{
28
-    public function execute()
29
-    {
26
+class IndexTask 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
         $inputArray['-d'] = $this->doc;
35 35
         $inputArray['-p'] = $this->pid;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $inputArray['-o'] = $this->owner;
39 39
         }
40 40
         if (!empty($this->softCommit)) {
41
-            $inputArray['--softCommit'] = true;
41
+            $inputArray['--softCommit'] = TRUE;
42 42
         }
43 43
 
44 44
         $indexCommand = GeneralUtility::makeInstance(\Kitodo\Dlf\Command\IndexCommand::class);
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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@
 block discarded – undo
49 49
             $taskInfo['all'] = $task->isAll();
50 50
             $taskInfo['softCommit'] = $task->isSoftCommit();
51 51
         } else {
52
-            $taskInfo['dryRun'] = false;
52
+            $taskInfo['dryRun'] = FALSE;
53 53
             $taskInfo['coll'] = [];
54 54
             $taskInfo['pid'] = - 1;
55 55
             $taskInfo['solr'] = - 1;
56 56
             $taskInfo['owner'] = '';
57
-            $taskInfo['all'] = false;
58
-            $taskInfo['softCommit'] = false;
57
+            $taskInfo['all'] = FALSE;
58
+            $taskInfo['softCommit'] = FALSE;
59 59
         }
60 60
 
61 61
         $additionalFields = [];
Please login to merge, or discard this patch.
Classes/Domain/Model/AnnotationTarget.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
  * LICENSE.txt file that was distributed with this source code.
13 13
  */
14 14
 
15
-class AnnotationTarget
16
-{
15
+class AnnotationTarget {
17 16
     /**
18 17
      * @var string
19 18
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      */
40 39
     protected $rangeValue;
41 40
 
42
-    public function __construct($url)
43
-    {
41
+    public function __construct($url) {
44 42
         $this->url = $url;
45 43
 
46 44
         $path = parse_url($url, PHP_URL_PATH);
@@ -65,40 +63,35 @@  discard block
 block discarded – undo
65 63
     /**
66 64
      * @return string
67 65
      */
68
-    public function getObjectId()
69
-    {
66
+    public function getObjectId() {
70 67
         return $this->objectId;
71 68
     }
72 69
 
73 70
     /**
74 71
      * @return string
75 72
      */
76
-    public function getId()
77
-    {
73
+    public function getId() {
78 74
         return $this->id;
79 75
     }
80 76
 
81 77
     /**
82 78
      * @return string
83 79
      */
84
-    public function getRangeParameterName()
85
-    {
80
+    public function getRangeParameterName() {
86 81
         return $this->rangeParameterName;
87 82
     }
88 83
 
89 84
     /**
90 85
      * @return string
91 86
      */
92
-    public function getRangeValue()
93
-    {
87
+    public function getRangeValue() {
94 88
         return $this->rangeValue;
95 89
     }
96 90
 
97 91
     /**
98 92
      * @return bool
99 93
      */
100
-    public function isValid()
101
-    {
94
+    public function isValid() {
102 95
         if (empty($this->getObjectId())) {
103 96
             return false;
104 97
         }
@@ -113,8 +106,7 @@  discard block
 block discarded – undo
113 106
     /**
114 107
      * @return bool
115 108
      */
116
-    public function isValidRange()
117
-    {
109
+    public function isValidRange() {
118 110
         if (empty($this->rangeParameterName) && empty($this->rangeValue)) {
119 111
             return true;
120 112
         } elseif ($this->isFacsimileRange()) {
@@ -131,24 +123,21 @@  discard block
 block discarded – undo
131 123
     /**
132 124
      * @return bool
133 125
      */
134
-    public function isScoreRange()
135
-    {
126
+    public function isScoreRange() {
136 127
         return $this->getRangeParameterName() === 'measureRanges';
137 128
     }
138 129
 
139 130
     /**
140 131
      * @return bool
141 132
      */
142
-    public function isAudioRange()
143
-    {
133
+    public function isAudioRange() {
144 134
         return $this->getRangeParameterName() === 't';
145 135
     }
146 136
 
147 137
     /**
148 138
      * @return bool
149 139
      */
150
-    public function isFacsimileRange()
151
-    {
140
+    public function isFacsimileRange() {
152 141
         return $this->getRangeParameterName() === 'xywh';
153 142
     }
154 143
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
     public function isValid()
101 101
     {
102 102
         if (empty($this->getObjectId())) {
103
-            return false;
103
+            return FALSE;
104 104
         }
105 105
 
106 106
         if (parse_url($this->getUrl(), PHP_URL_FRAGMENT)) {
107 107
             return !empty($this->getId()) && $this->isValidRange();
108 108
         }
109 109
 
110
-        return true;
110
+        return TRUE;
111 111
     }
112 112
 
113 113
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function isValidRange()
117 117
     {
118 118
         if (empty($this->rangeParameterName) && empty($this->rangeValue)) {
119
-            return true;
119
+            return TRUE;
120 120
         } elseif ($this->isFacsimileRange()) {
121 121
             return preg_match("/^(\d+)(,\d+){3}?$/", $this->rangeValue) === 1;
122 122
         } elseif ($this->isAudioRange()) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             return preg_match("/^((\d+|start|end|all|(\d+|start)(-(\d+|end)){0,1})+)(,(\d+|start|end|all|(\d+|start)(-(\d+|end)){0,1})+){0,}?$/", $this->rangeValue) === 1;
126 126
         }
127 127
 
128
-        return false;
128
+        return FALSE;
129 129
     }
130 130
 
131 131
     /**
Please login to merge, or discard this patch.
Classes/Domain/Model/Annotation.php 2 patches
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
  * LICENSE.txt file that was distributed with this source code.
13 13
  */
14 14
 
15
-class Annotation
16
-{
15
+class Annotation {
17 16
     /**
18 17
      * The complete data of the annotation
19 18
      *
@@ -30,8 +29,7 @@  discard block
 block discarded – undo
30 29
     /**
31 30
      * @param array $data
32 31
      */
33
-    public function __construct($data)
34
-    {
32
+    public function __construct($data) {
35 33
         $this->data = $data;
36 34
     }
37 35
 
@@ -40,8 +38,7 @@  discard block
 block discarded – undo
40 38
      *
41 39
      * @return array
42 40
      */
43
-    public function getRawData()
44
-    {
41
+    public function getRawData() {
45 42
         return $this->data;
46 43
     }
47 44
 
@@ -50,8 +47,7 @@  discard block
 block discarded – undo
50 47
      *
51 48
      * @return string
52 49
      */
53
-    public function getId()
54
-    {
50
+    public function getId() {
55 51
         return $this->data['id'] ?? '';
56 52
     }
57 53
 
@@ -60,8 +56,7 @@  discard block
 block discarded – undo
60 56
      *
61 57
      * @return string
62 58
      */
63
-    public function getTitle()
64
-    {
59
+    public function getTitle() {
65 60
         return $this->data['title'] ?? '';
66 61
     }
67 62
 
@@ -70,8 +65,7 @@  discard block
 block discarded – undo
70 65
      *
71 66
      * @return array
72 67
      */
73
-    public function getBody()
74
-    {
68
+    public function getBody() {
75 69
         $body = $this->data['body'] ?? '';
76 70
 
77 71
         if (is_array($body)) {
@@ -85,8 +79,7 @@  discard block
 block discarded – undo
85 79
      * Gets the name of the annotation creator
86 80
      * @return string
87 81
      */
88
-    public function getCreatorName()
89
-    {
82
+    public function getCreatorName() {
90 83
         return $this->data['creator']['displayName'] ?? '';
91 84
     }
92 85
 
@@ -94,8 +87,7 @@  discard block
 block discarded – undo
94 87
      * Gets the creation date of the annotation
95 88
      * @return string
96 89
      */
97
-    public function getCreated()
98
-    {
90
+    public function getCreated() {
99 91
         return $this->data['created'] ?? '';
100 92
     }
101 93
 
@@ -103,8 +95,7 @@  discard block
 block discarded – undo
103 95
      * Gets the modification date of the annotation
104 96
      * @return string
105 97
      */
106
-    public function getModified()
107
-    {
98
+    public function getModified() {
108 99
         return $this->data['modified'] ?? '';
109 100
     }
110 101
 
@@ -113,8 +104,7 @@  discard block
 block discarded – undo
113 104
      *
114 105
      * @return AnnotationTarget[]
115 106
      */
116
-    public function getTargets()
117
-    {
107
+    public function getTargets() {
118 108
         if (is_string($this->data['target'])) {
119 109
             return [new AnnotationTarget($this->data['target'])];
120 110
         }
@@ -133,8 +123,7 @@  discard block
 block discarded – undo
133 123
      * @param array $targetPages
134 124
      * @return void
135 125
      */
136
-    public function setTargetPages($targetPages)
137
-    {
126
+    public function setTargetPages($targetPages) {
138 127
         $this->targetPages = $targetPages;
139 128
     }
140 129
 
@@ -143,8 +132,7 @@  discard block
 block discarded – undo
143 132
      *
144 133
      * @return array
145 134
      */
146
-    public function getTargetPages()
147
-    {
135
+    public function getTargetPages() {
148 136
         return $this->targetPages;
149 137
     }
150 138
 
@@ -153,8 +141,7 @@  discard block
 block discarded – undo
153 141
      *
154 142
      * @return array
155 143
      */
156
-    public function getPageNumbers()
157
-    {
144
+    public function getPageNumbers() {
158 145
         $pages = [];
159 146
         if (is_array($this->targetPages)) {
160 147
             foreach ($this->targetPages as $target) {
@@ -170,8 +157,7 @@  discard block
 block discarded – undo
170 157
      *
171 158
      * @return array
172 159
      */
173
-    public function getPageTargets()
174
-    {
160
+    public function getPageTargets() {
175 161
         $pageTargets = [];
176 162
         if (is_array($this->targetPages)) {
177 163
             foreach ($this->targetPages as $target) {
@@ -189,8 +175,7 @@  discard block
 block discarded – undo
189 175
      *
190 176
      * @return array
191 177
      */
192
-    public function getPageAudioRanges()
193
-    {
178
+    public function getPageAudioRanges() {
194 179
         $ranges = [];
195 180
         if (is_array($this->getPageTargets())) {
196 181
             foreach ($this->getPageTargets() as $pageNumber => $targets) {
@@ -209,8 +194,7 @@  discard block
 block discarded – undo
209 194
      *
210 195
      * @return array
211 196
      */
212
-    public function getPageScoreRanges()
213
-    {
197
+    public function getPageScoreRanges() {
214 198
         $ranges = [];
215 199
         if (is_array($this->getPageTargets())) {
216 200
             foreach ($this->getPageTargets() as $pageNumber => $targets) {
@@ -229,8 +213,7 @@  discard block
 block discarded – undo
229 213
      *
230 214
      * @return array
231 215
      */
232
-    public function getPageFacsimileRanges()
233
-    {
216
+    public function getPageFacsimileRanges() {
234 217
         $ranges = [];
235 218
         if (is_array($this->getPageTargets())) {
236 219
             foreach ($this->getPageTargets() as $pageNumber => $targets) {
@@ -250,8 +233,7 @@  discard block
 block discarded – undo
250 233
      *
251 234
      * @return bool
252 235
      */
253
-    public function isVerovioRelevant()
254
-    {
236
+    public function isVerovioRelevant() {
255 237
         foreach ($this->targetPages as $target) {
256 238
             if (array_key_exists('verovioRelevant', $target) && $target['verovioRelevant']) {
257 239
                     return true;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -254,10 +254,10 @@
 block discarded – undo
254 254
     {
255 255
         foreach ($this->targetPages as $target) {
256 256
             if (array_key_exists('verovioRelevant', $target) && $target['verovioRelevant']) {
257
-                    return true;
257
+                    return TRUE;
258 258
             }
259 259
         }
260 260
 
261
-        return false;
261
+        return FALSE;
262 262
     }
263 263
 }
Please login to merge, or discard this patch.
Classes/Domain/Model/MetadataFormat.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
  *
31 31
  * @access public
32 32
  */
33
-class MetadataFormat extends AbstractEntity
34
-{
33
+class MetadataFormat extends AbstractEntity {
35 34
     /**
36 35
      * @access protected
37 36
      * @var int UID of the ``tx_dlf_metadata`` that is encoded by this metadata entry.
@@ -76,14 +75,12 @@  discard block
 block discarded – undo
76 75
     /**
77 76
      * constructor
78 77
      */
79
-    public function __construct()
80
-    {
78
+    public function __construct() {
81 79
         // Do not remove the next line: It would break the functionality
82 80
         $this->initStorageObjects();
83 81
     }
84 82
 
85
-    protected function initStorageObjects()
86
-    {
83
+    protected function initStorageObjects() {
87 84
         $this->subentries = new ObjectStorage();
88 85
     }
89 86
 
@@ -151,8 +148,7 @@  discard block
 block discarded – undo
151 148
         $this->xpathSorting = $xpathSorting;
152 149
     }
153 150
 
154
-    public function getSubentries()
155
-    {
151
+    public function getSubentries() {
156 152
         return $this->subentries;
157 153
     }
158 154
 
@@ -168,8 +164,7 @@  discard block
 block discarded – undo
168 164
      *
169 165
      * @return void
170 166
      */
171
-    public function addSubentry(MetadataSubentry $subentry)
172
-    {
167
+    public function addSubentry(MetadataSubentry $subentry) {
173 168
         $this->subentries->attach($subentry);
174 169
     }
175 170
 
@@ -180,8 +175,7 @@  discard block
 block discarded – undo
180 175
      *
181 176
      * @return void
182 177
      */
183
-    public function removeSubentry(MetadataSubentry $subentryToRemove)
184
-    {
178
+    public function removeSubentry(MetadataSubentry $subentryToRemove) {
185 179
         $this->subentries->detach($subentryToRemove);
186 180
     }
187 181
 
Please login to merge, or discard this patch.
Classes/Controller/ToolboxController.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class ToolboxController extends AbstractController
28
-{
27
+class ToolboxController extends AbstractController {
29 28
 
30 29
     /**
31 30
      * @access private
@@ -208,8 +207,7 @@  discard block
 block discarded – undo
208 207
      *
209 208
      * @return void
210 209
      */
211
-    public function renderScoreTool()
212
-    {
210
+    public function renderScoreTool() {
213 211
         if (
214 212
             $this->isDocMissingOrEmpty()
215 213
             || empty($this->extConf['files']['fileGrpScore'])
Please login to merge, or discard this patch.
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     private function renderToolByName(string $tool): void
121 121
     {
122 122
         $this->$tool();
123
-        $this->view->assign($tool, true);
123
+        $this->view->assign($tool, TRUE);
124 124
     }
125 125
 
126 126
     /**
@@ -142,12 +142,12 @@  discard block
 block discarded – undo
142 142
 
143 143
         $annotationContainers = $this->currentDocument->physicalStructureInfo[$this->currentDocument->physicalStructure[$this->requestData['page']]]['annotationContainers'];
144 144
         if (
145
-            $annotationContainers != null
145
+            $annotationContainers != NULL
146 146
             && count($annotationContainers) > 0
147 147
         ) {
148
-            $this->view->assign('annotationTool', true);
148
+            $this->view->assign('annotationTool', TRUE);
149 149
         } else {
150
-            $this->view->assign('annotationTool', false);
150
+            $this->view->assign('annotationTool', FALSE);
151 151
         }
152 152
     }
153 153
 
@@ -196,10 +196,10 @@  discard block
 block discarded – undo
196 196
         $this->setPage();
197 197
 
198 198
         if (!$this->isFullTextEmpty()) {
199
-            $this->view->assign('fulltext', true);
199
+            $this->view->assign('fulltext', TRUE);
200 200
             $this->view->assign('activateFullTextInitially', MathUtility::forceIntegerInRange($this->settings['activateFullTextInitially'], 0, 1, 0));
201 201
         } else {
202
-            $this->view->assign('fulltext', false);
202
+            $this->view->assign('fulltext', FALSE);
203 203
         }
204 204
     }
205 205
 
@@ -231,10 +231,10 @@  discard block
 block discarded – undo
231 231
             }
232 232
         }
233 233
         if (!empty($scoreFile)) {
234
-            $this->view->assign('score', true);
234
+            $this->view->assign('score', TRUE);
235 235
             $this->view->assign('activateScoreInitially', MathUtility::forceIntegerInRange($this->settings['activateScoreInitially'], 0, 1, 0));
236 236
         } else {
237
-            $this->view->assign('score', false);
237
+            $this->view->assign('score', FALSE);
238 238
         }
239 239
     }
240 240
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         // Set parent element for initialization.
321 321
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
322 322
 
323
-        $this->view->assign('imageManipulation', true);
323
+        $this->view->assign('imageManipulation', TRUE);
324 324
         $this->view->assign('parentContainer', $parentContainer);
325 325
     }
326 326
 
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     {
484 484
         $id = $this->document->getUid();
485 485
 
486
-        if ($id !== null && $id > 0) {
486
+        if ($id !== NULL && $id > 0) {
487 487
             // we found the document uid
488 488
             return (string) $id;
489 489
         } else {
@@ -539,9 +539,9 @@  discard block
 block discarded – undo
539 539
         while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
540 540
             $files = $this->currentDocument->physicalStructureInfo[$this->currentDocument->physicalStructure[$this->requestData['page']]]['files'];
541 541
             if (!empty($files[$fileGrpFulltext])) {
542
-                return false;
542
+                return FALSE;
543 543
             }
544 544
         }
545
-        return true;
545
+        return TRUE;
546 546
     }
547 547
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                         $this->renderToolByName('renderScoreTool');
107 107
                         break;
108 108
                     default:
109
-                        $this->logger->warning('Incorrect tool configuration: "' . $this->settings['tools'] . '". Tool "' . $tool . '" does not exist.');
109
+                        $this->logger->warning('Incorrect tool configuration: "'.$this->settings['tools'].'". Tool "'.$tool.'" does not exist.');
110 110
                 }
111 111
             }
112 112
         }
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                 $file['url'] = $this->currentDocument->getDownloadLocation($fileId);
319 319
                 $file['mimetype'] = $this->currentDocument->getFileMimeType($fileId);
320 320
             } else {
321
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
321
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
322 322
             }
323 323
         }
324 324
         return $file;
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             empty($firstPageLink)
427 427
             && empty($secondPageLink)
428 428
         ) {
429
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
429
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
430 430
         }
431 431
 
432 432
         if (!empty($firstPageLink)) {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             }
465 465
         }
466 466
         if (empty($workLink)) {
467
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
467
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
468 468
         }
469 469
         return $workLink;
470 470
     }
Please login to merge, or discard this patch.