@@ -42,6 +42,11 @@ |
||
42 | 42 | return json_decode($systems->getBody()); |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @param string $url |
|
47 | + * |
|
48 | + * @return string |
|
49 | + */ |
|
45 | 50 | private function prepareUrl($url) |
46 | 51 | { |
47 | 52 | $preparedUrl = str_replace("#project#", $this->project, $url); |
@@ -13,6 +13,9 @@ |
||
13 | 13 | return $this->getStatusCode(); |
14 | 14 | } |
15 | 15 | |
16 | + /** |
|
17 | + * @return string |
|
18 | + */ |
|
16 | 19 | public function getContentType() |
17 | 20 | { |
18 | 21 | $exploded = explode(';', $this->hasHeader('Content-Type') ? $this->getHeader('Content-Type')[0] : null); |
@@ -159,6 +159,10 @@ |
||
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | + /** |
|
163 | + * @param string $identifier |
|
164 | + * @param string $message |
|
165 | + */ |
|
162 | 166 | public function send($identifier, $system, $message, $status, $url = '', $value = 0) |
163 | 167 | { |
164 | 168 | $event = new Event($identifier, $system, $status, $this->tool, $message, $value); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | } else { |
174 | 174 | $system = $this->system; |
175 | 175 | } |
176 | - $this->send($identifier, $system, 'smoke', $message, self::STATUS_FAILURE, (string)$result->getUrl()); |
|
176 | + $this->send($identifier, $system, 'smoke', $message, self::STATUS_FAILURE, (string) $result->getUrl()); |
|
177 | 177 | $failedTests[] = $ruleLKey; |
178 | 178 | } |
179 | 179 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } else { |
189 | 189 | $system = $this->system; |
190 | 190 | } |
191 | - $this->send($identifier, $system, 'smoke_' . $rule . '_' . $result->getUrl(), self::STATUS_SUCCESS, (string)$result->getUrl()); |
|
191 | + $this->send($identifier, $system, 'smoke_' . $rule . '_' . $result->getUrl(), self::STATUS_SUCCESS, (string) $result->getUrl()); |
|
192 | 192 | } |
193 | 193 | } |
194 | 194 | } |
@@ -97,7 +97,7 @@ |
||
97 | 97 | |
98 | 98 | if ($configFile) { |
99 | 99 | if (strpos($configFile, 'http://') === 0) { |
100 | - $fileContent = (string)$this->getHttpClient()->get($configFile)->getBody(); |
|
100 | + $fileContent = (string) $this->getHttpClient()->get($configFile)->getBody(); |
|
101 | 101 | } else { |
102 | 102 | if (file_exists($configFile)) { |
103 | 103 | $fileContent = file_get_contents($configFile); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | } else { |
39 | - foreach($filters as $rule => $filteredUrls) { |
|
39 | + foreach ($filters as $rule => $filteredUrls) { |
|
40 | 40 | foreach ($filteredUrls as $uri) { |
41 | 41 | $this->filters[] = array('rule' => $rule, 'uri' => $uri); |
42 | 42 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | public function getSystem(UriInterface $uri) |
55 | 55 | { |
56 | - return $this->urls[(string)$uri]['system']; |
|
56 | + return $this->urls[(string) $uri]['system']; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function getSystems() |