Completed
Push — master ( c2ca21...521c0e )
by Freek
11s
created
src/CheckCollection.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Countable;
6 6
 use Illuminate\Support\Collection;
7
-use Spatie\ServerMonitor\Models\Check;
8 7
 use Spatie\ServerMonitor\Helpers\ConsoleOutput;
8
+use Spatie\ServerMonitor\Models\Check;
9 9
 
10 10
 class CheckCollection implements Countable
11 11
 {
Please login to merge, or discard this patch.
src/Notifications/BaseNotification.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\ServerMonitor\Notifications;
4 4
 
5
-use Spatie\ServerMonitor\Models\Check;
6 5
 use Illuminate\Notifications\Notification;
6
+use Spatie\ServerMonitor\Models\Check;
7 7
 
8 8
 abstract class BaseNotification extends Notification
9 9
 {
Please login to merge, or discard this patch.
src/Notifications/Notifications/CheckFailed.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Carbon\Carbon;
6 6
 use Illuminate\Notifications\Messages\MailMessage;
7
-use Spatie\ServerMonitor\Models\Enums\CheckStatus;
8
-use Illuminate\Notifications\Messages\SlackMessage;
9 7
 use Illuminate\Notifications\Messages\SlackAttachment;
10
-use Spatie\ServerMonitor\Notifications\BaseNotification;
8
+use Illuminate\Notifications\Messages\SlackMessage;
11 9
 use Spatie\ServerMonitor\Events\CheckFailed as CheckFailedEvent;
10
+use Spatie\ServerMonitor\Models\Enums\CheckStatus;
11
+use Spatie\ServerMonitor\Notifications\BaseNotification;
12 12
 
13 13
 class CheckFailed extends BaseNotification
14 14
 {
Please login to merge, or discard this patch.
src/Notifications/Notifications/CheckRestored.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Carbon\Carbon;
6 6
 use Illuminate\Notifications\Messages\MailMessage;
7
-use Spatie\ServerMonitor\Models\Enums\CheckStatus;
8
-use Illuminate\Notifications\Messages\SlackMessage;
9 7
 use Illuminate\Notifications\Messages\SlackAttachment;
10
-use Spatie\ServerMonitor\Notifications\BaseNotification;
8
+use Illuminate\Notifications\Messages\SlackMessage;
11 9
 use Spatie\ServerMonitor\Events\CheckRestored as CheckRestoredEvent;
10
+use Spatie\ServerMonitor\Models\Enums\CheckStatus;
11
+use Spatie\ServerMonitor\Notifications\BaseNotification;
12 12
 
13 13
 class CheckRestored extends BaseNotification
14 14
 {
Please login to merge, or discard this patch.
src/Notifications/Notifications/CheckSucceeded.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Carbon\Carbon;
6 6
 use Illuminate\Notifications\Messages\MailMessage;
7
-use Spatie\ServerMonitor\Models\Enums\CheckStatus;
8
-use Illuminate\Notifications\Messages\SlackMessage;
9 7
 use Illuminate\Notifications\Messages\SlackAttachment;
10
-use Spatie\ServerMonitor\Notifications\BaseNotification;
8
+use Illuminate\Notifications\Messages\SlackMessage;
11 9
 use Spatie\ServerMonitor\Events\CheckSucceeded as CheckSucceededEvent;
10
+use Spatie\ServerMonitor\Models\Enums\CheckStatus;
11
+use Spatie\ServerMonitor\Notifications\BaseNotification;
12 12
 
13 13
 class CheckSucceeded extends BaseNotification
14 14
 {
Please login to merge, or discard this patch.
src/Notifications/Notifications/CheckWarning.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Carbon\Carbon;
6 6
 use Illuminate\Notifications\Messages\MailMessage;
7
-use Spatie\ServerMonitor\Models\Enums\CheckStatus;
8
-use Illuminate\Notifications\Messages\SlackMessage;
9 7
 use Illuminate\Notifications\Messages\SlackAttachment;
10
-use Spatie\ServerMonitor\Notifications\BaseNotification;
8
+use Illuminate\Notifications\Messages\SlackMessage;
11 9
 use Spatie\ServerMonitor\Events\CheckWarning as CheckWarningEvent;
10
+use Spatie\ServerMonitor\Models\Enums\CheckStatus;
11
+use Spatie\ServerMonitor\Notifications\BaseNotification;
12 12
 
13 13
 class CheckWarning extends BaseNotification
14 14
 {
Please login to merge, or discard this patch.
src/Commands/ListHosts.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 namespace Spatie\ServerMonitor\Commands;
4 4
 
5 5
 use Illuminate\Support\Collection;
6
-use Spatie\ServerMonitor\Models\Host;
7 6
 use Spatie\ServerMonitor\Models\Check;
7
+use Spatie\ServerMonitor\Models\Host;
8 8
 
9 9
 class ListHosts extends BaseCommand
10 10
 {
Please login to merge, or discard this patch.
src/Models/Host.php 1 patch
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\ServerMonitor\Models;
4 4
 
5
-use Illuminate\Support\Collection;
6 5
 use Illuminate\Database\Eloquent\Model;
7
-use Spatie\ServerMonitor\Models\Enums\HostHealth;
8
-use Spatie\ServerMonitor\Models\Enums\CheckStatus;
9 6
 use Illuminate\Database\Eloquent\Relations\HasMany;
10
-use Spatie\ServerMonitor\Models\Presenters\HostPresenter;
7
+use Illuminate\Support\Collection;
11 8
 use Spatie\ServerMonitor\Models\Concerns\HasCustomProperties;
9
+use Spatie\ServerMonitor\Models\Enums\CheckStatus;
10
+use Spatie\ServerMonitor\Models\Enums\HostHealth;
11
+use Spatie\ServerMonitor\Models\Presenters\HostPresenter;
12 12
 
13 13
 class Host extends Model
14 14
 {
Please login to merge, or discard this patch.
src/Notifications/EventHandler.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 namespace Spatie\ServerMonitor\Notifications;
4 4
 
5 5
 use Illuminate\Config\Repository;
6
-use Spatie\ServerMonitor\Events\Event;
7 6
 use Illuminate\Contracts\Events\Dispatcher;
8 7
 use Spatie\ServerMonitor\Events\CheckFailed;
9
-use Spatie\ServerMonitor\Events\CheckWarning;
10 8
 use Spatie\ServerMonitor\Events\CheckRestored;
11 9
 use Spatie\ServerMonitor\Events\CheckSucceeded;
10
+use Spatie\ServerMonitor\Events\CheckWarning;
11
+use Spatie\ServerMonitor\Events\Event;
12 12
 
13 13
 class EventHandler
14 14
 {
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
         return app($notifiableClass);
53 53
     }
54 54
 
55
+    /**
56
+     * @return Event
57
+     */
55 58
     protected function determineNotification($event): ?BaseNotification
56 59
     {
57 60
         $eventName = class_basename($event);
Please login to merge, or discard this patch.