Passed
Pull Request — master (#123)
by
unknown
04:21
created
Classes/Common/Solr/SearchResult/Region.php 1 patch
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'];
94 92
         $this->xBeginPosition = $region['ulx'];
Please login to merge, or discard this patch.
Classes/Common/Solr/SearchResult/ResultDocument.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class ResultDocument
26
-{
25
+class ResultDocument {
27 26
 
28 27
     /**
29 28
      * @access private
@@ -108,8 +107,7 @@  discard block
 block discarded – undo
108 107
      *
109 108
      * @return void
110 109
      */
111
-    public function __construct(Document $record, array $highlighting, array $fields)
112
-    {
110
+    public function __construct(Document $record, array $highlighting, array $fields) {
113 111
         $this->id = $record[$fields['id']];
114 112
         $this->uid = $record[$fields['uid']];
115 113
         $this->page = $record[$fields['page']];
Please login to merge, or discard this patch.
Classes/Common/Solr/Solr.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@  discard block
 block discarded – undo
42 42
  * @property-read bool $ready flag if the Solr service is instantiated successfully
43 43
  * @property-read Client $service this holds the Solr service object
44 44
  */
45
-class Solr implements LoggerAwareInterface
46
-{
45
+class Solr implements LoggerAwareInterface {
47 46
     use LoggerAwareTrait;
48 47
 
49 48
     /**
@@ -518,8 +517,7 @@  discard block
 block discarded – undo
518 517
      *
519 518
      * @return mixed Value of $this->$var
520 519
      */
521
-    public function __get(string $var)
522
-    {
520
+    public function __get(string $var) {
523 521
         $method = 'magicGet' . ucfirst($var);
524 522
         if (
525 523
             !property_exists($this, $var)
@@ -578,8 +576,7 @@  discard block
 block discarded – undo
578 576
      *
579 577
      * @return void
580 578
      */
581
-    protected function __construct(?string $core)
582
-    {
579
+    protected function __construct(?string $core) {
583 580
         // Solarium requires different code for version 5 and 6.
584 581
         $isSolarium5 = Client::checkExact('5');
585 582
         // Get Solr connection parameters from configuration.
Please login to merge, or discard this patch.
Classes/Common/Solr/SolrSearch.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @return void
92 92
      */
93
-    public function __construct(DocumentRepository $documentRepository, $collections, array $settings, array $searchParams, QueryResult $listedMetadata = null)
94
-    {
93
+    public function __construct(DocumentRepository $documentRepository, $collections, array $settings, array $searchParams, QueryResult $listedMetadata = null) {
95 94
         $this->documentRepository = $documentRepository;
96 95
         $this->collections = $collections;
97 96
         $this->settings = $settings;
@@ -210,8 +209,7 @@  discard block
 block discarded – undo
210 209
      * @return mixed
211 210
      */
212 211
     #[\ReturnTypeWillChange]
213
-    public function offsetGet($offset)
214
-    {
212
+    public function offsetGet($offset) {
215 213
         $idx = $this->result['document_keys'][$offset];
216 214
         $document = $this->result['documents'][$idx] ?? null;
217 215
 
@@ -279,8 +277,7 @@  discard block
 block discarded – undo
279 277
      *
280 278
      * @return mixed
281 279
      */
282
-    public function getSolrResults()
283
-    {
280
+    public function getSolrResults() {
284 281
         return $this->result['solrResults'];
285 282
     }
286 283
 
@@ -293,8 +290,7 @@  discard block
 block discarded – undo
293 290
      *
294 291
      * @return mixed
295 292
      */
296
-    public function getByUid($uid)
297
-    {
293
+    public function getByUid($uid) {
298 294
         return $this->result['documents'][$uid];
299 295
     }
300 296
 
@@ -305,8 +301,7 @@  discard block
 block discarded – undo
305 301
      *
306 302
      * @return SolrSearchQuery
307 303
      */
308
-    public function getQuery()
309
-    {
304
+    public function getQuery() {
310 305
         return new SolrSearchQuery($this);
311 306
     }
312 307
 
@@ -317,8 +312,7 @@  discard block
 block discarded – undo
317 312
      *
318 313
      * @return SolrSearch
319 314
      */
320
-    public function getFirst()
321
-    {
315
+    public function getFirst() {
322 316
         return $this[0];
323 317
     }
324 318
 
@@ -329,8 +323,7 @@  discard block
 block discarded – undo
329 323
      *
330 324
      * @return array
331 325
      */
332
-    public function toArray()
333
-    {
326
+    public function toArray() {
334 327
         return array_values($this->result['documents']);
335 328
     }
336 329
 
@@ -343,8 +336,7 @@  discard block
 block discarded – undo
343 336
      *
344 337
      * @return int
345 338
      */
346
-    public function getNumFound()
347
-    {
339
+    public function getNumFound() {
348 340
         return $this->result['numFound'];
349 341
     }
350 342
 
@@ -355,8 +347,7 @@  discard block
 block discarded – undo
355 347
      *
356 348
      * @return void
357 349
      */
358
-    public function prepare()
359
-    {
350
+    public function prepare() {
360 351
         // Prepare query parameters.
361 352
         $params = [];
362 353
         $matches = [];
@@ -472,8 +463,7 @@  discard block
 block discarded – undo
472 463
      *
473 464
      * @return void
474 465
      */
475
-    public function submit($start, $rows, $processResults = true)
476
-    {
466
+    public function submit($start, $rows, $processResults = true) {
477 467
         $params = $this->params;
478 468
         $params['start'] = $start;
479 469
         $params['rows'] = $rows;
@@ -631,8 +621,7 @@  discard block
 block discarded – undo
631 621
      *
632 622
      * @return array The Apache Solr Documents that were fetched
633 623
      */
634
-    protected function searchSolr($parameters = [], $enableCache = true)
635
-    {
624
+    protected function searchSolr($parameters = [], $enableCache = true) {
636 625
         // Set query.
637 626
         $parameters['query'] = isset($parameters['query']) ? $parameters['query'] : '*';
638 627
         $parameters['filterquery'] = isset($parameters['filterquery']) ? $parameters['filterquery'] : [];
Please login to merge, or discard this patch.
Classes/Common/Solr/SolrSearchQuery.php 1 patch
Braces   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
  * @property int $limit
19 19
  * @property int $offset
20 20
  */
21
-class SolrSearchQuery implements QueryInterface
22
-{
21
+class SolrSearchQuery implements QueryInterface {
23 22
     /**
24 23
      * @access private
25 24
      * @var SolrSearch
@@ -47,8 +46,7 @@  discard block
 block discarded – undo
47 46
      *
48 47
      * @return void
49 48
      */
50
-    public function __construct($solrSearch)
51
-    {
49
+    public function __construct($solrSearch) {
52 50
         $this->solrSearch = $solrSearch;
53 51
 
54 52
         $this->offset = 0;
@@ -70,8 +68,7 @@  discard block
 block discarded – undo
70 68
      */
71 69
     // TODO: Return type (array) of method SolrSearchQuery::execute() should be compatible with return type (iterable<object>&TYPO3\CMS\Extbase\Persistence\QueryResultInterface) of method TYPO3\CMS\Extbase\Persistence\QueryInterface::execute()
72 70
     // @phpstan-ignore-next-line
73
-    public function execute($returnRawQueryResult = false)
74
-    {
71
+    public function execute($returnRawQueryResult = false) {
75 72
         $this->solrSearch->submit($this->offset, $this->limit);
76 73
 
77 74
         // solrSearch now only contains the results in range, indexed in [0, n)
@@ -146,8 +143,8 @@  discard block
 block discarded – undo
146 143
     // @phpstan-ignore-next-line
147 144
     public function getQuerySettings() {}
148 145
 
149
-    public function count()
150
-    {// @phpstan-ignore-next-line
146
+    public function count() {
147
+// @phpstan-ignore-next-line
151 148
         // TODO?
152 149
     }
153 150
 
Please login to merge, or discard this patch.
Classes/Common/FulltextInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
  *
23 23
  * @abstract
24 24
  */
25
-interface FulltextInterface
26
-{
25
+interface FulltextInterface {
27 26
     /**
28 27
      * This extracts raw fulltext data from XML
29 28
      *
Please login to merge, or discard this patch.
Classes/Common/StdOutStream.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
      * 
34 34
      * @return void
35 35
      */
36
-    public function emit()
37
-    {
36
+    public function emit() {
38 37
         // Disable output buffering
39 38
         ob_end_flush();
40 39
 
Please login to merge, or discard this patch.
Classes/Common/MetadataInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
  *
23 23
  * @abstract
24 24
  */
25
-interface MetadataInterface
26
-{
25
+interface MetadataInterface {
27 26
     /**
28 27
      * This extracts metadata from XML
29 28
      *
Please login to merge, or discard this patch.
Classes/Common/Indexer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  *
33 33
  * @access public
34 34
  */
35
-class Indexer
36
-{
35
+class Indexer {
37 36
     /**
38 37
      * @access public
39 38
      * @static
@@ -604,8 +603,7 @@  discard block
 block discarded – undo
604 603
      *
605 604
      * @return array|string
606 605
      */
607
-    private static function removeAppendsFromAuthor($authors)
608
-    {
606
+    private static function removeAppendsFromAuthor($authors) {
609 607
         if (is_array($authors)) {
610 608
             foreach ($authors as $i => $author) {
611 609
                 $splitName = explode(pack('C', 31), $author);
@@ -685,7 +683,6 @@  discard block
 block discarded – undo
685 683
      *
686 684
      * @return void
687 685
      */
688
-    private function __construct()
689
-    {
686
+    private function __construct() {
690 687
     }
691 688
 }
Please login to merge, or discard this patch.