Completed
Push — master ( cbe5ce...eaeb44 )
by Ma
05:30
created
src/Monitor/Monitor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'
Please login to merge, or discard this patch.
src/Monitor/Notification/Facade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function __construct(
17 17
         ConfigInterface $config,
18
-        DatabaseInterface &$db,
18
+        DatabaseInterface&$db,
19 19
         NotificationMgr $notificationMgr,
20 20
         Triggers $triggers,
21 21
         ServiceFactory $serviceFactory
Please login to merge, or discard this patch.
src/Monitor/Notification/Parser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      * @param  array        $data
12 12
      * @return
13 13
      */
14
-    public function parse(Notification &$notification, array $data)
14
+    public function parse(Notification&$notification, array $data)
15 15
     {
16 16
         $message = $notification->getMessageTemplate();
17 17
         //get all words in {} brackets
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         foreach ($vars[1] as $var) {
20 20
             //if $data has key named as previous fetched word we replace it with $data value
21 21
             if (isset($data[$var])) {
22
-                $message = preg_replace("{{" . $var . "}}", $data[$var], $message);
22
+                $message = preg_replace("{{".$var."}}", $data[$var], $message);
23 23
             }
24 24
         }
25 25
         $notification->setMessage($message);
Please login to merge, or discard this patch.
src/Monitor/Notification/Trigger/Comparator/Comparator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
                 return $this->equal($value, $trigger->getValue());
28 28
 
29 29
             case "!=":
30
-                return ! $this->equal($value, $trigger->getValue());
30
+                return !$this->equal($value, $trigger->getValue());
31 31
         }
32 32
         return false;
33 33
     }
Please login to merge, or discard this patch.
src/Monitor/Notification/Trigger/Comparator/Strategy/DefaultStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Monitor/Notification/Trigger/Triggers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.