@@ -96,8 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @return void |
98 | 98 | */ |
99 | - public function __construct(DocumentRepository $documentRepository, $collections, array $settings, array $searchParams, QueryResult $listedMetadata = null, QueryResult $indexedMetadata = null) |
|
100 | - { |
|
99 | + public function __construct(DocumentRepository $documentRepository, $collections, array $settings, array $searchParams, QueryResult $listedMetadata = null, QueryResult $indexedMetadata = null) { |
|
101 | 100 | $this->documentRepository = $documentRepository; |
102 | 101 | $this->collections = $collections; |
103 | 102 | $this->settings = $settings; |
@@ -217,8 +216,7 @@ discard block |
||
217 | 216 | * @return mixed |
218 | 217 | */ |
219 | 218 | #[\ReturnTypeWillChange] |
220 | - public function offsetGet($offset) |
|
221 | - { |
|
219 | + public function offsetGet($offset) { |
|
222 | 220 | $idx = $this->result['document_keys'][$offset]; |
223 | 221 | $document = $this->result['documents'][$idx] ?? null; |
224 | 222 | |
@@ -286,8 +284,7 @@ discard block |
||
286 | 284 | * |
287 | 285 | * @return mixed |
288 | 286 | */ |
289 | - public function getSolrResults() |
|
290 | - { |
|
287 | + public function getSolrResults() { |
|
291 | 288 | return $this->result['solrResults']; |
292 | 289 | } |
293 | 290 | |
@@ -300,8 +297,7 @@ discard block |
||
300 | 297 | * |
301 | 298 | * @return mixed |
302 | 299 | */ |
303 | - public function getByUid($uid) |
|
304 | - { |
|
300 | + public function getByUid($uid) { |
|
305 | 301 | return $this->result['documents'][$uid]; |
306 | 302 | } |
307 | 303 | |
@@ -312,8 +308,7 @@ discard block |
||
312 | 308 | * |
313 | 309 | * @return SolrSearchQuery |
314 | 310 | */ |
315 | - public function getQuery() |
|
316 | - { |
|
311 | + public function getQuery() { |
|
317 | 312 | return new SolrSearchQuery($this); |
318 | 313 | } |
319 | 314 | |
@@ -324,8 +319,7 @@ discard block |
||
324 | 319 | * |
325 | 320 | * @return SolrSearch |
326 | 321 | */ |
327 | - public function getFirst() |
|
328 | - { |
|
322 | + public function getFirst() { |
|
329 | 323 | return $this[0]; |
330 | 324 | } |
331 | 325 | |
@@ -336,8 +330,7 @@ discard block |
||
336 | 330 | * |
337 | 331 | * @return array |
338 | 332 | */ |
339 | - public function toArray() |
|
340 | - { |
|
333 | + public function toArray() { |
|
341 | 334 | return array_values($this->result['documents']); |
342 | 335 | } |
343 | 336 | |
@@ -350,8 +343,7 @@ discard block |
||
350 | 343 | * |
351 | 344 | * @return int |
352 | 345 | */ |
353 | - public function getNumFound() |
|
354 | - { |
|
346 | + public function getNumFound() { |
|
355 | 347 | return $this->result['numFound']; |
356 | 348 | } |
357 | 349 | |
@@ -362,8 +354,7 @@ discard block |
||
362 | 354 | * |
363 | 355 | * @return void |
364 | 356 | */ |
365 | - public function prepare() |
|
366 | - { |
|
357 | + public function prepare() { |
|
367 | 358 | // Prepare query parameters. |
368 | 359 | $params = []; |
369 | 360 | $matches = []; |
@@ -479,8 +470,7 @@ discard block |
||
479 | 470 | * |
480 | 471 | * @return void |
481 | 472 | */ |
482 | - public function submit($start, $rows, $processResults = true) |
|
483 | - { |
|
473 | + public function submit($start, $rows, $processResults = true) { |
|
484 | 474 | $params = $this->params; |
485 | 475 | $params['start'] = $start; |
486 | 476 | $params['rows'] = $rows; |
@@ -638,8 +628,7 @@ discard block |
||
638 | 628 | * |
639 | 629 | * @return array The Apache Solr Documents that were fetched |
640 | 630 | */ |
641 | - protected function searchSolr($parameters = [], $enableCache = true) |
|
642 | - { |
|
631 | + protected function searchSolr($parameters = [], $enableCache = true) { |
|
643 | 632 | // Set query. |
644 | 633 | $parameters['query'] = isset($parameters['query']) ? $parameters['query'] : '*'; |
645 | 634 | $parameters['filterquery'] = isset($parameters['filterquery']) ? $parameters['filterquery'] : []; |
@@ -20,8 +20,7 @@ discard block |
||
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 |
||
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']; |
@@ -38,8 +38,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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())) { |
@@ -23,8 +23,7 @@ discard block |
||
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 |
||
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 */ |
@@ -25,8 +25,7 @@ discard block |
||
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 |
||
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 */ |
@@ -23,10 +23,8 @@ |
||
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; |
@@ -29,8 +29,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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'])) { |
@@ -23,10 +23,8 @@ |
||
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; |
@@ -23,10 +23,8 @@ |
||
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; |