Skip to content

Commit 49fc848

Browse files
author
farhadzand
committed
fix style
1 parent 916045c commit 49fc848

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/AuditLoggerServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class AuditLoggerServiceProvider extends ServiceProvider
2020
public function register(): void
2121
{
2222
$this->mergeConfigFrom(
23-
__DIR__ . '/../config/audit-logger.php',
23+
__DIR__.'/../config/audit-logger.php',
2424
'audit-logger'
2525
);
2626

@@ -29,7 +29,7 @@ public function register(): void
2929
// Register the causer resolver
3030
$this->app->singleton(
3131
CauserResolverInterface::class,
32-
fn($app) => isset($app['config']['audit-logger.causer']['resolver']) && $app['config']['audit-logger.causer']['resolver']
32+
fn ($app) => isset($app['config']['audit-logger.causer']['resolver']) && $app['config']['audit-logger.causer']['resolver']
3333
? $app->make($app['config']['audit-logger.causer']['resolver'])
3434
: new CauserResolver(
3535
guard: $app['config']['audit-logger.causer']['guard'] ?? null,
@@ -56,7 +56,7 @@ public function boot(): void
5656
// Publish config
5757
if ($this->app->runningInConsole()) {
5858
$this->publishes([
59-
__DIR__ . '/../config/audit-logger.php' => config_path('audit-logger.php'),
59+
__DIR__.'/../config/audit-logger.php' => config_path('audit-logger.php'),
6060
], 'audit-logger-config');
6161
}
6262

src/Services/AuditBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ private function getSource(): ?string
150150
$route = Request::route();
151151
if ($route !== null && is_object($route) && method_exists($route, 'getActionName')) {
152152
$controller = $route->getActionName();
153+
153154
return is_string($controller) ? $controller : 'http';
154155
}
155156

src/Services/AuditLogger.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function getSource(): ?string
5353
$route = Request::route();
5454
if ($route !== null && is_object($route) && method_exists($route, 'getActionName')) {
5555
$controller = $route->getActionName();
56+
5657
return is_string($controller) ? $controller : 'http';
5758
}
5859

tests/Unit/AuditBuilderTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
use Mockery;
88
use iamfarhad\LaravelAuditLog\Tests\TestCase;
9-
use iamfarhad\LaravelAuditLog\Services\AuditBuilder;
109
use iamfarhad\LaravelAuditLog\Services\AuditLogger;
10+
use iamfarhad\LaravelAuditLog\Services\AuditBuilder;
1111

1212
final class AuditBuilderTest extends TestCase
1313
{
@@ -16,7 +16,8 @@ protected function setUp(): void
1616
parent::setUp();
1717

1818
// Create a fake AuditLogger since the class is final
19-
$fakeLogger = new class {
19+
$fakeLogger = new class
20+
{
2021
public function log(\iamfarhad\LaravelAuditLog\Contracts\AuditLogInterface $log): void
2122
{
2223
// Do nothing - this is a fake for unit tests

0 commit comments

Comments
 (0)