Completed
Pull Request — master (#16)
by Gordon
05:16 queued 01:56
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/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/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/Exceptions/ConnectionException.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
      * @param string $message
24 24
      * @param Request|null $request
25 25
      */
26
-    public function __construct($message = '', Request $request=null)
26
+    public function __construct($message = '', Request $request = null)
27 27
     {
28 28
         $this->_request = $request;
29 29
         parent::__construct($message);
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'], $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'], $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/Indices/Drop.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
      */
14 14
     protected $_index;
15 15
 
16
-    public function setBody( $params = null)
16
+    public function setBody($params = null)
17 17
     {
18
-        if(isset( $this->_index)) {
18
+        if (isset($this->_index)) {
19 19
             return parent::setBody(['query' => "DROP TABLE " .
20
-                (isset($params['silent']) && $params['silent']===true?' IF EXISTS ':'').
20
+                (isset($params['silent']) && $params['silent'] === true ? ' IF EXISTS ' : '') .
21 21
                 $this->_index]);
22 22
         }
23 23
         throw new RuntimeException('Missing index name in /indices/drop');
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Create.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         if (isset($this->_index)) {
24 24
             $columns = [];
25
-            if(isset($params['columns'] )) {
25
+            if (isset($params['columns'])) {
26 26
                 foreach ($params['columns'] as $name => $settings) {
27 27
                     $column = $name . ' ' . $settings['type'];
28 28
                     if (isset($settings['options']) && count($settings['options']) > 0) {
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
                 }
33 33
             }
34 34
             $options = "";
35
-            if(isset($params['settings'] )) {
36
-                foreach($params['settings'] as $name=>$value) {
37
-                    $options.=" ".$name." = '".$value."'";
35
+            if (isset($params['settings'])) {
36
+                foreach ($params['settings'] as $name=>$value) {
37
+                    $options .= " " . $name . " = '" . $value . "'";
38 38
                 }
39 39
 
40 40
             }
41
-            return parent::setBody(['query' => "CREATE TABLE ".
42
-                (isset($params['silent']) && $params['silent']===true?' IF NOT EXISTS ':'').
43
-                $this->_index.
44
-                (count($columns)>0?"(".implode(",",$columns).")":" ")
41
+            return parent::setBody(['query' => "CREATE TABLE " .
42
+                (isset($params['silent']) && $params['silent'] === true ? ' IF NOT EXISTS ' : '') .
43
+                $this->_index .
44
+                (count($columns) > 0 ? "(" . implode(",", $columns) . ")" : " ")
45 45
                 .$options]);
46 46
         }
47 47
         throw new RuntimeException('Index name is missing.');
Please login to merge, or discard this patch.
src/Manticoresearch/Query/BoolQuery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
 {
11 11
     public function must($args):self
12 12
     {
13
-        $this->_params['must'][]= $args;
13
+        $this->_params['must'][] = $args;
14 14
         return $this;
15 15
     }
16 16
     public function mustNot($args):self
17 17
     {
18
-        $this->_params['must_not'][]= $args;
18
+        $this->_params['must_not'][] = $args;
19 19
         return $this;
20 20
     }
21 21
     public function should($args):self
22 22
     {
23
-        $this->_params['should'][]= $args;
23
+        $this->_params['should'][] = $args;
24 24
         return $this;
25 25
     }
26 26
     public function toArray()
Please login to merge, or discard this patch.