@@ -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 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $response = $this->send(new StartIngestChannelCommand); |
36 | 36 | |
37 | - if($bufferSize = $response->get('bufferSize')){ |
|
37 | + if ($bufferSize = $response->get('bufferSize')) { |
|
38 | 38 | $this->bufferSize = (int) $bufferSize; |
39 | 39 | } |
40 | 40 | |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function push(string $collection, string $bucket, string $object, string $text) |
52 | 52 | { |
53 | - $chunks = $this->splitString($collection,$bucket, $object, $text); |
|
53 | + $chunks = $this->splitString($collection, $bucket, $object, $text); |
|
54 | 54 | |
55 | - if($text == "" || empty($chunks)) { |
|
55 | + if ($text == "" || empty($chunks)) { |
|
56 | 56 | throw new InvalidArgumentException("The parameter \$text is empty"); |
57 | 57 | } |
58 | 58 | foreach ($chunks as $chunk) { |
59 | 59 | $message = $this->send(new PushCommand($collection, $bucket, $object, $chunk)); |
60 | - if($message == false || $message == "") { |
|
60 | + if ($message == false || $message == "") { |
|
61 | 61 | throw new InvalidArgumentException(); |
62 | 62 | } |
63 | 63 | } |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function pop(string $collection, string $bucket, string $object, string $text) |
75 | 75 | { |
76 | - $chunks = $this->splitString($collection,$bucket, $object, $text); |
|
76 | + $chunks = $this->splitString($collection, $bucket, $object, $text); |
|
77 | 77 | |
78 | 78 | foreach ($chunks as $chunk) { |
79 | 79 | $message = $this->send(new PopCommand($collection, $bucket, $object, $chunk)); |
80 | - if($message == false || $message == "") { |
|
80 | + if ($message == false || $message == "") { |
|
81 | 81 | throw new InvalidArgumentException(); |
82 | 82 | } |
83 | 83 | } |
@@ -27,21 +27,21 @@ discard block |
||
27 | 27 | { |
28 | 28 | $this->pieces = explode(" ", $this->message); |
29 | 29 | |
30 | - if(preg_match_all("/buffer\((\d+)\)/", $this->message, $matches)) { |
|
30 | + if (preg_match_all("/buffer\((\d+)\)/", $this->message, $matches)) { |
|
31 | 31 | $this->pieces['bufferSize'] = $matches[1][0]; |
32 | 32 | } |
33 | 33 | |
34 | 34 | $this->pieces['status'] = $this->pieces[0]; |
35 | 35 | unset($this->pieces[0]); |
36 | 36 | |
37 | - if($this->pieces['status'] === 'RESULT') { |
|
37 | + if ($this->pieces['status'] === 'RESULT') { |
|
38 | 38 | $this->pieces['count'] = (int) $this->pieces[1]; |
39 | 39 | unset($this->pieces[1]); |
40 | 40 | } |
41 | 41 | |
42 | - if($this->pieces['status'] === 'EVENT') { |
|
42 | + if ($this->pieces['status'] === 'EVENT') { |
|
43 | 43 | $this->pieces['query_key'] = $this->pieces[2]; |
44 | - $this->results = array_slice($this->pieces, 2, count($this->pieces)-4); |
|
44 | + $this->results = array_slice($this->pieces, 2, count($this->pieces) - 4); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function get($key) |
69 | 69 | { |
70 | - if(isset($this->pieces[$key])){ |
|
70 | + if (isset($this->pieces[$key])) { |
|
71 | 71 | return $this->pieces[$key]; |
72 | 72 | } |
73 | 73 | } |