Passed
Push — master ( 943da3...5e7ec5 )
by Adrian
01:51
created
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
         throw new RuntimeException('Variable is missing for /nodes/set');
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Describe.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
     public function setBody($params = null)
19 19
     {
20 20
         if (isset($this->index)) {
21
-            return parent::setBody(['query' => "DESCRIBE ".$this->index. " ".
22
-                (isset($params['pattern'])?" LIKE '".$params['pattern']."'":"")]);
21
+            return parent::setBody(['query' => "DESCRIBE " . $this->index . " " .
22
+                (isset($params['pattern']) ? " LIKE '" . $params['pattern'] . "'" : "")]);
23 23
         }
24 24
         throw new RuntimeException('Index name is missing.');
25 25
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Optimize.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
     public function setBody($params = null)
23 23
     {
24 24
         if (isset($this->index)) {
25
-            return parent::setBody(['query' => "OPTIMIZE INDEX ".$this->index. "".
26
-                (isset($params['sync'])?" OPTION sync='".$params['sync']."'":"")]);
25
+            return parent::setBody(['query' => "OPTIMIZE INDEX " . $this->index . "" .
26
+                (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/Truncate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
     public function setBody($params = null)
23 23
     {
24 24
         if (isset($this->index)) {
25
-            return parent::setBody(['query' => "TRUNCATE RTINDEX ".$this->index. "".
26
-                (isset($params['with'])?" WITH'".strtoupper($params['with'])."'":"")]);
25
+            return parent::setBody(['query' => "TRUNCATE RTINDEX " . $this->index . "" .
26
+                (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/FlushRamchunk.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
     {
20 20
 
21 21
         if (isset($this->index)) {
22
-            return parent::setBody(['query' => "FLUSH RAMCHUNK ".$this->index]);
22
+            return parent::setBody(['query' => "FLUSH RAMCHUNK " . $this->index]);
23 23
         }
24 24
         throw new RuntimeException('Index name is missing.');
25 25
     }
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
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
 
21 21
         if (isset($this->index)) {
22
-            return parent::setBody(['query' => "FLUSH RTINDEX ".$this->index]);
22
+            return parent::setBody(['query' => "FLUSH RTINDEX " . $this->index]);
23 23
         }
24 24
         throw new RuntimeException('Index name is missing.');
25 25
     }
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
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function setBody($params = null)
23 23
     {
24 24
         if (isset($this->index)) {
25
-            return parent::setBody(['query' => "SHOW INDEX ".$this->index. " SETTINGS"]);
25
+            return parent::setBody(['query' => "SHOW INDEX " . $this->index . " SETTINGS"]);
26 26
         }
27 27
         throw new RuntimeException('Index name is missing.');
28 28
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Indices/Drop.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 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   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
             $options = "";
35 35
             if (isset($params['settings'])) {
36 36
                 foreach ($params['settings'] as $name => $value) {
37
-                    $options.=" ".$name." = '".$value."'";
37
+                    $options .= " " . $name . " = '" . $value . "'";
38 38
                 }
39 39
             }
40
-            return parent::setBody(['query' => "CREATE TABLE ".
41
-                (isset($params['silent']) && $params['silent']===true?' IF NOT EXISTS ':'').
42
-                $this->index.
43
-                (count($columns)>0?"(".implode(",", $columns).")":" ")
40
+            return parent::setBody(['query' => "CREATE TABLE " .
41
+                (isset($params['silent']) && $params['silent'] === true ? ' IF NOT EXISTS ' : '') .
42
+                $this->index .
43
+                (count($columns) > 0 ? "(" . implode(",", $columns) . ")" : " ")
44 44
                 .$options]);
45 45
         }
46 46
         throw new RuntimeException('Index name is missing.');
Please login to merge, or discard this patch.