@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | private function isClientValid() |
70 | 70 | { |
71 | - if (! $this->client) { |
|
71 | + if (!$this->client) { |
|
72 | 72 | throw new \Exception('Client is not valid'); |
73 | 73 | } |
74 | 74 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $resources = $this->client->getResources(); |
106 | 106 | |
107 | - if (! $resources) { |
|
107 | + if (!$resources) { |
|
108 | 108 | $resources = json_encode( |
109 | 109 | array( |
110 | 110 | 'status' => 'offline' |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | public function compare(Trigger $trigger, array $serverData, array $services, PercentageHelper $percentageHelper, ComparatorInterface $comparator) |
12 | 12 | { |
13 | - if (! isset($serverData[$trigger->getServiceName()])) { |
|
13 | + if (!isset($serverData[$trigger->getServiceName()])) { |
|
14 | 14 | return false; |
15 | 15 | } |
16 | 16 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | private function isFileReadable($fullPath) |
50 | 50 | { |
51 | - if (! is_readable($fullPath)) { |
|
51 | + if (!is_readable($fullPath)) { |
|
52 | 52 | throw new \Exception('config is not readable'); |
53 | 53 | } |
54 | 54 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function convertToArray($data) |
14 | 14 | { |
15 | 15 | $array = json_decode($data, true); |
16 | - if (! is_array($array)) { |
|
16 | + if (!is_array($array)) { |
|
17 | 17 | $array = []; |
18 | 18 | } |
19 | 19 | return $array; |
@@ -13,11 +13,11 @@ |
||
13 | 13 | public function convertToArray($data) |
14 | 14 | { |
15 | 15 | $xml = simplexml_load_string($data); |
16 | - if (! $xml) { |
|
16 | + if (!$xml) { |
|
17 | 17 | throw new \Exception('Cant\'t parse xml'); |
18 | 18 | } |
19 | 19 | $array = json_decode(json_encode((array) $xml), true); |
20 | - if (! is_array($array)) { |
|
20 | + if (!is_array($array)) { |
|
21 | 21 | $array = []; |
22 | 22 | } |
23 | 23 | return $array; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | public function getService($className) |
8 | 8 | { |
9 | 9 | $className = __NAMESPACE__.'\\'.$className; |
10 | - if (! class_exists($className)) { |
|
10 | + if (!class_exists($className)) { |
|
11 | 11 | throw new \Exception($className.' Service class not found'); |
12 | 12 | } |
13 | 13 | return new $className; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | $service = $serviceRepository->findOneBy(['name' => $trigger->getServiceName()]); |
13 | 13 | |
14 | - if (! $service) { |
|
14 | + if (!$service) { |
|
15 | 15 | //$log->error('cant find service') |
16 | 16 | return false; |
17 | 17 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | public function getService($className) |
8 | 8 | { |
9 | 9 | $className = __NAMESPACE__.'\\'.$className; |
10 | - if (! class_exists($className)) { |
|
10 | + if (!class_exists($className)) { |
|
11 | 11 | throw new \Exception($className.' Service class not found'); |
12 | 12 | } |
13 | 13 | return new $className; |
@@ -13,8 +13,8 @@ |
||
13 | 13 | public function getServicePercentage(array $serverData, $service) |
14 | 14 | { |
15 | 15 | list($column1, $column2) = array_pad(explode(":", $service->getDBColumns()), 2, 1); |
16 | - if (! isset($serverData[$column1]) |
|
17 | - || ! isset($serverData[$column2])) { |
|
16 | + if (!isset($serverData[$column1]) |
|
17 | + || !isset($serverData[$column2])) { |
|
18 | 18 | return 0; |
19 | 19 | } |
20 | 20 | if (is_numeric($column2)) { |