@@ -27,7 +27,7 @@ |
||
27 | 27 | ) { |
28 | 28 | $service = $serviceRepository->findOneBy(['name' => $trigger->getServiceName()]); |
29 | 29 | |
30 | - if ( ! $service) { |
|
30 | + if (!$service) { |
|
31 | 31 | //$log->error('cant find service') |
32 | 32 | return false; |
33 | 33 | } |
@@ -17,8 +17,8 @@ |
||
17 | 17 | public function getServicePercentage(array $serverData, Service $service) |
18 | 18 | { |
19 | 19 | list($column1, $column2) = array_pad(explode(":", $service->getDBColumns()), 2, 1); |
20 | - if ( ! isset($serverData[$column1]) |
|
21 | - || ! isset($serverData[$column2])) { |
|
20 | + if (!isset($serverData[$column1]) |
|
21 | + || !isset($serverData[$column2])) { |
|
22 | 22 | return 0; |
23 | 23 | } |
24 | 24 | if (is_numeric($column2)) { |
@@ -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; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | /** |
29 | 29 | * Use strategy to compare trigger value |
30 | 30 | * |
31 | - * @param Monitor\Model\Trigger $trigger |
|
31 | + * @param Trigger $trigger |
|
32 | 32 | * @param array $serverData |
33 | 33 | * @param \Doctrine\ORM\EntityRepository $serviceRepository |
34 | 34 | * @param \Monitor\Utils\PercentageHelper $percentageHelper |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | public function shouldTriggerBeFired(Trigger $trigger, array $serverData, $msDelay) |
111 | 111 | { |
112 | 112 | $this->checkIsComparatorValid(); |
113 | - if ( ! $this->notificationMgr->hasNotificationDelayExpired( |
|
113 | + if (!$this->notificationMgr->hasNotificationDelayExpired( |
|
114 | 114 | $trigger->getId(), |
115 | 115 | $serverData['server_id'], |
116 | 116 | $msDelay |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | private function checkIsComparatorValid() |
137 | 137 | { |
138 | - if ( ! $this->comparator) { |
|
138 | + if (!$this->comparator) { |
|
139 | 139 | throw new \Exception('Comparator invalid'); |
140 | 140 | } |
141 | 141 | } |