Fix backend code styling

This commit is contained in:
MakingCG
2021-07-23 15:54:00 +00:00
committed by GitHub Actions
parent c2771be913
commit 5f4fa23a68
4 changed files with 9 additions and 8 deletions
+4 -2
View File
@@ -121,7 +121,8 @@ class Folder extends Model
public function getCreatedAtAttribute(): string public function getCreatedAtAttribute(): string
{ {
return format_date( return format_date(
set_time_by_user_timezone($this->attributes['created_at']), __t('time') set_time_by_user_timezone($this->attributes['created_at']),
__t('time')
); );
} }
@@ -135,7 +136,8 @@ class Folder extends Model
} }
return format_date( return format_date(
set_time_by_user_timezone($this->attributes['deleted_at']), __t('time') set_time_by_user_timezone($this->attributes['deleted_at']),
__t('time')
); );
} }
+1 -1
View File
@@ -927,7 +927,7 @@ if (! function_exists('set_time_by_user_timezone')) {
/** /**
* Set time by user timezone GMT * Set time by user timezone GMT
*/ */
function set_time_by_user_timezone(string $time): string|Carbon function set_time_by_user_timezone(string $time): string | Carbon
{ {
$user = Auth::user(); $user = Auth::user();
+4 -4
View File
@@ -1,11 +1,11 @@
<?php <?php
namespace Tests\Feature\Accounts; namespace Tests\Feature\Accounts;
use Domain\Folders\Models\Folder;
use Storage; use Storage;
use Notification; use Notification;
use Tests\TestCase; use Tests\TestCase;
use App\Users\Models\User; use App\Users\Models\User;
use Domain\Folders\Models\Folder;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\URL;
use Illuminate\Auth\Notifications\VerifyEmail; use Illuminate\Auth\Notifications\VerifyEmail;
@@ -42,17 +42,17 @@ class UserAccountTest extends TestCase
Folder::factory(Folder::class) Folder::factory(Folder::class)
->create([ ->create([
'user_id' => $user->id, 'user_id' => $user->id,
'created_at' => now(), 'created_at' => now(),
]); ]);
$user->settings()->update([ $user->settings()->update([
'timezone' => '2.0' 'timezone' => '2.0',
]); ]);
$this $this
->actingAs($user) ->actingAs($user)
->getJson("/api/browse/folders/undefined") ->getJson('/api/browse/folders/undefined')
->assertJsonFragment([ ->assertJsonFragment([
'created_at' => '01. January. 2021 at 02:00', 'created_at' => '01. January. 2021 at 02:00',
]); ]);
-1
View File
@@ -1,5 +1,4 @@
<?php <?php
namespace Tests\Domain\Files; namespace Tests\Domain\Files;
use Storage; use Storage;