diff --git a/src/Casts/Asset.php b/src/Casts/Asset.php index 4b0e4447..5207d491 100644 --- a/src/Casts/Asset.php +++ b/src/Casts/Asset.php @@ -12,10 +12,7 @@ class Asset implements CastsAttributes { /** * @param \Illuminate\Database\Eloquent\Model $model - * @param string $key * @param string|null $value - * @param array $attributes - * @return \Oneduo\NovaFileManager\Support\Asset|null * * @throws \JsonException */ @@ -30,10 +27,7 @@ public function get($model, string $key, $value, array $attributes): ?AssetObjec /** * @param \Illuminate\Database\Eloquent\Model $model - * @param string $key * @param array|AssetObject|null $value - * @param array $attributes - * @return string|null * * @throws \JsonException */ diff --git a/src/Casts/AssetCollection.php b/src/Casts/AssetCollection.php index a31f4994..165bafcd 100644 --- a/src/Casts/AssetCollection.php +++ b/src/Casts/AssetCollection.php @@ -13,9 +13,7 @@ class AssetCollection implements CastsAttributes { /** * @param \Illuminate\Database\Eloquent\Model $model - * @param string $key * @param string $value - * @param array $attributes * @return \Illuminate\Support\Collection<\Oneduo\NovaFileManager\Support\Asset> * * @throws \JsonException @@ -33,10 +31,7 @@ public function get($model, string $key, $value, array $attributes): Collection /** * @param \Illuminate\Database\Eloquent\Model $model - * @param string $key * @param \Illuminate\Support\Collection<\Oneduo\NovaFileManager\Support\Asset> $value - * @param array $attributes - * @return string */ public function set($model, string $key, $value, array $attributes): string { diff --git a/src/Entities/Entity.php b/src/Entities/Entity.php index 7b2dff50..3d08d495 100644 --- a/src/Entities/Entity.php +++ b/src/Entities/Entity.php @@ -25,11 +25,6 @@ public function __construct( /** * Static helper - * - * @param \Oneduo\NovaFileManager\Contracts\Services\FileManagerContract $manager - * @param string $path - * @param string $disk - * @return static */ public static function make(FileManagerContract $manager, string $path, string $disk): static { @@ -38,8 +33,6 @@ public static function make(FileManagerContract $manager, string $path, string $ /** * Return the entity's data as array - * - * @return array */ public function toArray(): array { @@ -80,8 +73,6 @@ public function toArray(): array /** * Generate a unique identifier for the entity - * - * @return string */ public function id(): string { @@ -90,8 +81,6 @@ public function id(): string /** * Get the name of the entity - * - * @return string */ public function name(): string { @@ -100,8 +89,6 @@ public function name(): string /** * Compute the size of the entity - * - * @return int|string */ public function size(): int|string { @@ -122,8 +109,6 @@ public function size(): int|string /** * Get the file extension of the entity - * - * @return string */ public function extension(): string { @@ -132,8 +117,6 @@ public function extension(): string /** * Get the mime type of the entity - * - * @return string */ public function mime(): string { @@ -154,8 +137,6 @@ public function mime(): string /** * Build an url for the entity based on the disk - * - * @return string */ public function url(): string { @@ -186,8 +167,6 @@ public function url(): string /** * Get the expiration time from the user defined config - * - * @return \Illuminate\Support\Carbon */ public function signedExpirationTime(): Carbon { @@ -199,8 +178,6 @@ public function signedExpirationTime(): Carbon /** * Get the last modified time of the entity as string - * - * @return string */ public function lastModifiedAt(): string { @@ -213,8 +190,6 @@ public function lastModifiedAt(): string /** * Get the last modified time of the entity as a Carbon instance - * - * @return \Illuminate\Support\Carbon */ public function lastModifiedAtTimestamp(): Carbon { @@ -223,8 +198,6 @@ public function lastModifiedAtTimestamp(): Carbon /** * Define the type of the entity - * - * @return string */ public function type(): string { diff --git a/src/FileManager.php b/src/FileManager.php index b92dd1fe..c8caaa1f 100644 --- a/src/FileManager.php +++ b/src/FileManager.php @@ -18,12 +18,12 @@ use Oneduo\NovaFileManager\Traits\Support\InteractsWithFilesystem; use stdClass; -class FileManager extends Field implements InteractsWithFilesystemContract, Cover +class FileManager extends Field implements Cover, InteractsWithFilesystemContract { - use SupportsDependentFields; - use InteractsWithFilesystem; use HasThumbnail; + use InteractsWithFilesystem; use PresentsImages; + use SupportsDependentFields; public $component = 'nova-file-manager-field'; @@ -39,7 +39,7 @@ class FileManager extends Field implements InteractsWithFilesystemContract, Cove public ?string $wrapper = null; - public function __construct($name, $attribute = null, Closure $storageCallback = null) + public function __construct($name, $attribute = null, ?Closure $storageCallback = null) { parent::__construct($name, $attribute); @@ -124,7 +124,7 @@ protected function fillAttribute(NovaRequest $request, $requestAttribute, $model } } - protected function prepareStorageCallback(Closure $storageCallback = null): void + protected function prepareStorageCallback(?Closure $storageCallback = null): void { $this->storageCallback = $storageCallback ?? function ( NovaRequest $request, @@ -143,7 +143,7 @@ protected function prepareStorageCallback(Closure $storageCallback = null): void $files = collect($payload); if ($this->multiple) { - $value = collect($files)->map(fn(array $file) => new Asset(...$file)); + $value = collect($files)->map(fn (array $file) => new Asset(...$file)); } else { $value = $files->isNotEmpty() ? new Asset(...$files->first()) : null; } @@ -163,12 +163,12 @@ protected function resolveAttribute($resource, $attribute = null): ?array } if ($value instanceof stdClass) { - $value = (array)$value; + $value = (array) $value; } if (is_array($value)) { if ($this->multiple) { - $value = collect($value)->map(fn(array|object $asset) => new Asset(...(array)$asset)); + $value = collect($value)->map(fn (array|object $asset) => new Asset(...(array) $asset)); } else { $value = collect([new Asset(...$value)]); } diff --git a/src/Filesystem/Support/GetID3.php b/src/Filesystem/Support/GetID3.php index cee48408..a958618e 100644 --- a/src/Filesystem/Support/GetID3.php +++ b/src/Filesystem/Support/GetID3.php @@ -16,7 +16,6 @@ class GetID3 extends BaseGetID3 * @param string $filename * @param int $filesize * @param resource $fp - * @return bool * * @throws getid3_exception */ @@ -51,7 +50,7 @@ public function openfile($filename, $filesize = null, $fp = null): bool if (($fp != null) && ((get_resource_type($fp) == 'file') || (get_resource_type($fp) == 'stream'))) { $this->fp = $fp; } elseif ((is_readable($filename) || file_exists($filename)) && is_file($filename) && ($this->fp = fopen($filename, - 'rb'))) { + 'rb'))) { // great } else { $errormessagelist = []; @@ -113,11 +112,11 @@ public function openfile($filename, $filesize = null, $fp = null): bool fclose($this->fp); throw new getid3_exception('PHP seems to think the file is larger than '.round(PHP_INT_MAX / 1073741824).'GB, but filesystem reports it as '.number_format($real_filesize / 1073741824, - 3).'GB, please report to info@getid3.org'); + 3).'GB, please report to info@getid3.org'); } $this->info['filesize'] = $real_filesize; $this->warning('File is larger than '.round(PHP_INT_MAX / 1073741824).'GB (filesystem reports it as '.number_format($real_filesize / 1073741824, - 3).'GB) and is not properly supported by PHP.'); + 3).'GB) and is not properly supported by PHP.'); } } diff --git a/src/Http/Controllers/DiskController.php b/src/Http/Controllers/DiskController.php index cfd9e937..157df873 100644 --- a/src/Http/Controllers/DiskController.php +++ b/src/Http/Controllers/DiskController.php @@ -11,8 +11,6 @@ class DiskController extends Controller { /** * Get the available disks - * - * @return \Illuminate\Http\JsonResponse */ public function available(): JsonResponse { diff --git a/src/Http/Controllers/FileController.php b/src/Http/Controllers/FileController.php index 01a9f108..673e3a4d 100644 --- a/src/Http/Controllers/FileController.php +++ b/src/Http/Controllers/FileController.php @@ -23,10 +23,6 @@ class FileController extends Controller { /** * Upload a file from the tool - * - * @param \Oneduo\NovaFileManager\Http\Requests\UploadFileRequest $request - * @param \Oneduo\NovaFileManager\Contracts\Filesystem\Upload\Uploader $uploader - * @return \Illuminate\Http\JsonResponse */ public function upload(UploadFileRequest $request, Uploader $uploader): JsonResponse { @@ -37,9 +33,6 @@ public function upload(UploadFileRequest $request, Uploader $uploader): JsonResp /** * Rename a file - * - * @param \Oneduo\NovaFileManager\Http\Requests\RenameFileRequest $request - * @return \Illuminate\Http\JsonResponse */ public function rename(RenameFileRequest $request): JsonResponse { @@ -64,9 +57,6 @@ public function rename(RenameFileRequest $request): JsonResponse /** * Delete a file - * - * @param \Oneduo\NovaFileManager\Http\Requests\DeleteFileRequest $request - * @return \Illuminate\Http\JsonResponse */ public function delete(DeleteFileRequest $request): JsonResponse { @@ -93,9 +83,6 @@ public function delete(DeleteFileRequest $request): JsonResponse /** * Unzip an archive - * - * @param \Oneduo\NovaFileManager\Http\Requests\UnzipFileRequest $request - * @return \Illuminate\Http\JsonResponse */ public function unzip(UnzipFileRequest $request): JsonResponse { diff --git a/src/Http/Controllers/FolderController.php b/src/Http/Controllers/FolderController.php index 7fae7b50..c95bab10 100644 --- a/src/Http/Controllers/FolderController.php +++ b/src/Http/Controllers/FolderController.php @@ -21,9 +21,6 @@ class FolderController extends Controller { /** * Create a new folder - * - * @param \Oneduo\NovaFileManager\Http\Requests\CreateFolderRequest $request - * @return \Illuminate\Http\JsonResponse */ public function create(CreateFolderRequest $request): JsonResponse { @@ -48,9 +45,6 @@ public function create(CreateFolderRequest $request): JsonResponse /** * Rename a folder - * - * @param \Oneduo\NovaFileManager\Http\Requests\RenameFolderRequest $request - * @return \Illuminate\Http\JsonResponse */ public function rename(RenameFolderRequest $request): JsonResponse { @@ -76,9 +70,6 @@ public function rename(RenameFolderRequest $request): JsonResponse /** * Delete a folder - * - * @param \Oneduo\NovaFileManager\Http\Requests\DeleteFolderRequest $request - * @return \Illuminate\Http\JsonResponse */ public function delete(DeleteFolderRequest $request): JsonResponse { diff --git a/src/Http/Controllers/IndexController.php b/src/Http/Controllers/IndexController.php index 31bf1250..8e3ef4d5 100644 --- a/src/Http/Controllers/IndexController.php +++ b/src/Http/Controllers/IndexController.php @@ -12,7 +12,6 @@ class IndexController extends Controller /** * Get the data for the tool * - * @param \Oneduo\NovaFileManager\Http\Requests\IndexRequest $request * @return \Illuminate\Http\JsonResponse */ public function __invoke(IndexRequest $request) diff --git a/src/Http/Middleware/Authorize.php b/src/Http/Middleware/Authorize.php index 8c86d248..b3943bd3 100644 --- a/src/Http/Middleware/Authorize.php +++ b/src/Http/Middleware/Authorize.php @@ -17,9 +17,7 @@ class Authorize /** * Handle the incoming request. * - * @param \Illuminate\Http\Request $request * @param \Closure(\Illuminate\Http\Request):mixed $next - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse */ public function handle(Request $request, Closure $next): Response|JsonResponse { @@ -30,9 +28,6 @@ public function handle(Request $request, Closure $next): Response|JsonResponse /** * Determine whether this tool belongs to the package. - * - * @param \Laravel\Nova\Tool $tool - * @return bool */ public function matchesTool(Tool $tool): bool { diff --git a/src/Http/Requests/BaseRequest.php b/src/Http/Requests/BaseRequest.php index 216308d0..54341b31 100644 --- a/src/Http/Requests/BaseRequest.php +++ b/src/Http/Requests/BaseRequest.php @@ -170,7 +170,7 @@ public function authorizationAttribute(): string return strtolower(str(static::class)->classBasename()->ucsplit()->get(1, '')); } - public function authorizationActionAttribute(string $class = null): string + public function authorizationActionAttribute(?string $class = null): string { return (string) str($class ?? static::class)->classBasename()->replace('Request', '')->snake(' '); } diff --git a/src/Http/Requests/UploadFileRequest.php b/src/Http/Requests/UploadFileRequest.php index 053911c5..881b475a 100644 --- a/src/Http/Requests/UploadFileRequest.php +++ b/src/Http/Requests/UploadFileRequest.php @@ -32,7 +32,7 @@ public function authorize(): bool return true; } - public function authorizationActionAttribute(string $class = null): string + public function authorizationActionAttribute(?string $class = null): string { if (!$this->canUploadFile()) { return parent::authorizationActionAttribute(); diff --git a/src/Rules/FileMissingInFilesystem.php b/src/Rules/FileMissingInFilesystem.php index f271695a..b04cff41 100644 --- a/src/Rules/FileMissingInFilesystem.php +++ b/src/Rules/FileMissingInFilesystem.php @@ -14,9 +14,7 @@ public function __construct(public UploadFileRequest $request) } /** - * @param $attribute * @param \Illuminate\Http\UploadedFile $value - * @return bool */ public function passes($attribute, $value): bool { diff --git a/src/Services/FileManagerService.php b/src/Services/FileManagerService.php index 7c359507..0dc548ac 100644 --- a/src/Services/FileManagerService.php +++ b/src/Services/FileManagerService.php @@ -45,7 +45,6 @@ public function __construct( /** * Set the current disk used by the service * - * @param string|\Illuminate\Contracts\Filesystem\Filesystem $disk * @return $this */ public function setDisk(string|Filesystem $disk): self @@ -72,7 +71,6 @@ public function getDisk(): string /** * Set the current path used by the service * - * @param string $path * @return $this */ public function path(string $path): self @@ -85,7 +83,6 @@ public function path(string $path): self /** * Toggle the visibility of hidden files * - * @param bool $show * @return $this */ public function showHiddenFiles(bool $show = true): self @@ -97,8 +94,6 @@ public function showHiddenFiles(bool $show = true): self /** * Get the current filesystem instance - * - * @return \Illuminate\Contracts\Filesystem\Filesystem */ public function filesystem(): Filesystem { @@ -107,8 +102,6 @@ public function filesystem(): Filesystem /** * Retrieve all the files in the current path - * - * @return \Illuminate\Support\Collection */ public function files(): Collection { @@ -146,8 +139,6 @@ public function directories(): Collection /** * Callback used to filter out hidden files if enabled - * - * @return void */ public function omitHiddenFilesAndDirectories(): void { @@ -158,8 +149,6 @@ public function omitHiddenFilesAndDirectories(): void /** * Callback used to filter out files and directories based on a search query string - * - * @return void */ public function applySearchCallback(): void { @@ -182,9 +171,6 @@ public function applySearchCallback(): void /** * Callback used to apply all the registered filters - * - * @param string $value - * @return bool */ public function applyFilterCallbacks(string $value): bool { @@ -200,8 +186,6 @@ public function applyFilterCallbacks(string $value): bool /** * Build the current path's breadcrumbs - * - * @return \Illuminate\Support\Collection */ public function breadcrumbs(): Collection { @@ -226,9 +210,6 @@ public function breadcrumbs(): Collection /** * Create a new directory in the current path - * - * @param string $path - * @return bool */ public function mkdir(string $path): bool { @@ -241,9 +222,6 @@ public function mkdir(string $path): bool /** * Remove a directory from the disk - * - * @param string $path - * @return bool */ public function rmdir(string $path): bool { @@ -252,10 +230,6 @@ public function rmdir(string $path): bool /** * Rename a directory or file in the disk - * - * @param string $from - * @param string $to - * @return bool */ public function rename(string $from, string $to): bool { @@ -264,9 +238,6 @@ public function rename(string $from, string $to): bool /** * Remove a file from the disk - * - * @param string $path - * @return bool */ public function delete(string $path): bool { @@ -277,9 +248,6 @@ public function delete(string $path): bool * Unzip an archive to the current path * * Note: ext-zip is required - * - * @param string $path - * @return bool */ public function unzip(string $path): bool { @@ -314,8 +282,6 @@ public function unzip(string $path): bool /** * Paginate the directories and files in the current path from the current disk * - * @param \Illuminate\Support\Collection $data - * @return \Illuminate\Pagination\LengthAwarePaginator * * @throws \Illuminate\Contracts\Container\BindingResolutionException */ @@ -337,8 +303,6 @@ public function paginate(Collection $data): LengthAwarePaginator /** * Set the pagination parameters * - * @param int $page - * @param int $perPage * @return $this */ public function forPage(int $page, int $perPage): self @@ -352,8 +316,6 @@ public function forPage(int $page, int $perPage): self /** * Map the data into a class-based entity - * - * @return \Closure */ public function mapIntoEntity(): Closure { @@ -362,10 +324,6 @@ public function mapIntoEntity(): Closure /** * Create a new entity from the given path - * - * @param string $path - * @param string $disk - * @return \Oneduo\NovaFileManager\Entities\Entity */ public function makeEntity(string $path, string $disk): Entity { @@ -384,7 +342,6 @@ public function makeEntity(string $path, string $disk): Entity /** * Get the corresponding class for the given file type * - * @param string $type * @return class-string */ public function entityClassForType(string $type): string @@ -394,13 +351,6 @@ public function entityClassForType(string $type): string /** * Static helper - * - * @param string|\Illuminate\Contracts\Filesystem\Filesystem|null $disk - * @param string|null $path - * @param int $page - * @param int $perPage - * @param string|null $search - * @return static */ public static function make( string|Filesystem|null $disk = null, diff --git a/src/ToolServiceProvider.php b/src/ToolServiceProvider.php index 25e6143b..8f447882 100644 --- a/src/ToolServiceProvider.php +++ b/src/ToolServiceProvider.php @@ -19,8 +19,6 @@ class ToolServiceProvider extends ServiceProvider { /** * Bootstrap the tool services - * - * @return void */ public function boot(): void { @@ -46,11 +44,11 @@ protected function routes(): void Nova::router( ['nova', Authenticate::class, Authorize::class], config('nova-file-manager.path', '/nova-file-manager') - )->group(__DIR__ . '/../routes/inertia.php'); + )->group(__DIR__.'/../routes/inertia.php'); Route::middleware(['nova:api', Authorize::class]) ->prefix('nova-vendor/nova-file-manager') - ->group(__DIR__ . '/../routes/api.php'); + ->group(__DIR__.'/../routes/api.php'); } public function register(): void @@ -63,8 +61,8 @@ public function register(): void $disk = $args['disk'] ?? $request->input('disk'); $path = $args['path'] ?? $request->input('path', DIRECTORY_SEPARATOR); - $page = (int)($args['page'] ?? $request->input('page', 1)); - $perPage = (int)($args['perPage'] ?? $request->input('perPage', 15)); + $page = (int) ($args['page'] ?? $request->input('page', 1)); + $perPage = (int) ($args['perPage'] ?? $request->input('perPage', 15)); $search = $args['search'] ?? $request->input('search'); return FileManagerService::make($disk, $path, $page, $perPage, $search); @@ -73,11 +71,11 @@ public function register(): void public function config(): void { - $this->mergeConfigFrom(__DIR__ . '/../config/nova-file-manager.php', 'nova-file-manager'); + $this->mergeConfigFrom(__DIR__.'/../config/nova-file-manager.php', 'nova-file-manager'); $this->publishes( [ - __DIR__ . '/../config' => config_path(), + __DIR__.'/../config' => config_path(), ], 'nova-file-manager-config' ); @@ -85,14 +83,14 @@ public function config(): void protected function translations(): void { - $this->loadTranslationsFrom(__DIR__ . '/../lang', 'nova-file-manager'); - $this->loadJsonTranslationsFrom(__DIR__ . '/../lang'); + $this->loadTranslationsFrom(__DIR__.'/../lang', 'nova-file-manager'); + $this->loadJsonTranslationsFrom(__DIR__.'/../lang'); } public function assets(): void { - Nova::style('nova-file-manager', __DIR__ . '/../dist/css/tool.css'); - Nova::script('nova-file-manager', __DIR__ . '/../dist/js/tool.js'); + Nova::style('nova-file-manager', __DIR__.'/../dist/css/tool.css'); + Nova::script('nova-file-manager', __DIR__.'/../dist/js/tool.js'); } public function loadTranslationsToNova(): void diff --git a/src/helpers.php b/src/helpers.php index e3beca62..f35cce83 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -14,7 +14,8 @@ function str($string = null) { if (func_num_args() === 0) { - return new class { + return new class + { public function __call($method, $parameters) { return Str::$method(...$parameters); diff --git a/tests/Feature/Directory/DirectoryTest.php b/tests/Feature/Directory/DirectoryTest.php index 4a2f3a7e..1e91e203 100644 --- a/tests/Feature/Directory/DirectoryTest.php +++ b/tests/Feature/Directory/DirectoryTest.php @@ -11,6 +11,7 @@ use Oneduo\NovaFileManager\Events\FolderDeleting; use Oneduo\NovaFileManager\Events\FolderRenamed; use Oneduo\NovaFileManager\Events\FolderRenaming; + use function Pest\Laravel\postJson; beforeEach(function () { diff --git a/tests/Feature/File/FileTest.php b/tests/Feature/File/FileTest.php index 43ba590c..1391a74e 100644 --- a/tests/Feature/File/FileTest.php +++ b/tests/Feature/File/FileTest.php @@ -17,6 +17,7 @@ use Oneduo\NovaFileManager\Events\FileUploaded; use Oneduo\NovaFileManager\Events\FileUploading; use Oneduo\NovaFileManager\NovaFileManager; + use function Pest\Laravel\postJson; beforeEach(function () { @@ -167,7 +168,7 @@ Nova::$tools = [ NovaFileManager::make() - ->uploadReplaceExisting(fn() => false), + ->uploadReplaceExisting(fn () => false), ]; config()->set('nova-file-manager.upload_replace_existing', true); @@ -209,14 +210,14 @@ config()->set('nova-file-manager.upload_replace_existing', true); - Storage::disk($this->disk)->put($first = 'first.txt', "first"); + Storage::disk($this->disk)->put($first = 'first.txt', 'first'); postJson( uri: route('nova-file-manager.files.upload'), data: [ 'disk' => $this->disk, 'path' => '/', - 'file' => UploadedFile::fake()->createWithContent($first, "second"), + 'file' => UploadedFile::fake()->createWithContent($first, 'second'), 'resumableFilename' => $first, ], ) @@ -254,19 +255,19 @@ Nova::$tools = [ NovaFileManager::make() - ->uploadReplaceExisting(fn() => true), + ->uploadReplaceExisting(fn () => true), ]; config()->set('nova-file-manager.upload_replace_existing', false); - Storage::disk($this->disk)->put($first = 'first.txt', "first"); + Storage::disk($this->disk)->put($first = 'first.txt', 'first'); postJson( uri: route('nova-file-manager.files.upload'), data: [ 'disk' => $this->disk, 'path' => '/', - 'file' => UploadedFile::fake()->createWithContent($first, "second"), + 'file' => UploadedFile::fake()->createWithContent($first, 'second'), 'resumableFilename' => $first, ], ) diff --git a/tests/Feature/File/UploadFilePermissionsTest.php b/tests/Feature/File/UploadFilePermissionsTest.php index 2401c687..8e5fb951 100644 --- a/tests/Feature/File/UploadFilePermissionsTest.php +++ b/tests/Feature/File/UploadFilePermissionsTest.php @@ -10,6 +10,7 @@ use Laravel\Nova\Nova; use Oneduo\NovaFileManager\Http\Requests\UploadFileRequest; use Oneduo\NovaFileManager\NovaFileManager; + use function Pest\Laravel\actingAs; beforeEach(function () { diff --git a/tests/Feature/IndexTest.php b/tests/Feature/IndexTest.php index 678b73cf..1a1fd03c 100644 --- a/tests/Feature/IndexTest.php +++ b/tests/Feature/IndexTest.php @@ -12,6 +12,7 @@ use Oneduo\NovaFileManager\NovaFileManager; use Workbench\App\Nova\TestResource; use Workbench\App\Nova\TestResourceWithOnDemandFilesystem; + use function Pest\Laravel\actingAs; use function Pest\Laravel\getJson; diff --git a/tests/Feature/ToolTest.php b/tests/Feature/ToolTest.php index 4f78dc57..844a35fd 100644 --- a/tests/Feature/ToolTest.php +++ b/tests/Feature/ToolTest.php @@ -8,6 +8,7 @@ use Laravel\Nova\Http\Middleware\BootTools; use Laravel\Nova\Http\Middleware\DispatchServingNovaEvent; use Laravel\Nova\Http\Middleware\HandleInertiaRequests; + use function Pest\Laravel\actingAs; it('can show the file manager tool', function () { diff --git a/tests/Traits/FileConcerns.php b/tests/Traits/FileConcerns.php index 8ae999ac..53043b25 100644 --- a/tests/Traits/FileConcerns.php +++ b/tests/Traits/FileConcerns.php @@ -8,6 +8,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; + use function Pest\Laravel\actingAs; trait FileConcerns diff --git a/tests/Traits/FolderConcerns.php b/tests/Traits/FolderConcerns.php index e61f02bc..ee54c489 100644 --- a/tests/Traits/FolderConcerns.php +++ b/tests/Traits/FolderConcerns.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Auth\User; use Illuminate\Support\Facades\Storage; + use function Pest\Laravel\actingAs; trait FolderConcerns diff --git a/workbench/app/Models/Page.php b/workbench/app/Models/Page.php index 83150e50..2b21e651 100644 --- a/workbench/app/Models/Page.php +++ b/workbench/app/Models/Page.php @@ -1,5 +1,7 @@ Asset::class, 'content' => FlexibleCast::class, ]; -} \ No newline at end of file +} diff --git a/workbench/app/Models/User.php b/workbench/app/Models/User.php index 2dc3fe11..b1f99547 100644 --- a/workbench/app/Models/User.php +++ b/workbench/app/Models/User.php @@ -1,5 +1,7 @@ 'array', ]; -} \ No newline at end of file +} diff --git a/workbench/app/Nova/Flexible/Layouts/ImageAndCaptionLayout.php b/workbench/app/Nova/Flexible/Layouts/ImageAndCaptionLayout.php index a0c37343..ce260305 100644 --- a/workbench/app/Nova/Flexible/Layouts/ImageAndCaptionLayout.php +++ b/workbench/app/Nova/Flexible/Layouts/ImageAndCaptionLayout.php @@ -1,5 +1,7 @@ nullable(), ]; } - -} \ No newline at end of file +} diff --git a/workbench/app/Nova/Page.php b/workbench/app/Nova/Page.php index 9a1d903b..82b059ae 100644 --- a/workbench/app/Nova/Page.php +++ b/workbench/app/Nova/Page.php @@ -1,9 +1,10 @@ wrapper('repeater'), ]; } -} \ No newline at end of file +} diff --git a/workbench/app/Nova/User.php b/workbench/app/Nova/User.php index 3bddbf08..ab01d1d8 100644 --- a/workbench/app/Nova/User.php +++ b/workbench/app/Nova/User.php @@ -1,5 +1,7 @@ filesystem(fn() => 'public'); + ->filesystem(fn () => 'public'); }); } } diff --git a/workbench/database/seeders/DatabaseSeeder.php b/workbench/database/seeders/DatabaseSeeder.php index 6c0fa6e7..5b6f843c 100644 --- a/workbench/database/seeders/DatabaseSeeder.php +++ b/workbench/database/seeders/DatabaseSeeder.php @@ -1,5 +1,7 @@