Completed
Pull Request — master (#919)
by Sascha
14:51 queued 10:18
created
Classes/Domain/Search/SearchRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $activeFacets = $this->getActiveFacets();
155 155
         $facetNames = [];
156 156
 
157
-        array_map(function ($activeFacet) use (&$facetNames) {
157
+        array_map(function($activeFacet) use (&$facetNames) {
158 158
             $facetNames[] = substr($activeFacet, 0, strpos($activeFacet, ':'));
159 159
         }, $activeFacets);
160 160
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $values = [];
172 172
         $activeFacets = $this->getActiveFacets();
173 173
 
174
-        array_map(function ($activeFacet) use (&$values, $facetName) {
174
+        array_map(function($activeFacet) use (&$values, $facetName) {
175 175
             $parts = explode(':', $activeFacet, 2);
176 176
             if ($parts[0] === $facetName) {
177 177
                 $values[] = $parts[1];
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     public function removeAllFacetValuesByName($facetName)
274 274
     {
275 275
         $facetValues = $this->getActiveFacets();
276
-        $facetValues = array_filter($facetValues, function ($facetValue) use ($facetName) {
276
+        $facetValues = array_filter($facetValues, function($facetValue) use ($facetName) {
277 277
             $parts = explode(':', $facetValue, 2);
278 278
             return $parts[0] !== $facetName;
279 279
         });
Please login to merge, or discard this patch.
Classes/ContentObject/Relation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -370,7 +370,7 @@
 block discarded – undo
370 370
             ));
371 371
 
372 372
             // restore
373
-            $this->configuration= $backupConfiguration;
373
+            $this->configuration = $backupConfiguration;
374 374
             $parentContentObject->data = $backupRecord;
375 375
         }
376 376
 
Please login to merge, or discard this patch.
Classes/Query.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function __construct($keywords, $solrConfiguration = null)
157 157
     {
158
-        $keywords = (string) $keywords;
158
+        $keywords = (string)$keywords;
159 159
         if ($solrConfiguration == null) {
160 160
             $this->solrConfiguration = Util::getSolrConfiguration();
161 161
         } else {
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
      */
677 677
     public function getGroupFields()
678 678
     {
679
-        return (array) $this->getQueryParameter('group.field', []);
679
+        return (array)$this->getQueryParameter('group.field', []);
680 680
     }
681 681
 
682 682
     /**
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
      */
700 700
     public function getGroupSortings()
701 701
     {
702
-        return (array) $this->getQueryParameter('group.sort', []);
702
+        return (array)$this->getQueryParameter('group.sort', []);
703 703
     }
704 704
 
705 705
     // faceting
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
      */
726 726
     public function getGroupQueries()
727 727
     {
728
-        return (array) $this->getQueryParameter('group.query', []);
728
+        return (array)$this->getQueryParameter('group.query', []);
729 729
     }
730 730
 
731 731
     /**
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      *
194 194
      * @param string $msg
195 195
      * @param int $severity
196
-     * @param mixed $dataVar
196
+     * @param string[] $dataVar
197 197
      */
198 198
     protected function writeDevLog($msg, $severity = 0, $dataVar = false)
199 199
     {
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
     /**
1004 1004
      * Sets the fields to return by a query.
1005 1005
      *
1006
-     * @param array|string $fieldList an array or comma-separated list of field names
1006
+     * @param string $fieldList an array or comma-separated list of field names
1007 1007
      * @throws \UnexpectedValueException on parameters other than comma-separated lists and arrays
1008 1008
      */
1009 1009
     public function setFieldList($fieldList = array('*', 'score'))
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
      *
1080 1080
      * This query supports the complete Lucene Query Language.
1081 1081
      *
1082
-     * @param mixed $alternativeQuery String alternative query or boolean FALSE to disable / reset the q.alt parameter.
1082
+     * @param string $alternativeQuery String alternative query or boolean FALSE to disable / reset the q.alt parameter.
1083 1083
      * @see http://wiki.apache.org/solr/DisMaxQParserPlugin#q.alt
1084 1084
      */
1085 1085
     public function setAlternativeQuery($alternativeQuery)
Please login to merge, or discard this patch.
Classes/IndexQueue/PageIndexerRequest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@
 block discarded – undo
324 324
      * Sets a request's parameter and its value.
325 325
      *
326 326
      * @param string $parameter Parameter name
327
-     * @param mixed $value Parameter value.
327
+     * @param string $value Parameter value.
328 328
      */
329 329
     public function setParameter($parameter, $value)
330 330
     {
Please login to merge, or discard this patch.
Classes/IndexQueue/Initializer/Page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -287,8 +287,8 @@
 block discarded – undo
287 287
 
288 288
         $mountedPagesIdsWithQueueItems = [];
289 289
         foreach ($queueItemsOfExistingMountPoints as $id => $queueItemsOfExistingMountPoint) {
290
-            if (((int) $queueItemsOfExistingMountPoint['queueItemCount']) > 0) {
291
-                $mountedPagesIdsWithQueueItems[] = (int) $id;
290
+            if (((int)$queueItemsOfExistingMountPoint['queueItemCount']) > 0) {
291
+                $mountedPagesIdsWithQueueItems[] = (int)$id;
292 292
             }
293 293
         }
294 294
 
Please login to merge, or discard this patch.
Classes/SolrService.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      *
233 233
      * Also does not report the time, see https://forge.typo3.org/issues/64551
234 234
      *
235
-     * @param float|int $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2)
235
+     * @param integer $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2)
236 236
      * @param boolean $useCache indicates if the ping result should be cached in the instance or not
237 237
      * @return bool TRUE if Solr can be reached, FALSE if not
238 238
      */
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     /**
246 246
      * Call the /admin/ping servlet, can be used to get the runtime of a ping request.
247 247
      *
248
-     * @param float|int $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2)
248
+     * @param integer $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2)
249 249
      * @param boolean $useCache indicates if the ping result should be cached in the instance or not
250 250
      * @return double runtime in milliseconds
251 251
      * @throws \ApacheSolrForTypo3\Solr\PingFailedException
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
      *
483 483
      * @param string $url
484 484
      * @param float|bool $timeout Read timeout in seconds
485
-     * @return \Apache_Solr_Response
485
+     * @return string
486 486
      */
487 487
     protected function _sendRawGet($url, $timeout = false)
488 488
     {
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
      * a complete and well formed "delete" xml document
657 657
      *
658 658
      * @param string $rawPost Expected to be utf-8 encoded xml document
659
-     * @param float|int $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)
659
+     * @param integer $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)
660 660
      * @return \Apache_Solr_Response
661 661
      */
662 662
     public function delete($rawPost, $timeout = 3600)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      */
301 301
     protected function performPingRequest($timeout = 2, $useCache = true)
302 302
     {
303
-        $cacheKey = (string) ($this);
303
+        $cacheKey = (string)($this);
304 304
         if ($useCache && isset(static::$pingCache[$cacheKey])) {
305 305
             return static::$pingCache[$cacheKey];
306 306
         }
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
             $solrconfigXmlUrl = $this->_scheme . '://'
630 630
                 . $this->_host . ':' . $this->_port
631 631
                 . $this->_path . 'admin/file/?file=solrconfig.xml';
632
-            $response= $this->_sendRawGet($solrconfigXmlUrl);
632
+            $response = $this->_sendRawGet($solrconfigXmlUrl);
633 633
 
634 634
             $solrconfigXml = simplexml_load_string($response->getRawResponse());
635 635
             if ($solrconfigXml === false) {
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
      */
893 893
     public function getCoreName()
894 894
     {
895
-        return (string) array_pop(explode('/', trim($this->_path, '/')));
895
+        return (string)array_pop(explode('/', trim($this->_path, '/')));
896 896
     }
897 897
 
898 898
     /**
Please login to merge, or discard this patch.
Classes/Site.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     {
231 231
         /** @var $registry Registry */
232 232
         $registry = GeneralUtility::makeInstance(Registry::class);
233
-        $servers = (array) $registry->get('tx_solr', 'servers', []);
233
+        $servers = (array)$registry->get('tx_solr', 'servers', []);
234 234
         return $servers;
235 235
     }
236 236
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $recursionRootPageId = intval($rootPageId);
315 315
         if ($rootPageId == 'SITE_ROOT') {
316 316
             $recursionRootPageId = $this->rootPage['uid'];
317
-            $pageIds[] = (int) $this->rootPage['uid'];
317
+            $pageIds[] = (int)$this->rootPage['uid'];
318 318
         }
319 319
 
320 320
         if ($maxDepth <= 0) {
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid = ' . $recursionRootPageId . ' ' . BackendUtility::deleteClause('pages'));
346 346
 
347 347
         while ($page = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
348
-            $pageIds[] = (int) $page['uid'];
348
+            $pageIds[] = (int)$page['uid'];
349 349
 
350 350
             if ($maxDepth > 1) {
351 351
                 $pageIds = array_merge($pageIds, $this->getPages($page['uid'], $maxDepth - 1));
Please login to merge, or discard this patch.
Classes/System/DateTime/FormatService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         }
54 54
 
55 55
         // try to create DateTime object
56
-        $timezone = is_null($timezone) ?  new DateTimeZone(date_default_timezone_get()) : $timezone;
56
+        $timezone = is_null($timezone) ? new DateTimeZone(date_default_timezone_get()) : $timezone;
57 57
         return $this->getFormattedDate($input, $inputFormat, $outputFormat, $timezone);
58 58
     }
59 59
 
Please login to merge, or discard this patch.
Classes/Domain/Index/IndexService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $this->configuration = $site->getSolrConfiguration();
79 79
         $this->site = $site;
80 80
         $this->indexQueue = is_null($queue) ? GeneralUtility::makeInstance(Queue::class) : $queue;
81
-        $this->signalSlotDispatcher = is_null($dispatcher)  ? GeneralUtility::makeInstance(Dispatcher::class) : $dispatcher;
81
+        $this->signalSlotDispatcher = is_null($dispatcher) ? GeneralUtility::makeInstance(Dispatcher::class) : $dispatcher;
82 82
     }
83 83
 
84 84
     /**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     protected function generateIndexingErrorLog(Item $itemToIndex, \Exception $e)
141 141
     {
142 142
         $message = 'Failed indexing Index Queue item ' . $itemToIndex->getIndexQueueUid();
143
-        $data = [   'code' => $e->getCode(),
143
+        $data = ['code' => $e->getCode(),
144 144
                     'message' => $e->getMessage(),
145 145
                     'trace' => $e->getTrace(),
146 146
                     'item' => (array)$itemToIndex];
Please login to merge, or discard this patch.