Completed
Push — master ( 2be002...c3431f )
by Ma
02:18
created
src/Monitor/Monitor.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
             $serverData['status'] = 'offline';
57 57
         }
58 58
             $this->addServerHistory($serverData);
59
-            $this->notificationFacade->checkTriggers
60
-            (
59
+            $this->notificationFacade->checkTriggers(
61 60
                 $serverData,
62 61
                 $this->config->get('ms_in_hour')
63 62
             );
@@ -72,7 +71,7 @@  discard block
 block discarded – undo
72 71
 
73 72
     private function isClientValid()
74 73
     {
75
-        if (! $this->client) {
74
+        if (!$this->client) {
76 75
             throw new \Exception('Client is not valid');
77 76
         }
78 77
     }
@@ -99,7 +98,7 @@  discard block
 block discarded – undo
99 98
     {
100 99
         $reflection = new \ReflectionClass(new Model\ServerHistory);
101 100
         $properties = [];
102
-        foreach($reflection->getProperties() as $property) {
101
+        foreach ($reflection->getProperties() as $property) {
103 102
             $properties[] = $property->name;
104 103
         }
105 104
         unset($properties['id']);
@@ -130,7 +129,7 @@  discard block
 block discarded – undo
130 129
     {
131 130
         $resources = $this->client->getResources();
132 131
 
133
-        if (! $resources) {
132
+        if (!$resources) {
134 133
             $resources = json_encode(
135 134
                 array(
136 135
                 'status' => 'offline'
Please login to merge, or discard this patch.
src/Monitor/Notification/Trigger/TriggerMgr.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@  discard block
 block discarded – undo
94 94
             ->andWhere('nl.server_id = ?2')
95 95
             ->orderBy('nl.created', 'DESC')
96 96
             ->setMaxResults(1)
97
-            ->setParameters
98
-            (
97
+            ->setParameters(
99 98
                 [
100 99
                     '1' => $triggerId,
101 100
                     '2' => $serverId
@@ -103,7 +102,7 @@  discard block
 block discarded – undo
103 102
             );
104 103
         $query = $queryBuilder->getQuery();
105 104
         $queryResult = $query->getResult();
106
-        if(! $queryResult) {
105
+        if (!$queryResult) {
107 106
             return true;
108 107
         }
109 108
         $timeOfLastFiredUpTrigger = $queryResult[0]['created'];
@@ -149,7 +148,7 @@  discard block
 block discarded – undo
149 148
      */
150 149
     private function checkIsComparatorValid()
151 150
     {
152
-        if (! $this->comparator) {
151
+        if (!$this->comparator) {
153 152
             throw new \Exception('Comparator invalid');
154 153
         }
155 154
     }
@@ -164,7 +163,7 @@  discard block
 block discarded – undo
164 163
      */
165 164
     private function fireTrigger(Trigger $trigger, array $serverData, $msDelay)
166 165
     {
167
-        if (! $this->hasNotificationDelayExpired(
166
+        if (!$this->hasNotificationDelayExpired(
168 167
             $trigger->getId(),
169 168
             $serverData['server_id'],
170 169
             $msDelay
Please login to merge, or discard this patch.