@@ -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); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** @var \Ivory\HttpAdapter\HttpAdapterException $exception */ |
53 | 53 | |
54 | 54 | $mainUri = $request->getUri(); |
55 | - $this->redirects[(string)$mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl] = (string)$mainUri; |
|
55 | + $this->redirects[(string) $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl] = (string) $mainUri; |
|
56 | 56 | |
57 | 57 | $this->urls[] = ['url' => $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl, 'system' => $url['system']]; |
58 | 58 | $this->urlStack[] = ['url' => $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl, 'system' => $url['system']]; |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | |
79 | 79 | public function getSystem(UriInterface $uri) |
80 | 80 | { |
81 | - if (array_key_exists((string)$uri, $this->redirects)) { |
|
82 | - return $this->urls[$this->redirects[(string)$uri]]['system']; |
|
81 | + if (array_key_exists((string) $uri, $this->redirects)) { |
|
82 | + return $this->urls[$this->redirects[(string) $uri]]['system']; |
|
83 | 83 | } |
84 | - return $this->urls[(string)$uri]['system']; |
|
84 | + return $this->urls[(string) $uri]['system']; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | public function getSystems() |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | public function validate(Response $response) |
15 | 15 | { |
16 | - $url = $response->getUri()->getScheme() . '://' . $response->getUri()->getHost(); |
|
16 | + $url = $response->getUri()->getScheme() . '://' . $response->getUri()->getHost(); |
|
17 | 17 | |
18 | 18 | if (substr_count($url, '/') === 2) { |
19 | 19 | $filename = $robotsUrl = $url . '/robots.txt'; |