@@ -23,7 +23,7 @@ |
||
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); |
@@ -12,14 +12,14 @@ |
||
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 | } |
@@ -19,7 +19,7 @@ |
||
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 | } |
@@ -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,8 +52,8 @@ discard block |
||
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) { |
@@ -15,7 +15,7 @@ |
||
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) { |