@@ -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(); |
@@ -76,14 +76,14 @@ |
||
| 76 | 76 | if ($result->isFailure()) { |
| 77 | 77 | foreach ($result->getMessages() as $ruleLKey => $message) { |
| 78 | 78 | $identifier = 'smoke_' . $ruleLKey . '_' . $result->getUrl(); |
| 79 | - $this->send($identifier, $this->system, 'smoke', $message, self::STATUS_FAILURE, (string)$result->getUrl()); |
|
| 79 | + $this->send($identifier, $this->system, 'smoke', $message, self::STATUS_FAILURE, (string) $result->getUrl()); |
|
| 80 | 80 | $failedTests[] = $ruleLKey; |
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | foreach ($rules as $rule) { |
| 84 | 84 | if (!in_array($rule, $failedTests, true)) { |
| 85 | 85 | $identifier = 'smoke_' . $rule . '_' . $result->getUrl(); |
| 86 | - $this->send($identifier, $this->system, 'smoke_' . $rule, '', self::STATUS_SUCCESS, (string)$result->getUrl()); |
|
| 86 | + $this->send($identifier, $this->system, 'smoke_' . $rule, '', self::STATUS_SUCCESS, (string) $result->getUrl()); |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -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); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | return; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if(!file_exists($filename) ){ |
|
| 26 | + if (!file_exists($filename)) { |
|
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | return; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if(!file_exists($filename) ){ |
|
| 26 | + if (!file_exists($filename)) { |
|
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | |