@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | $this->client->connect(); |
30 | 30 | $response = $this->client->read(); |
31 | - if($response->getStatus() == "CONNECTED") { |
|
31 | + if ($response->getStatus() == "CONNECTED") { |
|
32 | 32 | return; |
33 | 33 | } |
34 | 34 | throw new ConnectionException; |
@@ -63,4 +63,4 @@ |
||
63 | 63 | return $this->get('count') ?? 0; |
64 | 64 | } |
65 | 65 | } |
66 | - |
|
67 | 66 | \ No newline at end of file |
67 | + |
|
68 | 68 | \ No newline at end of file |
@@ -29,25 +29,25 @@ discard block |
||
29 | 29 | { |
30 | 30 | $this->pieces = explode(" ", $this->message); |
31 | 31 | |
32 | - if(preg_match_all("/buffer\((\d+)\)/", $this->message, $matches)) { |
|
32 | + if (preg_match_all("/buffer\((\d+)\)/", $this->message, $matches)) { |
|
33 | 33 | $this->pieces['bufferSize'] = $matches[1][0]; |
34 | 34 | } |
35 | 35 | |
36 | 36 | $this->pieces['status'] = $this->pieces[0]; |
37 | 37 | unset($this->pieces[0]); |
38 | 38 | |
39 | - if($this->pieces['status'] === 'ERR') { |
|
39 | + if ($this->pieces['status'] === 'ERR') { |
|
40 | 40 | throw new CommandFailedException($this->message); |
41 | 41 | } |
42 | 42 | |
43 | - if($this->pieces['status'] === 'RESULT') { |
|
43 | + if ($this->pieces['status'] === 'RESULT') { |
|
44 | 44 | $this->pieces['count'] = (int) $this->pieces[1]; |
45 | 45 | unset($this->pieces[1]); |
46 | 46 | } |
47 | 47 | |
48 | - if($this->pieces['status'] === 'EVENT') { |
|
48 | + if ($this->pieces['status'] === 'EVENT') { |
|
49 | 49 | $this->pieces['query_key'] = $this->pieces[2]; |
50 | - $this->results = array_slice($this->pieces, 2, count($this->pieces)-4); |
|
50 | + $this->results = array_slice($this->pieces, 2, count($this->pieces) - 4); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function get($key) |
75 | 75 | { |
76 | - if(isset($this->pieces[$key])){ |
|
76 | + if (isset($this->pieces[$key])) { |
|
77 | 77 | return $this->pieces[$key]; |
78 | 78 | } |
79 | 79 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | * |
5 | 5 | */ |
6 | 6 | |
7 | -if(! function_exists('quote')) { |
|
7 | +if (!function_exists('quote')) { |
|
8 | 8 | /** |
9 | 9 | * append and prepend a string with double quotes |
10 | 10 | * @param string $string |
@@ -9,5 +9,5 @@ |
||
9 | 9 | * @return string |
10 | 10 | * ultimately a command instance get translated into a string |
11 | 11 | */ |
12 | - public function __toString(): string ; |
|
12 | + public function __toString(): string; |
|
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -18,14 +18,14 @@ |
||
18 | 18 | * @param string $text |
19 | 19 | * @param string $locale - a Valid ISO 639-3 locale (eng = English), if set to `none` lexing will be disabled |
20 | 20 | */ |
21 | - public function __construct(string $collection, string $bucket, string $object, string $text, string $locale=null) |
|
21 | + public function __construct(string $collection, string $bucket, string $object, string $text, string $locale = null) |
|
22 | 22 | { |
23 | 23 | $this->parameters = [ |
24 | 24 | 'collection' => $collection, |
25 | 25 | 'bucket' => $bucket, |
26 | 26 | 'object' => $object, |
27 | 27 | 'text' => quote($text), |
28 | - 'locale' => $locale ? "LANG($locale)": null, |
|
28 | + 'locale' => $locale ? "LANG($locale)" : null, |
|
29 | 29 | ]; |
30 | 30 | |
31 | 31 | parent::__construct($this->command, $this->parameters); |
@@ -23,8 +23,8 @@ |
||
23 | 23 | 'collection' => $collection, |
24 | 24 | 'bucket' => $bucket, |
25 | 25 | 'terms' => quote($terms), |
26 | - 'limit' => $limit ? "LIMIT($limit)": null, |
|
27 | - 'locale' => $locale ? "LANG($locale)": null, |
|
26 | + 'limit' => $limit ? "LIMIT($limit)" : null, |
|
27 | + 'locale' => $locale ? "LANG($locale)" : null, |
|
28 | 28 | ]; |
29 | 29 | |
30 | 30 | parent::__construct($this->command, $this->parameters); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @param string $terms |
17 | 17 | * @param null $limit |
18 | 18 | */ |
19 | - public function __construct(string $collection, string $bucket, string $terms, $limit = null, $locale=null) |
|
19 | + public function __construct(string $collection, string $bucket, string $terms, $limit = null, $locale = null) |
|
20 | 20 | { |
21 | 21 | $this->parameters = [ |
22 | 22 | 'collection' => $collection, |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $response = $this->send(new StartSearchChannelCommand($password)); |
33 | 33 | |
34 | 34 | if ($bufferSize = $response->get('bufferSize')) { |
35 | - $this->bufferSize = (int)$bufferSize; |
|
35 | + $this->bufferSize = (int) $bufferSize; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return $response; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $response = $this->send(new StartIngestChannelCommand($password)); |
36 | 36 | |
37 | 37 | if ($bufferSize = $response->get('bufferSize')) { |
38 | - $this->bufferSize = (int)$bufferSize; |
|
38 | + $this->bufferSize = (int) $bufferSize; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $response; |