Passed
Push — master ( c8c82b...4dd0bb )
by
unknown
05:06
created
src/Manticoresearch/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     public function __construct($params = [])
34 34
     {
35
-        if (count($params)>0) {
35
+        if (count($params) > 0) {
36 36
             $this->setBody($params['body'] ?? []);
37 37
             $this->setQuery($params['query'] ?? []);
38 38
             $this->setContentType($params['content_type'] ?? 'application/json');
Please login to merge, or discard this patch.
src/Manticoresearch/Results/PercolateResultHit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 
15 15
     public function getDocsMatched($docs)
16 16
     {
17
-        return array_map(function ($v) use ($docs) {
18
-            return $docs[$v - 1];
17
+        return array_map(function($v) use ($docs) {
18
+            return $docs[$v-1];
19 19
         }, $this->data['fields']['_percolator_document_slot']);
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
src/Manticoresearch/Results/PercolateResultDoc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,6 +31,6 @@
 block discarded – undo
31 31
 
32 32
     public function hasQueries()
33 33
     {
34
-        return count($this->doc['queries'])>0;
34
+        return count($this->doc['queries']) > 0;
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/Manticoresearch/Results/PercolateDocsResultSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
                 if (isset($query['fields'], $query['fields']['_percolator_document_slot'])) {
41 41
                     foreach ($query['fields']['_percolator_document_slot'] as $d) {
42 42
                         if (isset($this->array[$d-1])) {
43
-                            $this->array[$d-1]['queries'][] =$query;
43
+                            $this->array[$d-1]['queries'][] = $query;
44 44
                         }
45 45
                     }
46 46
                 }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Cluster/Join.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,17 +24,17 @@
 block discarded – undo
24 24
     {
25 25
         if (isset($this->cluster)) {
26 26
             if (isset($params['node'])) {
27
-                return parent::setBody(['query' => "JOIN CLUSTER ".$this->cluster." AT '".$params['node']."'"]);
27
+                return parent::setBody(['query' => "JOIN CLUSTER " . $this->cluster . " AT '" . $params['node'] . "'"]);
28 28
             } else {
29
-                $options =[];
29
+                $options = [];
30 30
                 if (isset($params['path'])) {
31
-                    $options[] = "'".$params['path']. "' AS path";
31
+                    $options[] = "'" . $params['path'] . "' AS path";
32 32
                 }
33 33
                 if (isset($params['nodes'])) {
34
-                    $options[] = "'".$params['nodes']. "' AS nodes";
34
+                    $options[] = "'" . $params['nodes'] . "' AS nodes";
35 35
                 }
36
-                return parent::setBody(['query' => "JOIN CLUSTER ".$this->cluster.
37
-                    ((count($options)>0)?" ".implode(',', $options):"")]);
36
+                return parent::setBody(['query' => "JOIN CLUSTER " . $this->cluster .
37
+                    ((count($options) > 0) ? " " . implode(',', $options) : "")]);
38 38
             }
39 39
         }
40 40
         throw new RuntimeException('Cluster name is missing.');
Please login to merge, or discard this patch.
src/Manticoresearch/Query/MatchQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
 {
10 10
     public function __construct($keywords, $fields)
11 11
     {
12
-        $this->params['match'] =[$fields => $keywords];
12
+        $this->params['match'] = [$fields => $keywords];
13 13
     }
14 14
 }
Please login to merge, or discard this patch.
src/Manticoresearch/Transport/PhpHttp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
         if (isset($params['responseClass'])) {
79 79
             $responseClass = $params['responseClass'];
80
-            $responseClassParams = isset($params['responseClassParams'])?$params['responseClassParams']:[];
80
+            $responseClassParams = isset($params['responseClassParams']) ? $params['responseClassParams'] : [];
81 81
             $response = new $responseClass($responseString, $status, $responseClassParams);
82 82
         } else {
83 83
             $response = new Response($responseString, $status);
Please login to merge, or discard this patch.
src/Manticoresearch/Utils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 {
8 8
     public static function escape($string): string
9 9
     {
10
-        $from = ['\\', '(',')','|','-','!','@','~','"','&', '/', '^', '$', '=', '<'];
11
-        $to = ['\\\\', '\(','\)','\|','\-','\!','\@','\~','\"', '\&', '\/', '\^', '\$', '\=', '\<'];
10
+        $from = ['\\', '(', ')', '|', '-', '!', '@', '~', '"', '&', '/', '^', '$', '=', '<'];
11
+        $to = ['\\\\', '\(', '\)', '\|', '\-', '\!', '\@', '\~', '\"', '\&', '\/', '\^', '\$', '\=', '\<'];
12 12
         return str_replace($from, $to, $string);
13 13
     }
14 14
 }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Sql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         if ($this->mode === 'raw') {
37 37
             $return = ['mode=raw'];
38 38
             foreach ($this->body as $k => $v) {
39
-                $return[]= $k.'='.urlencode($v);
39
+                $return[] = $k . '=' . urlencode($v);
40 40
             }
41 41
             return implode('&', $return);
42 42
         } else {
Please login to merge, or discard this patch.