Passed
Push — master ( 5e1a01...bd8e7e )
by Nils
02:42
created
src/Metrics/Collector/Collector.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,9 @@  discard block
 block discarded – undo
58 58
             if ($metric->isApplicable()) {
59 59
                 $lastValue = Memory::getInstance()->getLastData($metric->getName(), -1);
60 60
                 $currentValue = $metric->getValue($lastValue);
61
-                if ($currentValue >= 0) Memory::getInstance()->addData($metric->getName(), $currentValue);
61
+                if ($currentValue >= 0) {
62
+                    Memory::getInstance()->addData($metric->getName(), $currentValue);
63
+                }
62 64
                 $metricResults[$metric->getName()] = max(0, $currentValue);
63 65
             }
64 66
         }
@@ -72,7 +74,9 @@  discard block
 block discarded – undo
72 74
 
73 75
         $file = new File();
74 76
 
75
-        if (!$file->fileExists('/proc/net/dev')) return 0;
77
+        if (!$file->fileExists('/proc/net/dev')) {
78
+            return 0;
79
+        }
76 80
 
77 81
         $lines = $file->getContents('/proc/net/dev', true);
78 82
         foreach ($lines as $line) {
@@ -85,7 +89,9 @@  discard block
 block discarded – undo
85 89
             }
86 90
         }
87 91
 
88
-        if (!isset($total)) return 0;
92
+        if (!isset($total)) {
93
+            return 0;
94
+        }
89 95
 
90 96
         $history = $memory->getData(self::MEMORY_KEY) ?? [];
91 97
 
Please login to merge, or discard this patch.