Passed
Push — 1.x ( 1fc25c...4e8027 )
by Adrian
05:24 queued 13s
created
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.
src/Manticoresearch/Endpoints/Indices/Status.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' => "SHOW INDEX ".$this->index. " STATUS".
26
-                (isset($params['pattern'])?" LIKE '".$params['pattern']."'":"")]);
25
+            return parent::setBody(['query' => "SHOW INDEX " . $this->index . " STATUS" .
26
+                (isset($params['pattern']) ? " LIKE '" . $params['pattern'] . "'" : "")]);
27 27
         }
28 28
         throw new RuntimeException('Index name is missing.');
29 29
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Connection/ConnectionPool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public $retries;
27 27
 
28
-    public $retries_attempts =0;
28
+    public $retries_attempts = 0;
29 29
 
30 30
     public function __construct(array $connections, SelectorInterface $strategy, int $retries)
31 31
     {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function getConnection(): Connection
53 53
     {
54 54
         $this->retries_attempts++;
55
-        $connection =   $this->strategy->getConnection($this->connections);
55
+        $connection = $this->strategy->getConnection($this->connections);
56 56
         if ($connection->isAlive()) {
57 57
             return $connection;
58 58
         }
Please login to merge, or discard this patch.
src/Manticoresearch/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     public function __construct($params = [])
34 34
     {
35
-        if (count($params)>0) {
35
+        if (count($params) > 0) {
36 36
             $this->setBody($params['body'] ?? []);
37 37
             $this->setQuery($params['query'] ?? []);
38 38
             $this->setContentType($params['content_type'] ?? 'application/json');
Please login to merge, or discard this patch.