Completed
Push — master ( 4042dc...8f92db )
by Eric
8s
created
src/Monitors/DiskUsageMonitor.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
     }
102 102
 
103 103
     /**
104
-     * @return mixed|string
104
+     * @return string
105 105
      */
106 106
     public function getPath()
107 107
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace EricMakesStuff\ServerMonitor\Monitors;
4 4
 
5
-use Carbon\Carbon;
6 5
 use EricMakesStuff\ServerMonitor\Events\DiskUsageAlarm;
7 6
 use EricMakesStuff\ServerMonitor\Events\DiskUsageHealthy;
8 7
 use EricMakesStuff\ServerMonitor\Exceptions\InvalidPath;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function runMonitor()
51 51
     {
52
-        if (! file_exists($this->path)) {
52
+        if (!file_exists($this->path)) {
53 53
             throw InvalidPath::pathDoesNotExist($this->path);
54 54
         }
55 55
 
56 56
         $this->totalSpace = disk_total_space($this->path);
57 57
 
58
-        $this->freeSpace= disk_free_space($this->path);
58
+        $this->freeSpace = disk_free_space($this->path);
59 59
         
60 60
         $this->usedSpace = $this->totalSpace - $this->freeSpace;
61 61
 
62
-        $this->percentageUsed = sprintf('%.2f',($this->usedSpace / $this->totalSpace) * 100);
62
+        $this->percentageUsed = sprintf('%.2f', ($this->usedSpace / $this->totalSpace) * 100);
63 63
         
64 64
         if ($this->percentageUsed >= $this->alarmPercentage) {
65 65
             event(new DiskUsageAlarm($this));
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function getPercentageUsed()
99 99
     {
100
-        return $this->percentageUsed . '%';
100
+        return $this->percentageUsed.'%';
101 101
     }
102 102
 
103 103
     /**
@@ -113,6 +113,6 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getAlarmPercentage()
115 115
     {
116
-        return $this->alarmPercentage . '%';
116
+        return $this->alarmPercentage.'%';
117 117
     }
118 118
 }
Please login to merge, or discard this patch.
src/Notifications/Senders/Mail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function send()
30 30
     {
31
-        $this->mailer->raw($this->message, function (Message $message) {
31
+        $this->mailer->raw($this->message, function(Message $message) {
32 32
 
33 33
             $message
34 34
                 ->subject($this->subject)
Please login to merge, or discard this patch.
src/Notifications/Notifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $senderNames = config("server-monitor.notifications.events.{$eventName}");
63 63
 
64 64
         collect($senderNames)
65
-            ->map(function ($senderName) {
65
+            ->map(function($senderName) {
66 66
                 $className = $senderName;
67 67
 
68 68
                 if (file_exists(__DIR__.'/Senders/'.ucfirst($senderName).'.php')) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
                 return app($className);
73 73
             })
74
-            ->each(function (SendsNotifications $sender) use ($subject, $message, $type) {
74
+            ->each(function(SendsNotifications $sender) use ($subject, $message, $type) {
75 75
                 try {
76 76
                     $sender
77 77
                         ->setSubject($subject)
Please login to merge, or discard this patch.
src/Commands/RunCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     {
22 22
         $monitors = ServerMonitorFactory::createForMonitorConfig(config('server-monitor.monitors'));
23 23
 
24
-        $monitors->each(function (BaseMonitor $monitor) {
24
+        $monitors->each(function(BaseMonitor $monitor) {
25 25
             $monitor->runMonitor();
26 26
         });
27 27
     }
Please login to merge, or discard this patch.