@@ -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 |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @access private |
83 | 83 | * @param Trigger $trigger |
84 | 84 | * @param array $serverData |
85 | - * @return \Monitor\Notification\Notification |
|
85 | + * @return Notification|null |
|
86 | 86 | */ |
87 | 87 | private function prepareNotification(Trigger $trigger, array $serverData) |
88 | 88 | { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * |
121 | 121 | * @param Trigger $trigger |
122 | 122 | * @param array $serverData |
123 | - * @return \Monitor\Notification\Notification |
|
123 | + * @return Notification|null |
|
124 | 124 | */ |
125 | 125 | public function triggerHasBeenFired(Trigger $trigger, array $serverData) |
126 | 126 | { |
@@ -95,7 +95,7 @@ |
||
95 | 95 | $triggerId, |
96 | 96 | $serverId |
97 | 97 | ); |
98 | - if ( ! $queryResult) { |
|
98 | + if (!$queryResult) { |
|
99 | 99 | return true; |
100 | 100 | } |
101 | 101 | $timeOfLastFiredUpTrigger = $queryResult[0]['created']; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | public function shouldTriggerBeFired(Trigger $trigger, array $serverData, $msDelay) |
83 | 83 | { |
84 | 84 | $this->checkIsComparatorValid(); |
85 | - if ( ! $this->notifier->hasNotificationDelayExpired( |
|
85 | + if (!$this->notifier->hasNotificationDelayExpired( |
|
86 | 86 | $trigger->getId(), |
87 | 87 | $serverData['server_id'], |
88 | 88 | $msDelay |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | private function checkIsComparatorValid() |
109 | 109 | { |
110 | - if ( ! $this->comparator) { |
|
110 | + if (!$this->comparator) { |
|
111 | 111 | throw new \Exception('Comparator invalid'); |
112 | 112 | } |
113 | 113 | } |