Skip to content

Commit 9c15f74

Browse files
author
farhadzand
committed
fix style
1 parent bb0f06c commit 9c15f74

File tree

6 files changed

+11
-17
lines changed

6 files changed

+11
-17
lines changed

src/Drivers/MySQLDriver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace iamfarhad\LaravelAuditLog\Drivers;
66

77
use Illuminate\Support\Str;
8-
use Illuminate\Support\Facades\Log;
98
use Illuminate\Support\Facades\Schema;
109
use Illuminate\Database\Schema\Blueprint;
1110
use iamfarhad\LaravelAuditLog\Models\EloquentAuditLog;

src/Services/AuditBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
namespace iamfarhad\LaravelAuditLog\Services;
66

7+
use Illuminate\Support\Carbon;
8+
use Illuminate\Support\Facades\App;
79
use Illuminate\Support\Facades\Event;
810
use Illuminate\Database\Eloquent\Model;
9-
use Illuminate\Support\Facades\App;
1011
use Illuminate\Support\Facades\Request;
11-
use Illuminate\Support\Carbon;
1212
use iamfarhad\LaravelAuditLog\DTOs\AuditLog;
13-
use iamfarhad\LaravelAuditLog\Services\AuditLogger;
1413
use iamfarhad\LaravelAuditLog\Contracts\CauserResolverInterface;
1514

1615
/**
@@ -136,7 +135,7 @@ private function getSource(): ?string
136135
}
137136

138137
// Fallback to check if we have any argv[1] that looks like a command
139-
if (isset($argv[1]) && !str_contains($argv[1], '/') && !str_contains($argv[1], '.php')) {
138+
if (isset($argv[1]) && ! str_contains($argv[1], '/') && ! str_contains($argv[1], '.php')) {
140139
return $argv[1];
141140
}
142141

@@ -145,6 +144,7 @@ private function getSource(): ?string
145144

146145
if ($route = Request::route()) {
147146
$controller = $route->getActionName();
147+
148148
return is_string($controller) ? $controller : 'http';
149149
}
150150

src/Services/AuditLogger.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
namespace iamfarhad\LaravelAuditLog\Services;
66

7+
use Illuminate\Support\Facades\App;
8+
use Illuminate\Support\Facades\Request;
79
use iamfarhad\LaravelAuditLog\Drivers\MySQLDriver;
810
use iamfarhad\LaravelAuditLog\Contracts\AuditLogInterface;
911
use iamfarhad\LaravelAuditLog\Contracts\AuditDriverInterface;
10-
use Illuminate\Support\Facades\App;
11-
use Illuminate\Support\Facades\Request;
1212

1313
final class AuditLogger
1414
{
@@ -52,6 +52,7 @@ public function getSource(): ?string
5252

5353
if ($route = Request::route()) {
5454
$controller = $route->getActionName();
55+
5556
return is_string($controller) ? $controller : 'http';
5657
}
5758

src/Traits/Auditable.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@
44

55
namespace iamfarhad\LaravelAuditLog\Traits;
66

7-
use Illuminate\Support\Facades\Log;
7+
use Carbon\Carbon;
88
use Illuminate\Database\Eloquent\Model;
9-
use iamfarhad\LaravelAuditLog\Events\ModelAudited;
9+
use iamfarhad\LaravelAuditLog\DTOs\AuditLog;
10+
use iamfarhad\LaravelAuditLog\Services\AuditLogger;
1011
use iamfarhad\LaravelAuditLog\Services\AuditBuilder;
1112
use iamfarhad\LaravelAuditLog\Models\EloquentAuditLog;
12-
use Illuminate\Support\Facades\App;
13-
use Illuminate\Support\Facades\Request;
14-
use iamfarhad\LaravelAuditLog\Services\AuditLogger;
1513
use iamfarhad\LaravelAuditLog\Contracts\CauserResolverInterface;
16-
use iamfarhad\LaravelAuditLog\DTOs\AuditLog;
17-
use Carbon\Carbon;
1814

1915
/**
2016
* Trait that implements the AuditableInterface to make models auditable.

tests/Unit/AuditBuilderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Mockery;
88
use Illuminate\Support\Facades\Event;
99
use iamfarhad\LaravelAuditLog\Tests\TestCase;
10-
use iamfarhad\LaravelAuditLog\Events\ModelAudited;
1110
use iamfarhad\LaravelAuditLog\Services\AuditBuilder;
1211

1312
final class AuditBuilderTest extends TestCase

tests/Unit/AuditableTraitTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
namespace iamfarhad\LaravelAuditLog\Tests\Unit;
66

7-
use Illuminate\Support\Facades\Event;
87
use Illuminate\Support\Facades\DB;
8+
use Illuminate\Support\Facades\Event;
99
use iamfarhad\LaravelAuditLog\Tests\TestCase;
1010
use iamfarhad\LaravelAuditLog\Tests\Mocks\Post;
1111
use iamfarhad\LaravelAuditLog\Tests\Mocks\User;
12-
use iamfarhad\LaravelAuditLog\Events\ModelAudited;
1312

1413
final class AuditableTraitTest extends TestCase
1514
{

0 commit comments

Comments
 (0)