@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->notificationDelay = $delay; |
42 | 42 | } |
43 | 43 | |
44 | - public function setDb(DatabaseInterface &$db) |
|
44 | + public function setDb(DatabaseInterface&$db) |
|
45 | 45 | { |
46 | 46 | $this->db = $db; |
47 | 47 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | private function checkIsComparatorValid() |
159 | 159 | { |
160 | - if (! $this->comparator) { |
|
160 | + if (!$this->comparator) { |
|
161 | 161 | throw new \Exception('Comparator invalid'); |
162 | 162 | } |
163 | 163 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | private function fireTrigger(Trigger $trigger, array $serverData, $msDelay) |
174 | 174 | { |
175 | - if (! $this->hasNotificationDelayExpired( |
|
175 | + if (!$this->hasNotificationDelayExpired( |
|
176 | 176 | $trigger->getId(), |
177 | 177 | $serverData['server_id'], |
178 | 178 | $msDelay |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | public function __construct() |
13 | 13 | { |
14 | - if (! is_callable('curl_init')) { |
|
14 | + if (!is_callable('curl_init')) { |
|
15 | 15 | throw new Exception('Curl function is not callable'); |
16 | 16 | } |
17 | 17 |
@@ -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 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | public function build($type) |
8 | 8 | { |
9 | 9 | $className = 'Monitor\Format\\'.ucwords($type); |
10 | - if (! class_exists($className)) { |
|
10 | + if (!class_exists($className)) { |
|
11 | 11 | throw new \Exception($type.' format class not found'); |
12 | 12 | } |
13 | 13 | return new $className; |
@@ -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; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | private $id; |
13 | 13 | /** |
14 | 14 | * @Column(type="integer") |
15 | - **/ |
|
15 | + **/ |
|
16 | 16 | private $notification_id; |
17 | 17 | /** |
18 | 18 | * @Column(type="integer") |
@@ -20,19 +20,19 @@ discard block |
||
20 | 20 | private $value; |
21 | 21 | /** |
22 | 22 | * @Column(type="string") |
23 | - **/ |
|
23 | + **/ |
|
24 | 24 | private $name; |
25 | 25 | /** |
26 | 26 | * @Column(type="string") |
27 | - **/ |
|
27 | + **/ |
|
28 | 28 | private $serviceName; |
29 | 29 | /** |
30 | 30 | * @Column(type="string") |
31 | - **/ |
|
31 | + **/ |
|
32 | 32 | private $operator; |
33 | 33 | /** |
34 | 34 | * @Column(type="string") |
35 | - **/ |
|
35 | + **/ |
|
36 | 36 | private $type; |
37 | 37 | |
38 | 38 | /** |
@@ -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 | } |