Passed
Branch master (4d6fed)
by Adrian
03:16
created
src/Manticoresearch/Endpoints/Nodes/ReloadPlugins.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
     public function setBody($params = null)
20 20
     {
21 21
         $this->_body = $params;
22
-        if(isset($params['library'])) {
23
-            return parent::setBody(['query' => "RELOAD PLUGINS FROM SONAME ".$params['library']]);
22
+        if (isset($params['library'])) {
23
+            return parent::setBody(['query' => "RELOAD PLUGINS FROM SONAME " . $params['library']]);
24 24
         }
25 25
         throw new RuntimeException('library name not present in  /nodes/reloadplugins');
26 26
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Nodes/Variables.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
     public function setBody($params = null)
16 16
     {
17 17
         $option = "";
18
-        if(isset($params['pattern'])) {
19
-            $option = "LIKE '".$params['pattern']."'";
18
+        if (isset($params['pattern'])) {
19
+            $option = "LIKE '" . $params['pattern'] . "'";
20 20
         }
21
-        if(isset($params['where'])) {
22
-            $option = "WHERE variable_name='".$params['where']['variable_name']."'";
21
+        if (isset($params['where'])) {
22
+            $option = "WHERE variable_name='" . $params['where']['variable_name'] . "'";
23 23
         }
24
-        return parent::setBody(['query' => "SHOW ".(isset($params['type'])?$params['type']:'')." VARIABLES ".$option]);
24
+        return parent::setBody(['query' => "SHOW " . (isset($params['type']) ? $params['type'] : '') . " VARIABLES " . $option]);
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Nodes/Set.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
         $this->_body = $params;
19 19
         if (isset($params['variable']) && is_array($params['variable'])) {
20 20
             return parent::setBody([
21
-                'query' => "SET " . (isset($params['type']) ?  $params['type'] . "'" : "")." ".
22
-                    $params['variable']['name']." '" . $params['variable']['value']
21
+                'query' => "SET " . (isset($params['type']) ? $params['type'] . "'" : "") . " " .
22
+                    $params['variable']['name'] . " '" . $params['variable']['value']
23 23
             ]);
24 24
 
25 25
         }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Nodes/DropFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function setBody($params = null)
17 17
     {
18
-        if(isset($params['name'])) {
18
+        if (isset($params['name'])) {
19 19
             return parent::setBody(['query' => "DROP FUNCTION " . $params['name']]);
20 20
         }
21 21
         throw new RuntimeException('Missing function name in /nodes/dropfunction');
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Nodes/Threads.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,6 +21,6 @@
 block discarded – undo
21 21
             }
22 22
         }
23 23
 
24
-        return parent::setBody(['query' => "SHOW THREADS " . ((count($options)>0)?' OPTION '.implode(",", $options):'')]);
24
+        return parent::setBody(['query' => "SHOW THREADS " . ((count($options) > 0) ? ' OPTION ' . implode(",", $options) : '')]);
25 25
     }
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Nodes/CreatePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
 
16 16
     public function setBody($params = null)
17 17
     {
18
-        if(isset($params['name']) && isset($params['type']) && $params['library']) {
19
-            return parent::setBody(['query' => "CREATE PLUGIN " . $params['name']." TYPE ".strtoupper($params['type']). " SONAME ".$params['library']]);
18
+        if (isset($params['name']) && isset($params['type']) && $params['library']) {
19
+            return parent::setBody(['query' => "CREATE PLUGIN " . $params['name'] . " TYPE " . strtoupper($params['type']) . " SONAME " . $params['library']]);
20 20
         }
21 21
 
22 22
         throw new RuntimeException('Incomplete request for /nodes/createplugin');
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Nodes/DropPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
 
16 16
     public function setBody($params = null)
17 17
     {
18
-        if(isset($params['name'])) {
19
-            return parent::setBody(['query' => "DROP PLUGIN " . $params['name']." TYPE".$params['type']]);
18
+        if (isset($params['name'])) {
19
+            return parent::setBody(['query' => "DROP PLUGIN " . $params['name'] . " TYPE" . $params['type']]);
20 20
         }
21 21
         throw new RuntimeException('Missing plugin name in /nodes/dropplugin');
22 22
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Cluster.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function __construct($client)
26 26
     {
27 27
         $this->_client = $client;
28
-        $this->_params =['responseClass'=>'Manticoresearch\\Response\\SqlToArray'];
28
+        $this->_params = ['responseClass'=>'Manticoresearch\\Response\\SqlToArray'];
29 29
 
30 30
     }
31 31
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $endpoint = new Alter();
37 37
         $endpoint->setCluster($cluster);
38 38
         $endpoint->setBody($body);
39
-        $response = $this->_client->request($endpoint,$this->_params);
39
+        $response = $this->_client->request($endpoint, $this->_params);
40 40
         return  $response->getResponse();
41 41
 
42 42
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $endpoint = new Create();
49 49
         $endpoint->setCluster($cluster);
50 50
         $endpoint->setBody($body);
51
-        $response = $this->_client->request($endpoint,$this->_params);
51
+        $response = $this->_client->request($endpoint, $this->_params);
52 52
         return  $response->getResponse();
53 53
 
54 54
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $endpoint = new Delete();
61 61
         $endpoint->setCluster($cluster);
62 62
         $endpoint->setBody($body);
63
-        $response = $this->_client->request($endpoint,$this->_params);
63
+        $response = $this->_client->request($endpoint, $this->_params);
64 64
         return  $response->getResponse();
65 65
 
66 66
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $endpoint = new Join();
73 73
         $endpoint->setCluster($cluster);
74 74
         $endpoint->setBody($body);
75
-        $response = $this->_client->request($endpoint,$this->_params);
75
+        $response = $this->_client->request($endpoint, $this->_params);
76 76
         return  $response->getResponse();
77 77
 
78 78
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $endpoint = new Set();
85 85
         $endpoint->setCluster($cluster);
86 86
         $endpoint->setBody($body);
87
-        $response = $this->_client->request($endpoint,$this->_params);
87
+        $response = $this->_client->request($endpoint, $this->_params);
88 88
         return  $response->getResponse();
89 89
 
90 90
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     protected $_response;
37 37
 
38
-    public function __construct( $responseString, $status = null)
38
+    public function __construct($responseString, $status = null)
39 39
     {
40 40
         if (is_array($responseString)) {
41 41
             $this->_response = $responseString;
Please login to merge, or discard this patch.