@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 | } |
@@ -32,7 +32,7 @@ |
||
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'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | 'settings' => $settings |
165 | 165 | ] |
166 | 166 | ]; |
167 | - if ($silent===true) { |
|
167 | + if ($silent === true) { |
|
168 | 168 | $params['body']['silent'] = true; |
169 | 169 | } |
170 | 170 | return $this->client->indices()->create($params); |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | public function alter($operation, $name, $type = null) |
236 | 236 | { |
237 | - if ($operation==='add') { |
|
237 | + if ($operation === 'add') { |
|
238 | 238 | $params = [ |
239 | 239 | 'index' => $this->index, |
240 | 240 | 'body' => [ |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | 'column' => ['name' => $name, 'type' => $type] |
243 | 243 | ] |
244 | 244 | ]; |
245 | - } elseif ($operation==='drop') { |
|
245 | + } elseif ($operation === 'drop') { |
|
246 | 246 | $params = [ |
247 | 247 | 'index' => $this->index, |
248 | 248 | 'body' => [ |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function setBody($params = null) |
14 | 14 | { |
15 | 15 | if (isset($this->index)) { |
16 | - $binds =[]; |
|
16 | + $binds = []; |
|
17 | 17 | $binds[] = "'" . self::escape($params['query']) . "'"; |
18 | 18 | $binds[] = "'" . $this->index . "'"; |
19 | 19 | if (count($params['options']) > 0) { |