Completed
Pull Request — master (#11)
by Gordon
02:24
created
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/FlushRamchunk.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
 
22 22
         if (isset($this->_index)) {
23
-            return parent::setBody(['query' => "FLUSH RAMCHUNK".$this->_index]);
23
+            return parent::setBody(['query' => "FLUSH RAMCHUNK" . $this->_index]);
24 24
         }
25 25
         throw new RuntimeException('Index name is missing.');
26 26
     }
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.
src/Manticoresearch/Endpoints/Indices/FlushRtindex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
 
22 22
         if (isset($this->_index)) {
23
-            return parent::setBody(['query' => "FLUSH RTINDEX ".$this->_index]);
23
+            return parent::setBody(['query' => "FLUSH RTINDEX " . $this->_index]);
24 24
         }
25 25
         throw new RuntimeException('Index name is missing.');
26 26
     }
Please login to merge, or discard this patch.
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.