@@ -23,7 +23,7 @@ |
||
23 | 23 | public function init($destination, $expectedHttpStatus = 200) |
24 | 24 | { |
25 | 25 | $this->destination = $destination; |
26 | - $this->expectedHttpStatus = (int)$expectedHttpStatus; |
|
26 | + $this->expectedHttpStatus = (int) $expectedHttpStatus; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function setHttpClient(Client $client) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | exec($command, $output, $return); |
49 | 49 | |
50 | - return (int)$output[0]; |
|
50 | + return (int) $output[0]; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | public function init($file, $limit, $relation = self::RELATION_MAX, $pattern = null) |
75 | 75 | { |
76 | 76 | $this->file = $file; |
77 | - $this->pattern = (array)$pattern; |
|
77 | + $this->pattern = (array) $pattern; |
|
78 | 78 | $this->relation = $relation; |
79 | 79 | $this->limit = $limit; |
80 | 80 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | { |
49 | 49 | $uptimeTimestamp = \uptime(); |
50 | 50 | |
51 | - $systemStartDate = new \DateTime(date('Y-m-d H:i:s', (int)$uptimeTimestamp)); |
|
51 | + $systemStartDate = new \DateTime(date('Y-m-d H:i:s', (int) $uptimeTimestamp)); |
|
52 | 52 | $now = new \DateTime(); |
53 | 53 | |
54 | 54 | $uptime = $systemStartDate->diff($now); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | protected function execute(InputInterface $input, OutputInterface $output) |
28 | 28 | { |
29 | - $configFile = (string)$input->getArgument('config'); |
|
29 | + $configFile = (string) $input->getArgument('config'); |
|
30 | 30 | |
31 | 31 | if (!file_exists($configFile)) { |
32 | 32 | throw new \RuntimeException('Unable to find config file.'); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | exec($command, $output, $returnValue); |
25 | 25 | |
26 | - $isRunning = ((bool)$output[0]); |
|
26 | + $isRunning = ((bool) $output[0]); |
|
27 | 27 | |
28 | 28 | if ($isRunning) { |
29 | 29 | return new Result(Result::STATUS_PASS, 'The docker container ' . $this->containerName . ' is running.'); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | // @todo handle metric aware checks |
30 | 30 | |
31 | 31 | if ($result->getStatus() == Result::STATUS_FAIL) { |
32 | - $currentErrorsInARow = (int)$this->cache->get('errorsInARow'); |
|
32 | + $currentErrorsInARow = (int) $this->cache->get('errorsInARow'); |
|
33 | 33 | $currentErrorsInARow++; |
34 | 34 | |
35 | 35 | $this->cache->set('errorsInARow', $currentErrorsInARow); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | $result = $this->getCheck()->run(); |
23 | 23 | |
24 | - $currentHour = (int)date('H'); |
|
24 | + $currentHour = (int) date('H'); |
|
25 | 25 | |
26 | 26 | if ($result->getStatus() == Result::STATUS_FAIL) { |
27 | 27 | if ($currentHour == $this->hour) { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | if (file_exists($this->filename)) { |
25 | 25 | return new Result(Result::STATUS_PASS, 'The file "' . $this->filename . '" exists.'); |
26 | - }else{ |
|
26 | + } else { |
|
27 | 27 | return new Result(Result::STATUS_FAIL, 'The file "' . $this->filename . '" does not exist.'); |
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | if (file_exists($this->filename)) { |
25 | 25 | return new Result(Result::STATUS_PASS, 'The file "' . $this->filename . '" exists.'); |
26 | - }else{ |
|
26 | + } else{ |
|
27 | 27 | return new Result(Result::STATUS_FAIL, 'The file "' . $this->filename . '" does not exist.'); |
28 | 28 | } |
29 | 29 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | exec($command, $output); |
29 | 29 | |
30 | - $count = (int)$output[0] - 2; |
|
30 | + $count = (int) $output[0] - 2; |
|
31 | 31 | |
32 | 32 | if ($count > $this->maxNumber) { |
33 | 33 | $result = new MetricAwareResult(Result::STATUS_FAIL, 'Too many processes found "' . $this->processName . '" (current: ' . $count . ', expected < ' . $this->maxNumber . ').'); |