Test Failed
Pull Request — master (#16)
by Gordon
02:37
created
src/Manticoresearch/Transport/TransportInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      * @param array $params
20 20
      * @return mixed
21 21
      */
22
-    public function execute(Request $request, $params=[]);
22
+    public function execute(Request $request, $params = []);
23 23
 
24 24
     /**
25 25
      * @return mixed
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Sql.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
      */
35 35
     public function getBody()
36 36
     {
37
-        if($this->_mode === 'raw') {
37
+        if ($this->_mode === 'raw') {
38 38
             $return = ['mode=raw'];
39
-            foreach($this->_body as $k=>$v) {
40
-                $return[]= $k.'='.$v;
39
+            foreach ($this->_body as $k=>$v) {
40
+                $return[] = $k . '=' . $v;
41 41
             }
42
-            return implode('&',$return);
43
-        }else{
42
+            return implode('&', $return);
43
+        } else {
44 44
             return http_build_query($this->_body);
45 45
         }
46 46
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
                 $return[]= $k.'='.$v;
41 41
             }
42 42
             return implode('&',$return);
43
-        }else{
43
+        } else{
44 44
             return http_build_query($this->_body);
45 45
         }
46 46
 
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Cluster/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         if (isset($this->_cluster)) {
25 25
 
26
-            return parent::setBody(['query' => "DELETE CLUSTER ".$this->_cluster]);
26
+            return parent::setBody(['query' => "DELETE CLUSTER " . $this->_cluster]);
27 27
         }
28 28
         throw new RuntimeException('Cluster name is missing.');
29 29
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Cluster/Join.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,18 +22,18 @@
 block discarded – undo
22 22
     public function setBody($params = null)
23 23
     {
24 24
         if (isset($this->_cluster)) {
25
-            if(isset($params['node'])) {
26
-                $this->_body = ['query' => "JOIN CLUSTER ".$this->_cluster." AT ".$params['node']];
27
-            }else{
28
-                $options =[];
29
-                if(isset($params['path'])) {
30
-                    $options[] = "'".$params['path']. "' AS path";
25
+            if (isset($params['node'])) {
26
+                $this->_body = ['query' => "JOIN CLUSTER " . $this->_cluster . " AT " . $params['node']];
27
+            } else {
28
+                $options = [];
29
+                if (isset($params['path'])) {
30
+                    $options[] = "'" . $params['path'] . "' AS path";
31 31
                 }
32
-                if(isset($params['nodes'])) {
33
-                    $options[] = "'".$params['nodes']. "' AS nodes";
32
+                if (isset($params['nodes'])) {
33
+                    $options[] = "'" . $params['nodes'] . "' AS nodes";
34 34
                 }
35
-                $this->_body = ['query' => "JOIN CLUSTER ".$this->_cluster.
36
-                    ((count($options)>0)?" ".implode(',', $options):"")];
35
+                $this->_body = ['query' => "JOIN CLUSTER " . $this->_cluster .
36
+                    ((count($options) > 0) ? " " . implode(',', $options) : "")];
37 37
             }
38 38
 
39 39
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         if (isset($this->_cluster)) {
25 25
             if(isset($params['node'])) {
26 26
                 $this->_body = ['query' => "JOIN CLUSTER ".$this->_cluster." AT ".$params['node']];
27
-            }else{
27
+            } else{
28 28
                 $options =[];
29 29
                 if(isset($params['path'])) {
30 30
                     $options[] = "'".$params['path']. "' AS path";
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         if (isset($this->_index)) {
26 26
 
27
-            return parent::setBody(['query' => "SHOW INDEX ".$this->_index. " STATUS".(isset($params['pattern'])?" LIKE '".$params['pattern']."'":"")]);
27
+            return parent::setBody(['query' => "SHOW INDEX " . $this->_index . " STATUS" . (isset($params['pattern']) ? " LIKE '" . $params['pattern'] . "'" : "")]);
28 28
         }
29 29
         throw new RuntimeException('Index name is missing.');
30 30
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Describe.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function setBody($params = null)
20 20
     {
21 21
         if (isset($this->_index)) {
22
-            return parent::setBody(['query' => "DESCRIBE ".$this->_index. " ".(isset($params['pattern'])?" LIKE '".$params['pattern']."'":"")]);
22
+            return parent::setBody(['query' => "DESCRIBE " . $this->_index . " " . (isset($params['pattern']) ? " LIKE '" . $params['pattern'] . "'" : "")]);
23 23
 
24 24
         }
25 25
         throw new RuntimeException('Index name is missing.');
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Optimize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function setBody($params = null)
24 24
     {
25 25
         if (isset($this->_index)) {
26
-            return parent::setBody(['query' => "OPTIMIZE INDEX ".$this->_index. "".(isset($params['sync'])?" OPTION sync='".$params['sync']."'":"")]);
26
+            return parent::setBody(['query' => "OPTIMIZE INDEX " . $this->_index . "" . (isset($params['sync']) ? " OPTION sync='" . $params['sync'] . "'" : "")]);
27 27
         }
28 28
         throw new RuntimeException('Index name is missing.');
29 29
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         if (isset($this->_index)) {
26 26
 
27
-            return parent::setBody(['query' => "SHOW INDEX ".$this->_index. " SETTINGS"]);
27
+            return parent::setBody(['query' => "SHOW INDEX " . $this->_index . " SETTINGS"]);
28 28
         }
29 29
         throw new RuntimeException('Index name is missing.');
30 30
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Truncate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function setBody($params = null)
24 24
     {
25 25
         if (isset($this->_index)) {
26
-            return parent::setBody(['query' => "TRUNCATE RTINDEX ".$this->_index. "".(isset($params['with'])?" WITH'".strtoupper($params['with'])."'":"")]);
26
+            return parent::setBody(['query' => "TRUNCATE RTINDEX " . $this->_index . "" . (isset($params['with']) ? " WITH'" . strtoupper($params['with']) . "'" : "")]);
27 27
         }
28 28
         throw new RuntimeException('Index name is missing.');
29 29
     }
Please login to merge, or discard this patch.