Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
marcogermani87 authored and github-actions[bot] committed Sep 15, 2024
1 parent 73b33f1 commit 31942f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Models/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function team(): BelongsTo
protected static function booted(): void
{
static::addGlobalScope('teams', function (Builder $query) {
if (!app()->runningInConsole()) {
if (! app()->runningInConsole()) {
if (auth()->check() && Filament::getTenant()) {
$query->whereBelongsTo(auth()->user()?->teams);
} else {
Expand All @@ -68,9 +68,9 @@ public static function boot()
parent::boot();

self::deleting(function ($record) {
$folderPath = "";
$folderPath = '';
$storageDisk = config('filament-email.attachments_disk', 'local');
if (!empty($record->attachments)) {
if (! empty($record->attachments)) {
foreach ($record->attachments as $attachment) {
$filePath = Storage::disk($storageDisk)->path($attachment['path']);
if (empty($folderPath)) {
Expand All @@ -83,7 +83,7 @@ public static function boot()
}
}
}
if (!empty($record->raw_body) && count(explode(DIRECTORY_SEPARATOR, $record->raw_body)) === 3) {
if (! empty($record->raw_body) && count(explode(DIRECTORY_SEPARATOR, $record->raw_body)) === 3) {
if (Storage::disk($storageDisk)->exists($record->raw_body)) {
if (empty($folderPath)) {
$parts = explode(DIRECTORY_SEPARATOR, $record->raw_body);
Expand All @@ -93,7 +93,7 @@ public static function boot()
Storage::disk($storageDisk)->delete($record->raw_body);
}
}
if (!empty($folderPath) && Storage::disk($storageDisk)->directoryExists($folderPath)) {
if (! empty($folderPath) && Storage::disk($storageDisk)->directoryExists($folderPath)) {
Storage::disk($storageDisk)->deleteDirectory($folderPath);
}
});
Expand Down

0 comments on commit 31942f0

Please sign in to comment.