@@ -56,6 +56,6 @@ |
||
56 | 56 | ); |
57 | 57 | } |
58 | 58 | |
59 | - throw new Exception\ServerException("Unexpected response: " . $responseLine); |
|
59 | + throw new Exception\ServerException("Unexpected response: ".$responseLine); |
|
60 | 60 | } |
61 | 61 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | public function getCommandLine(): string |
15 | 15 | { |
16 | - return 'watch ' . $this->tube; |
|
16 | + return 'watch '.$this->tube; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function parseResponse(string $responseLine, ?string $responseData): ArrayResponse |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } elseif ($responseLine == ResponseInterface::RESPONSE_PAUSED) { |
50 | 50 | return $this->createResponse(ResponseInterface::RESPONSE_PAUSED); |
51 | 51 | } else { |
52 | - throw new Exception('Unhandled response: "' . $responseLine . '"'); |
|
52 | + throw new Exception('Unhandled response: "'.$responseLine.'"'); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function getCommandLine(): string |
28 | 28 | { |
29 | - return 'kick ' . $this->max; |
|
29 | + return 'kick '.$this->max; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /* (non-phpdoc) |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | public function getCommandLine(): string |
25 | 25 | { |
26 | - return 'kick-job ' . $this->jobId; |
|
26 | + return 'kick-job '.$this->jobId; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /* (non-phpdoc) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } elseif ($responseLine == ResponseInterface::RESPONSE_KICKED) { |
41 | 41 | return $this->createResponse(ResponseInterface::RESPONSE_KICKED); |
42 | 42 | } else { |
43 | - throw new Exception('Unhandled response: ' . $responseLine); |
|
43 | + throw new Exception('Unhandled response: '.$responseLine); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | public function getCommandLine(): string |
18 | 18 | { |
19 | - return 'delete ' . $this->jobId; |
|
19 | + return 'delete '.$this->jobId; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function parseResponse(string $responseLine, ?string $responseData): ArrayResponse |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function listTubes(): array |
110 | 110 | { |
111 | - return (array)$this->dispatch( |
|
111 | + return (array) $this->dispatch( |
|
112 | 112 | new Command\ListTubesCommand() |
113 | 113 | ); |
114 | 114 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function listTubesWatched(bool $askServer = false): array |
120 | 120 | { |
121 | 121 | if ($askServer) { |
122 | - $response = (array)$this->dispatch( |
|
122 | + $response = (array) $this->dispatch( |
|
123 | 123 | new Command\ListTubesWatchedCommand() |
124 | 124 | ); |
125 | 125 | $this->watching = array_fill_keys($response, true); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | )); |
52 | 52 | } |
53 | 53 | |
54 | - $lines = array_filter(explode("\n", $responseData), function ($line) { |
|
54 | + $lines = array_filter(explode("\n", $responseData), function($line) { |
|
55 | 55 | return !empty($line) && $line !== '---'; |
56 | 56 | }); |
57 | 57 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $data = []; |
64 | 64 | foreach ($lines as $line) { |
65 | 65 | if (strncmp($line, '- ', 2) !== 0) { |
66 | - throw new ClientException("YAML parse error for line: $line" . print_r($lines, true)); |
|
66 | + throw new ClientException("YAML parse error for line: $line".print_r($lines, true)); |
|
67 | 67 | } |
68 | 68 | $data[] = substr($line, 2); |
69 | 69 | } |
@@ -73,10 +73,10 @@ |
||
73 | 73 | { |
74 | 74 | $socket = $this->getSocket(); |
75 | 75 | |
76 | - $to_send = $command->getCommandLine() . self::CRLF; |
|
76 | + $to_send = $command->getCommandLine().self::CRLF; |
|
77 | 77 | |
78 | 78 | if ($command->hasData()) { |
79 | - $to_send .= $command->getData() . self::CRLF; |
|
79 | + $to_send .= $command->getData().self::CRLF; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $socket->write($to_send); |