@@ -70,6 +70,11 @@ |
||
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | + /** |
|
| 74 | + * @param string $identifier |
|
| 75 | + * @param string $tool |
|
| 76 | + * @param string $status |
|
| 77 | + */ |
|
| 73 | 78 | public function send($identifier, $system, $tool, $message, $status, $url = "") |
| 74 | 79 | { |
| 75 | 80 | $curl = curl_init(); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | foreach ($result->getMessages() as $ruleLKey => $message) { |
| 56 | 56 | $identifier = "smoke_" . $ruleLKey . "_" . $result->getUrl(); |
| 57 | 57 | $system = str_replace("http://", "", $result->getUrl()); |
| 58 | - $this->send($identifier, $system, 'smoke_' . $ruleLKey, $message, self::STATUS_FAILURE, (string)$result->getUrl()); |
|
| 58 | + $this->send($identifier, $system, 'smoke_' . $ruleLKey, $message, self::STATUS_FAILURE, (string) $result->getUrl()); |
|
| 59 | 59 | $failedTests[] = $ruleLKey; |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | if (!in_array($rule, $failedTests)) { |
| 65 | 65 | $identifier = "smoke_" . $rule . "_" . $result->getUrl(); |
| 66 | 66 | $system = str_replace("http://", "", $result->getUrl()); |
| 67 | - $this->send($identifier, $system, 'smoke_' . $rule, "", self::STATUS_SUCCESS, (string)$result->getUrl()); |
|
| 67 | + $this->send($identifier, $system, 'smoke_' . $rule, "", self::STATUS_SUCCESS, (string) $result->getUrl()); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | } |
@@ -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); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | public function next() |
| 54 | 54 | { |
| 55 | - if(empty($this->systems)) { |
|
| 55 | + if (empty($this->systems)) { |
|
| 56 | 56 | return false; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function validate(Response $response) |
| 15 | 15 | { |
| 16 | - $url = (string)$response->getUri(); |
|
| 16 | + $url = (string) $response->getUri(); |
|
| 17 | 17 | |
| 18 | 18 | if (substr_count($url, '/') == 2) { |
| 19 | 19 | $filename = $robotsUrl = $url . "/robots.txt"; |