Completed
Push — master ( c6aa78...371b23 )
by Ma
02:28
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/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/Config/ConfigJson.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     private function isFileReadable($fullPath)
50 50
     {
51
-        if (! is_readable($fullPath)) {
51
+        if (!is_readable($fullPath)) {
52 52
             throw new \Exception('config is not readable');
53 53
         }
54 54
     }
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/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.
Notification/Trigger/Comparator/Strategy/ServicePercentageStrategy.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
         $service = $serviceRepository->findOneBy(['name' => $trigger->getServiceName()]);
13 13
 
14
-        if (! $service) {
14
+        if (!$service) {
15 15
             //$log->error('cant find service')
16 16
             return false;
17 17
         }
Please login to merge, or discard this patch.
src/Monitor/Format/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.
src/Monitor/Utils/PercentageHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
     public function getServicePercentage(array $serverData, $service)
14 14
     {
15 15
         list($column1, $column2) = array_pad(explode(":", $service->getDBColumns()), 2, 1);
16
-        if (! isset($serverData[$column1])
17
-            || ! isset($serverData[$column2])) {
16
+        if (!isset($serverData[$column1])
17
+            || !isset($serverData[$column2])) {
18 18
             return 0;
19 19
         }
20 20
         if (is_numeric($column2)) {
Please login to merge, or discard this patch.