Passed
Push — master ( 2571aa...38354f )
by Adrian
01:48
created
src/Manticoresearch/Search.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,21 +104,21 @@
 block discarded – undo
104 104
         return $this;
105 105
     }
106 106
 
107
-    public function highlight($fields = [],$settings=[]): self
107
+    public function highlight($fields = [], $settings = []): self
108 108
     {
109 109
 
110
-        if (count($fields) === 0 && count($settings)===0) {
111
-            $this->_params['highlight'] =  new \stdClass();
110
+        if (count($fields) === 0 && count($settings) === 0) {
111
+            $this->_params['highlight'] = new \stdClass();
112 112
             return $this;
113 113
         }
114 114
         $this->_params['highlight'] = [];
115 115
         if (count($fields) > 0) {
116
-            $this->_params['highlight']['fields'] =$fields;
116
+            $this->_params['highlight']['fields'] = $fields;
117 117
         }
118
-        if(count($settings)>0) {
119
-            foreach($settings as $name=>$value)
118
+        if (count($settings) > 0) {
119
+            foreach ($settings as $name=>$value)
120 120
             {
121
-                $this->_params['highlight'][$name] =$value;
121
+                $this->_params['highlight'][$name] = $value;
122 122
             }
123 123
         }
124 124
         return $this;
Please login to merge, or discard this patch.
src/Manticoresearch/Query/Range.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 class Range extends Query
9 9
 {
10
-    public function __construct($field, $args=[])
10
+    public function __construct($field, $args = [])
11 11
     {
12 12
         $this->_params['range'] = [$field => $args];
13 13
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Query/Match.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
 {
10 10
     public function __construct($keywords, $fields)
11 11
     {
12
-        $this->_params['match'] =[$fields => $keywords];
12
+        $this->_params['match'] = [$fields => $keywords];
13 13
     }
14 14
 }
Please login to merge, or discard this patch.
src/Manticoresearch/Cluster.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
     public function __construct($client)
25 25
     {
26 26
         $this->_client = $client;
27
-        $this->_params =['responseClass'=>'Manticoresearch\\Response\\SqlToArray'];
27
+        $this->_params = ['responseClass'=>'Manticoresearch\\Response\\SqlToArray'];
28 28
     }
29 29
 
30 30
     public function alter($params)
Please login to merge, or discard this patch.
src/Manticoresearch/Connection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function getTransportHandler(LoggerInterface $logger)
174 174
     {
175
-        return Transport::create($this->getTransport(), $this,$logger);
175
+        return Transport::create($this->getTransport(), $this, $logger);
176 176
     }
177 177
 
178 178
     /**
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
      * @return mixed|null
193 193
      *
194 194
      */
195
-    public function getConfig($key =  null)
195
+    public function getConfig($key = null)
196 196
     {
197
-        if($key === null) {
197
+        if ($key === null) {
198 198
             return $this->config;
199 199
         }
200 200
         return $this->config[$key] ?? null;
Please login to merge, or discard this patch.
src/Manticoresearch/Response.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected $_response;
46 46
 
47
-    public function __construct( $responseString, $status = null)
47
+    public function __construct($responseString, $status = null)
48 48
     {
49 49
         if (is_array($responseString)) {
50 50
             $this->_response = $responseString;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function hasError()
81 81
     {
82 82
         $response = $this->getResponse();
83
-        return (isset($response['error']) && $response['error'] !== '') ||  (isset($response['errors']) && $response['errors'] !== false);
83
+        return (isset($response['error']) && $response['error'] !== '') || (isset($response['errors']) && $response['errors'] !== false);
84 84
     }
85 85
 
86 86
     /*
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $response = $this->getResponse();
93 93
         if (isset($response['error'])) {
94 94
             return json_encode($response['error'], true);
95
-        } elseif   (isset($response['errors'])){
95
+        } elseif (isset($response['errors'])) {
96 96
             return json_encode($response['errors'], true);
97 97
         } else {
98 98
             return '';
Please login to merge, or discard this patch.
src/Manticoresearch/Transport/PhpHttp.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
         $this->_logger->info(
88 88
             'Request:',
89 89
             [
90
-                 'url' => $url,
90
+                    'url' => $url,
91 91
                 'status' => $status,
92 92
                 'time' => $time
93 93
             ]
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * @return Response
42 42
      * @throws \Http\Client\Exception
43 43
      */
44
-    public function execute(Request $request, $params=[])
44
+    public function execute(Request $request, $params = [])
45 45
     {
46 46
         $connection = $this->getConnection();
47 47
 
Please login to merge, or discard this patch.
src/Manticoresearch/Client.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,13 +159,13 @@
 block discarded – undo
159 159
      * @param bool $obj
160 160
      * @return array|Response
161 161
      */
162
-    public function search(array $params = [],$obj=false)
162
+    public function search(array $params = [], $obj = false)
163 163
     {
164 164
         $endpoint = new Endpoints\Search($params);
165 165
         $response = $this->request($endpoint);
166
-        if($obj ===true) {
166
+        if ($obj === true) {
167 167
             return $response;
168
-        }else{
168
+        } else {
169 169
             return $response->getResponse();
170 170
         }
171 171
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
         $response = $this->request($endpoint);
166 166
         if($obj ===true) {
167 167
             return $response;
168
-        }else{
168
+        } else{
169 169
             return $response->getResponse();
170 170
         }
171 171
     }
Please login to merge, or discard this patch.
src/Manticoresearch/Query.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             } elseif (is_array($v)) {
26 26
                 $return[$k] = $this->_toArray($v);
27 27
             } else {
28
-                if ($v!==null) {
28
+                if ($v !== null) {
29 29
                     $return[$k] = $v;
30 30
                 } else {
31 31
                     return null;
Please login to merge, or discard this patch.