Skip to content

Commit 1db7730

Browse files
author
farhadzand
committed
update github action
1 parent 6326712 commit 1db7730

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/AuditLoggerServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ 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

2727
// Register the causer resolver
2828
$this->app->singleton(
2929
CauserResolverInterface::class,
30-
fn($app) => isset($app['config']['audit-logger.causer']['resolver']) && $app['config']['audit-logger.causer']['resolver']
30+
fn ($app) => isset($app['config']['audit-logger.causer']['resolver']) && $app['config']['audit-logger.causer']['resolver']
3131
? $app->make($app['config']['audit-logger.causer']['resolver'])
3232
: new CauserResolver(
3333
guard: $app['config']['audit-logger.causer']['guard'] ?? null,
@@ -36,7 +36,7 @@ public function register(): void
3636
);
3737

3838
// Register the main audit logger service
39-
$this->app->singleton('audit-logger', fn($app) => new AuditLogger(
39+
$this->app->singleton('audit-logger', fn ($app) => new AuditLogger(
4040
config: $app['config']['audit-logger']
4141
));
4242

@@ -51,7 +51,7 @@ public function boot(): void
5151
// Publish config
5252
if ($this->app->runningInConsole()) {
5353
$this->publishes([
54-
__DIR__ . '/Config/audit-logger.php' => config_path('audit-logger.php'),
54+
__DIR__.'/Config/audit-logger.php' => config_path('audit-logger.php'),
5555
], 'audit-logger-config');
5656
}
5757

src/Drivers/MongoDBDriver.php

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

55
namespace iamfarhad\LaravelAuditLog\Drivers;
66

7+
use MongoDB\Client;
8+
use MongoDB\Database;
9+
use MongoDB\Collection;
710
use Illuminate\Support\Str;
811
use MongoDB\BSON\UTCDateTime;
9-
use MongoDB\Collection;
10-
use MongoDB\Database;
1112
use Illuminate\Support\Facades\DB;
12-
use MongoDB\Client;
1313
use iamfarhad\LaravelAuditLog\Models\AuditLog;
1414
use iamfarhad\LaravelAuditLog\Contracts\AuditLogInterface;
1515
use iamfarhad\LaravelAuditLog\Contracts\AuditDriverInterface;
@@ -126,10 +126,10 @@ public function getLogsForEntity(string $entityType, string|int $entityId, array
126126
if ($record['created_at'] instanceof UTCDateTime) {
127127
$createdAt = $record['created_at']->toDateTime();
128128
} else {
129-
$createdAt = new \DateTime();
129+
$createdAt = new \DateTime;
130130
}
131131
} else {
132-
$createdAt = new \DateTime();
132+
$createdAt = new \DateTime;
133133
}
134134

135135
$logs[] = new AuditLog(
@@ -190,7 +190,7 @@ private function getCollectionName(string $entityType): string
190190
$baseName = Str::snake(class_basename($entityType));
191191
$pluralName = Str::plural($baseName);
192192

193-
return $this->collectionPrefix . $pluralName . $this->collectionSuffix;
193+
return $this->collectionPrefix.$pluralName.$this->collectionSuffix;
194194
}
195195

196196
/**

src/Drivers/MySQLDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private function getTableName(string $entityType): string
174174
// Handle pluralization
175175
$tableName = Str::plural($className);
176176

177-
return $this->tablePrefix . $tableName . $this->tableSuffix;
177+
return $this->tablePrefix.$tableName.$this->tableSuffix;
178178
}
179179

180180
private function applyFilters(Builder $query, array $options): void

src/Services/CauserResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function resolve(): array
2020
$auth = $guard !== null ? Auth::guard($guard) : Auth::guard();
2121

2222
$isAuthenticated = $auth->check();
23-
if (!$isAuthenticated) {
23+
if (! $isAuthenticated) {
2424
return ['type' => null, 'id' => null];
2525
}
2626

0 commit comments

Comments
 (0)