Passed
Branch master (4d6fed)
by Adrian
03:16
created
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/Response/SqlToArray.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
     {
13 13
         $response = parent::getResponse();
14 14
 
15
-        if(isset($response['columns']) && isset($response['data']))
15
+        if (isset($response['columns']) && isset($response['data']))
16 16
         {
17
-            $data=[];
18
-            $names = array_walk($response['columns'],function(&$value,$key) {$value= array_keys($value)[0];});
19
-            foreach($response['data'] as $property) {
20
-                if(count($response['columns'])>2) {
17
+            $data = [];
18
+            $names = array_walk($response['columns'], function(&$value, $key) {$value = array_keys($value)[0]; });
19
+            foreach ($response['data'] as $property) {
20
+                if (count($response['columns']) > 2) {
21 21
                     $data[array_shift($property)] = $property;
22
-                }else{
22
+                } else {
23 23
                     $data[$property[$response['columns'][0]]] = $property[$response['columns'][1]];
24 24
                 }
25 25
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
             foreach($response['data'] as $property) {
20 20
                 if(count($response['columns'])>2) {
21 21
                     $data[array_shift($property)] = $property;
22
-                }else{
22
+                } else{
23 23
                     $data[$property[$response['columns'][0]]] = $property[$response['columns'][1]];
24 24
                 }
25 25
             }
Please login to merge, or discard this patch.
src/Manticoresearch/Connection/ConnectionPool.php 1 patch
Spacing   +3 added lines, -3 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,8 +52,8 @@  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);
56
-        if($connection->isAlive()) {
55
+        $connection = $this->strategy->getConnection($this->_connections);
56
+        if ($connection->isAlive()) {
57 57
             return $connection;
58 58
         }
59 59
         if ($this->retries_attempts < $this->retries) {
Please login to merge, or discard this patch.
src/Manticoresearch/Endpoints/Suggest.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
     public function setBody($params = null)
16 16
     {
17 17
         if (isset($this->_index)) {
18
-            $binds =[];
18
+            $binds = [];
19 19
             $binds[] = "'" . Utils::escape($params['query']) . "'";
20 20
             $binds[] = "'" . $this->_index . "'";
21 21
             if (count($params['options']) > 0) {
Please login to merge, or discard this patch.