Completed
Push — master ( c4751f...6c241b )
by Ma
24:41 queued 19:02
created
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/Client/Http/Http.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Monitor/Notification/Trigger/Comparator/Comparator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
                 return $this->moreThan($value, $trigger->getValue());
22 22
 
23 23
             case "<":
24
-                return ! $this->moreThan($value, $trigger->getValue());
24
+                return !$this->moreThan($value, $trigger->getValue());
25 25
 
26 26
             case "=":
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/Config/ConfigJson.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      */
88 88
     private function isFileReadable($fullPath)
89 89
     {
90
-        if ( ! is_readable($fullPath)) {
90
+        if (!is_readable($fullPath)) {
91 91
             throw new \Exception('Config is not readable');
92 92
         }
93 93
     }
Please login to merge, or discard this patch.
src/Monitor/Format/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Monitor/Format/Xml.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Monitor/Monitor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     private function isClientValid()
127 127
     {
128
-        if ( ! $this->client) {
128
+        if (!$this->client) {
129 129
             throw new \Exception('Client is not valid');
130 130
         }
131 131
     }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         $resources = $this->client->getResources();
194 194
 
195
-        if ( ! $resources) {
195
+        if (!$resources) {
196 196
             $resources = json_encode(
197 197
                 ['status' => 'offline']
198 198
             );
Please login to merge, or discard this patch.
src/Monitor/Notification/NotificationMgr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
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'];
Please login to merge, or discard this patch.
src/Monitor/Notification/Service/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.