diff --git a/pint.json b/pint.json index 04f94c4..bed0a26 100644 --- a/pint.json +++ b/pint.json @@ -13,6 +13,10 @@ "self_accessor": false, "phpdoc_separation": false, "phpdoc_align": false, + "function_declaration": { + "closure_function_spacing": "none", + "closure_fn_spacing": "none" + }, "no_trailing_comma_in_singleline": false, "single_space_around_construct": false, "phpdoc_trim_consecutive_blank_line_separation": true, diff --git a/src/Auth/AuthServiceProvider.php b/src/Auth/AuthServiceProvider.php index 98861e2..5d349a2 100644 --- a/src/Auth/AuthServiceProvider.php +++ b/src/Auth/AuthServiceProvider.php @@ -44,14 +44,14 @@ public function boot() protected function configureAuthGuards() { - Auth::resolved(function ($auth) { - $auth->extend('igniter-admin', function ($app, $name, array $config) use ($auth) { + Auth::resolved(function($auth) { + $auth->extend('igniter-admin', function($app, $name, array $config) use ($auth) { return $this->createGuard(UserGuard::class, $name, $config, $auth); }); }); - Auth::resolved(function ($auth) { - $auth->extend('igniter-customer', function ($app, $name, array $config) use ($auth) { + Auth::resolved(function($auth) { + $auth->extend('igniter-customer', function($app, $name, array $config) use ($auth) { return $this->createGuard(CustomerGuard::class, $name, $config, $auth); }); }); @@ -59,14 +59,14 @@ protected function configureAuthGuards() protected function configureAuthProvider() { - Auth::provider('igniter', function ($app, $config) { + Auth::provider('igniter', function($app, $config) { return new UserProvider($config); }); } protected function configureGateCallback() { - Gate::after(function ($user, $ability) { + Gate::after(function($user, $ability) { if (Igniter::isAdminUser($user)) { return $user->hasAnyPermission($ability) === true ? true : null; } diff --git a/src/Classes/PermissionManager.php b/src/Classes/PermissionManager.php index 6990599..f5b9e09 100644 --- a/src/Classes/PermissionManager.php +++ b/src/Classes/PermissionManager.php @@ -48,7 +48,7 @@ public function listPermissions() $this->registerPermissions($owner, $permissionBundle); } - usort($this->permissions, function ($a, $b) { + usort($this->permissions, function($a, $b) { if ($a->priority == $b->priority) { return 0; } diff --git a/src/Classes/RouteRegistrar.php b/src/Classes/RouteRegistrar.php index 678332d..1f08bf6 100644 --- a/src/Classes/RouteRegistrar.php +++ b/src/Classes/RouteRegistrar.php @@ -19,7 +19,7 @@ public function all() ->middleware(config('igniter-routes.middleware', [])) ->domain(config('igniter-routes.adminDomain')) ->prefix(Igniter::adminUri()) - ->group(function (Router $router) { + ->group(function(Router $router) { $router->any('/', [Login::class, 'index'])->name('igniter.admin'); $router->any('/login', [Login::class, 'index'])->name('igniter.admin.login'); $router->any('/login/reset/{slug?}', [Login::class, 'reset'])->name('igniter.admin.reset'); diff --git a/src/Console/Commands/AllocatorCommand.php b/src/Console/Commands/AllocatorCommand.php index 919d3d5..c2936c6 100644 --- a/src/Console/Commands/AllocatorCommand.php +++ b/src/Console/Commands/AllocatorCommand.php @@ -23,7 +23,7 @@ public function handle(): void AssignableLog::getUnAssignedQueue($availableSlotCount) ->lazy() - ->each(fn ($assignableLog) => AllocateAssignable::dispatch($assignableLog)); + ->each(fn($assignableLog) => AllocateAssignable::dispatch($assignableLog)); } public static function addSlot($slot) diff --git a/src/Console/Commands/ClearUserStateCommand.php b/src/Console/Commands/ClearUserStateCommand.php index 6e0328e..3b84cb3 100644 --- a/src/Console/Commands/ClearUserStateCommand.php +++ b/src/Console/Commands/ClearUserStateCommand.php @@ -22,7 +22,7 @@ public function handle(): void ->where('value->status', UserState::CUSTOM_STATUS) ->where('value->clearAfterMinutes', '!=', 0) ->get() - ->each(function ($preference) { + ->each(function($preference) { $state = json_decode($preference->value); if (!$state->clearAfterMinutes) { return true; diff --git a/src/Extension.php b/src/Extension.php index 92f539f..6e582f9 100644 --- a/src/Extension.php +++ b/src/Extension.php @@ -78,17 +78,17 @@ public function boot() $this->defineRoutes(); $this->configureRateLimiting(); - Event::listen('igniter.user.register', function (Customer $customer, array $data) { + Event::listen('igniter.user.register', function(Customer $customer, array $data) { Notifications\CustomerRegisteredNotification::make()->subject($customer)->broadcast(); }); $this->registerAdminUserPanel(); - Location::extend(function ($model) { + Location::extend(function($model) { $model->relation['morphedByMany']['users'] = [User::class, 'name' => 'locationable']; }); - Template::registerHook('endBody', function () { + Template::registerHook('endBody', function() { return view('igniter.user::_partials.impersonate_banner'); }); } @@ -148,7 +148,7 @@ public function registerNavigation(): array public function registerSystemSettings() { - Settings::registerCallback(function (Settings $manager) { + Settings::registerCallback(function(Settings $manager) { $manager->registerSettingItems('core', [ 'user' => [ 'label' => 'lang:igniter.user::default.text_tab_user', @@ -211,7 +211,7 @@ public function registerFormWidgets(): array protected function registerEventGlobalParams() { if (class_exists(\Igniter\Automation\Classes\EventManager::class)) { - resolve(\Igniter\Automation\Classes\EventManager::class)->registerCallback(function ($manager) { + resolve(\Igniter\Automation\Classes\EventManager::class)->registerCallback(function($manager) { $manager->registerGlobalParams([ 'customer' => Auth::customer(), ]); @@ -221,8 +221,8 @@ protected function registerEventGlobalParams() protected function registerRequestRebindHandler() { - $this->app->rebinding('request', function ($app, $request) { - $request->setUserResolver(function () use ($app) { + $this->app->rebinding('request', function($app, $request) { + $request->setUserResolver(function() use ($app) { if (!Igniter::runningInAdmin()) { return $app['admin.auth']->getUser(); } @@ -234,7 +234,7 @@ protected function registerRequestRebindHandler() protected function configureRateLimiting() { - RateLimiter::for('web', function (\Illuminate\Http\Request $request) { + RateLimiter::for('web', function(\Illuminate\Http\Request $request) { return Limit::perMinute(60)->by(optional($request->user())->getKey() ?: $request->ip()); }); @@ -245,7 +245,7 @@ protected function configureRateLimiting() $this->app->make(\Illuminate\Contracts\Http\Kernel::class) ->appendMiddlewareToGroup('web', \Igniter\User\Http\Middleware\ThrottleRequests::class); - Event::listen('igniter.user.beforeThrottleRequest', function ($request, $params) { + Event::listen('igniter.user.beforeThrottleRequest', function($request, $params) { $handler = str_after($request->header('x-igniter-request-handler'), '::'); if (in_array($handler, [ 'onLogin', @@ -264,18 +264,18 @@ protected function configureRateLimiting() protected function registerBladeDirectives() { - $this->callAfterResolving('blade.compiler', function ($compiler, $app) { + $this->callAfterResolving('blade.compiler', function($compiler, $app) { (new BladeExtension())->register(); }); } protected function registerGuards(): void { - $this->app->singleton('main.auth', function () { + $this->app->singleton('main.auth', function() { return resolve('auth')->guard(config('igniter-auth.guards.web', 'web')); }); - $this->app->singleton('admin.auth', function () { + $this->app->singleton('admin.auth', function() { return resolve('auth')->guard(config('igniter-auth.guards.admin', 'web')); }); } @@ -286,7 +286,7 @@ protected function registerAdminUserPanel() return; } - AdminMenu::registerCallback(function (Navigation $manager) { + AdminMenu::registerCallback(function(Navigation $manager) { $manager->registerMainItems([ MainMenuItem::widget('notifications', \Igniter\User\MainMenuWidgets\NotificationList::class) ->priority(15) @@ -320,7 +320,7 @@ protected function defineRoutes() return; } - Route::group([], function ($router) { + Route::group([], function($router) { (new Classes\RouteRegistrar($router))->all(); }); } diff --git a/src/Http/Actions/AssigneeController.php b/src/Http/Actions/AssigneeController.php index 1e0b130..a1ed157 100644 --- a/src/Http/Actions/AssigneeController.php +++ b/src/Http/Actions/AssigneeController.php @@ -43,7 +43,7 @@ public function __construct($controller) 'assigneeApplyScope', ]); - $this->controller->bindEvent('controller.beforeRemap', function () { + $this->controller->bindEvent('controller.beforeRemap', function() { if (!$this->controller->getUser()) { return; } @@ -78,7 +78,7 @@ protected function assigneeBindToolbarEvents() if (isset($this->controller->widgets['toolbar'])) { $toolbarWidget = $this->controller->widgets['toolbar']; if ($toolbarWidget instanceof Toolbar) { - $toolbarWidget->bindEvent('toolbar.extendButtons', function () use ($toolbarWidget) { + $toolbarWidget->bindEvent('toolbar.extendButtons', function() use ($toolbarWidget) { $toolbarWidget->removeButton('delete'); }); } @@ -88,7 +88,7 @@ protected function assigneeBindToolbarEvents() protected function assigneeBindListsEvents() { if ($this->controller->isClassExtendedWith(\Igniter\Admin\Http\Actions\ListController::class)) { - Event::listen('admin.list.extendQuery', function ($listWidget, $query) { + Event::listen('admin.list.extendQuery', function($listWidget, $query) { if (!(bool)$this->getConfig('applyScopeOnListQuery', true)) { return; } @@ -96,7 +96,7 @@ protected function assigneeBindListsEvents() $this->assigneeApplyScope($query); }); - Event::listen('admin.filter.extendScopesBefore', function ($widget) { + Event::listen('admin.filter.extendScopesBefore', function($widget) { if (!$this->controller->getUser()->hasRestrictedAssignableScope()) { return; } @@ -109,7 +109,7 @@ protected function assigneeBindListsEvents() protected function assigneeBindFormEvents() { if ($this->controller->isClassExtendedWith(\Igniter\Admin\Http\Actions\FormController::class)) { - $this->controller->bindEvent('admin.controller.extendFormQuery', function ($query) { + $this->controller->bindEvent('admin.controller.extendFormQuery', function($query) { if (!(bool)$this->getConfig('applyScopeOnFormQuery', true)) { return; } @@ -117,7 +117,7 @@ protected function assigneeBindFormEvents() $this->assigneeApplyScope($query); }); - Event::listen('admin.form.extendFields', function (Form $widget) { + Event::listen('admin.form.extendFields', function(Form $widget) { if (!is_a($widget->getController(), get_class($this->controller))) { return; } diff --git a/src/Http/Middleware/LogUserLastSeen.php b/src/Http/Middleware/LogUserLastSeen.php index b0cb925..46539d4 100644 --- a/src/Http/Middleware/LogUserLastSeen.php +++ b/src/Http/Middleware/LogUserLastSeen.php @@ -18,7 +18,7 @@ public function handle($request, Closure $next) if ($authService->check()) { $cacheKey = 'is-online-'.str_replace('.', '-', $authAlias).'-user-'.$authService->getId(); $expireAt = Carbon::now()->addMinutes(2); - Cache::remember($cacheKey, $expireAt, function () use ($authService) { + Cache::remember($cacheKey, $expireAt, function() use ($authService) { return $authService->user()->updateLastSeen(Carbon::now()); }); } diff --git a/src/MainMenuWidgets/UserPanel.php b/src/MainMenuWidgets/UserPanel.php index 0b32a9a..a7a1380 100644 --- a/src/MainMenuWidgets/UserPanel.php +++ b/src/MainMenuWidgets/UserPanel.php @@ -88,7 +88,7 @@ protected function listMenuLinks() NavigationExtendUserMenuLinksEvent::dispatch($items); return $items - ->mapWithKeys(function ($item, $code) { + ->mapWithKeys(function($item, $code) { $item = array_merge([ 'priority' => 999, 'label' => null, @@ -108,7 +108,7 @@ protected function listMenuLinks() $code => (object)$item, ]; }) - ->filter(function ($item) { + ->filter(function($item) { return !($permission = array_get($item, 'permission')) || $this->user->hasPermission($permission); }) ->sortBy('priority'); diff --git a/src/Models/Address.php b/src/Models/Address.php index f52eaa9..19be8b5 100644 --- a/src/Models/Address.php +++ b/src/Models/Address.php @@ -69,7 +69,7 @@ public function forceDelete() { $this->forceDeleting = true; - return tap($this->delete(), function ($deleted) { + return tap($this->delete(), function($deleted) { $this->forceDeleting = false; }); } @@ -77,7 +77,7 @@ public function forceDelete() protected function performDeleteOnModel() { if ($this->forceDeleting) { - return tap($this->setKeysForSaveQuery($this->newModelQuery())->forceDelete(), function () { + return tap($this->setKeysForSaveQuery($this->newModelQuery())->forceDelete(), function() { $this->exists = false; }); } diff --git a/src/Models/AssignableLog.php b/src/Models/AssignableLog.php index 0930c14..5329f31 100644 --- a/src/Models/AssignableLog.php +++ b/src/Models/AssignableLog.php @@ -185,7 +185,7 @@ public function scopeWhereInAssignToGroup($query, array $assigneeGroupIds) */ public function scopeWhereHasAutoAssignGroup($query) { - return $query->whereHas('assignee_group', function (Builder $query) { + return $query->whereHas('assignee_group', function(Builder $query) { $query->where('auto_assign', 1); }); } diff --git a/src/Models/Concerns/Assignable.php b/src/Models/Concerns/Assignable.php index 22d6b7a..32bdf51 100644 --- a/src/Models/Concerns/Assignable.php +++ b/src/Models/Concerns/Assignable.php @@ -12,7 +12,7 @@ trait Assignable { public static function bootAssignable() { - static::extend(function (self $model) { + static::extend(function(self $model) { $model->relation['belongsTo']['assignee'] = [\Igniter\User\Models\User::class]; $model->relation['belongsTo']['assignee_group'] = [\Igniter\User\Models\UserGroup::class]; $model->relation['morphMany']['assignable_logs'] = [ @@ -26,7 +26,7 @@ public static function bootAssignable() ]); }); - self::saved(function (self $model) { + self::saved(function(self $model) { $model->performOnAssignableAssigned(); }); } @@ -189,7 +189,7 @@ public function scopeWhereInAssignToGroup($query, array $assigneeGroupIds) */ public function scopeWhereHasAutoAssignGroup($query) { - return $query->whereHas('assignee_group', function (Builder $query) { + return $query->whereHas('assignee_group', function(Builder $query) { $query->where('auto_assign', 1); }); } diff --git a/src/Models/Concerns/HasCustomer.php b/src/Models/Concerns/HasCustomer.php index c0bdd92..0f08f45 100644 --- a/src/Models/Concerns/HasCustomer.php +++ b/src/Models/Concerns/HasCustomer.php @@ -20,7 +20,7 @@ public function scopeApplyCustomer(Builder $query, $customerId): Builder return $query->where($qualifiedColumnName, $customerId); } - return $query->whereHas($this->getCustomerRelationName(), function (Builder $query) use ($qualifiedColumnName, $customerId) { + return $query->whereHas($this->getCustomerRelationName(), function(Builder $query) use ($qualifiedColumnName, $customerId) { return $query->where($qualifiedColumnName, $customerId); }); } diff --git a/src/Models/Concerns/SendsInvite.php b/src/Models/Concerns/SendsInvite.php index 8807ecc..ced3037 100644 --- a/src/Models/Concerns/SendsInvite.php +++ b/src/Models/Concerns/SendsInvite.php @@ -8,11 +8,11 @@ trait SendsInvite { public static function bootSendsInvite() { - static::extend(function (Model $model) { + static::extend(function(Model $model) { $model->addPurgeable(['send_invite']); }); - static::saved(function (Model $model) { + static::saved(function(Model $model) { $model->restorePurgedValues(); if ($model->send_invite) { $model->sendInvite(); @@ -38,7 +38,7 @@ public function sendInvite() 'invited_at' => now(), ]); - $this->bindEventOnce('model.mailGetData', function ($view, $recipientType) use ($templateCode, $inviteCode) { + $this->bindEventOnce('model.mailGetData', function($view, $recipientType) use ($templateCode, $inviteCode) { if ($view === $templateCode) { return ['invite_code' => $inviteCode]; } diff --git a/src/Models/Customer.php b/src/Models/Customer.php index 798ff7c..4167c5e 100644 --- a/src/Models/Customer.php +++ b/src/Models/Customer.php @@ -130,7 +130,7 @@ public function getCustomerName() public function listAddresses() { - return $this->addresses()->get()->groupBy(function ($address) { + return $this->addresses()->get()->groupBy(function($address) { return $address->getKey(); }); } diff --git a/src/Models/Notification.php b/src/Models/Notification.php index c6e3dad..bf09e8a 100644 --- a/src/Models/Notification.php +++ b/src/Models/Notification.php @@ -14,7 +14,7 @@ class Notification extends DatabaseNotification protected static function booted(): void { - static::created(function (self $model) { + static::created(function(self $model) { if (is_subclass_of($model->type, CriticalNotification::class)) { $model->notifiable->notifications() ->where('type', $model->type) diff --git a/src/Models/UserGroup.php b/src/Models/UserGroup.php index 3f3bc1d..002f37d 100644 --- a/src/Models/UserGroup.php +++ b/src/Models/UserGroup.php @@ -54,7 +54,7 @@ public static function listDropdownOptions() return self::select('user_group_id', 'user_group_name', 'description') ->get() ->keyBy('user_group_id') - ->map(function ($model) { + ->map(function($model) { return [$model->user_group_name, $model->description]; }); } @@ -93,7 +93,7 @@ public function autoAssignEnabled() */ public function listAssignees() { - return $this->users->filter(function (User $user) { + return $this->users->filter(function(User $user) { return $user->isEnabled() && $user->canAssignTo(); })->values(); } @@ -113,7 +113,7 @@ public function findAvailableAssignee() $logs = $query->pluck('assign_value', 'assignee_id'); - $assignees = $this->listAssignees()->map(function (User $model) use ($logs) { + $assignees = $this->listAssignees()->map(function(User $model) use ($logs) { $model->assign_value = $logs[$model->getKey()] ?? 0; return $model; diff --git a/src/Models/UserRole.php b/src/Models/UserRole.php index 9123781..76160f6 100644 --- a/src/Models/UserRole.php +++ b/src/Models/UserRole.php @@ -43,7 +43,7 @@ public static function listDropdownOptions() return self::select('user_role_id', 'name', 'description') ->get() ->keyBy('user_role_id') - ->map(function ($model) { + ->map(function($model) { return [$model->name, $model->description]; }); } diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 5d36321..6503bec 100644 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -1,5 +1,5 @@ toBeTrue(); }); diff --git a/tests/Requests/CustomerGroupTest.php b/tests/Requests/CustomerGroupTest.php index 58a705a..d206eac 100644 --- a/tests/Requests/CustomerGroupTest.php +++ b/tests/Requests/CustomerGroupTest.php @@ -4,14 +4,14 @@ use Igniter\User\Requests\CustomerGroupRequest; -it('has rules for group_name field', function () { +it('has rules for group_name field', function() { $rules = array_get((new CustomerGroupRequest)->rules(), 'group_name'); expect('required')->toBeIn($rules) ->and('between:2,32')->toBeIn($rules); }); -it('has rules for description field', function () { +it('has rules for description field', function() { $rules = array_get((new CustomerGroupRequest)->rules(), 'description'); expect('string')->toBeIn($rules) diff --git a/tests/Requests/CustomerTest.php b/tests/Requests/CustomerTest.php index 260567f..b626846 100644 --- a/tests/Requests/CustomerTest.php +++ b/tests/Requests/CustomerTest.php @@ -4,21 +4,21 @@ use Igniter\User\Requests\CustomerRequest; -it('has rules for first_name field', function () { +it('has rules for first_name field', function() { $rules = array_get((new CustomerRequest)->rules(), 'first_name'); expect('required')->toBeIn($rules) ->and('between:1,48')->toBeIn($rules); }); -it('has rules for last_name field', function () { +it('has rules for last_name field', function() { $rules = array_get((new CustomerRequest)->rules(), 'last_name'); expect('required')->toBeIn($rules) ->and('between:1,48')->toBeIn($rules); }); -it('has rules for email field', function () { +it('has rules for email field', function() { $rules = array_get((new CustomerRequest)->rules(), 'email'); expect('email:filter')->toBeIn($rules) diff --git a/tests/Requests/UserGroupTest.php b/tests/Requests/UserGroupTest.php index 2c23e68..48002cc 100644 --- a/tests/Requests/UserGroupTest.php +++ b/tests/Requests/UserGroupTest.php @@ -4,7 +4,7 @@ use Igniter\User\Requests\UserGroupRequest; -it('has required rule for inputs', function () { +it('has required rule for inputs', function() { expect('required')->toBeIn(array_get((new UserGroupRequest)->rules(), 'user_group_name')) ->and('required')->toBeIn(array_get((new UserGroupRequest)->rules(), 'auto_assign')) ->and('required_if:auto_assign,true')->toBeIn(array_get((new UserGroupRequest)->rules(), 'auto_assign_mode')) @@ -12,7 +12,7 @@ ->and('required_if:auto_assign,true')->toBeIn(array_get((new UserGroupRequest)->rules(), 'auto_assign_availability')); }); -it('has max characters rule for inputs', function () { +it('has max characters rule for inputs', function() { expect('between:2,255')->toBeIn(array_get((new UserGroupRequest)->rules(), 'user_group_name')) ->and('max:2')->toBeIn(array_get((new UserGroupRequest)->rules(), 'auto_assign_mode')) ->and('max:99')->toBeIn(array_get((new UserGroupRequest)->rules(), 'auto_assign_limit')); diff --git a/tests/Requests/UserRoleTest.php b/tests/Requests/UserRoleTest.php index 566a149..c9bff3b 100644 --- a/tests/Requests/UserRoleTest.php +++ b/tests/Requests/UserRoleTest.php @@ -4,21 +4,21 @@ use Igniter\User\Requests\UserRoleRequest; -it('has required rule for inputs', function () { +it('has required rule for inputs', function() { expect('required')->toBeIn(array_get((new UserRoleRequest)->rules(), 'name')) ->and('required')->toBeIn(array_get((new UserRoleRequest)->rules(), 'permissions')) ->and('required')->toBeIn(array_get((new UserRoleRequest)->rules(), 'permissions.*')); }); -it('has max characters rule for inputs', function () { +it('has max characters rule for inputs', function() { expect('between:2,32')->toBeIn(array_get((new UserRoleRequest)->rules(), 'code')) ->and('between:2,255')->toBeIn(array_get((new UserRoleRequest)->rules(), 'name')); }); -it('has alpha_dash rule for inputs', function () { +it('has alpha_dash rule for inputs', function() { expect('alpha_dash')->toBeIn(array_get((new UserRoleRequest)->rules(), 'code')); }); -it('has unique:admin_user_roles rule for inputs', function () { +it('has unique:admin_user_roles rule for inputs', function() { expect('unique:admin_user_roles')->toBeIn(array_get((new UserRoleRequest)->rules(), 'name')); })->skip(); diff --git a/tests/Requests/UserTest.php b/tests/Requests/UserTest.php index ed09da5..2bd6b2b 100644 --- a/tests/Requests/UserTest.php +++ b/tests/Requests/UserTest.php @@ -4,7 +4,7 @@ use Igniter\User\Requests\UserRequest; -it('has required rule for inputs', function () { +it('has required rule for inputs', function() { expect('required')->toBeIn(array_get((new UserRequest)->rules(), 'name')) ->and('required')->toBeIn(array_get((new UserRequest)->rules(), 'email')) ->and('required')->toBeIn(array_get((new UserRequest)->rules(), 'username')) @@ -13,13 +13,13 @@ ->and('required')->toBeIn(array_get((new UserRequest)->rules(), 'groups')); }); -it('has sometimes rule for inputs', function () { +it('has sometimes rule for inputs', function() { expect('sometimes')->toBeIn(array_get((new UserRequest)->rules(), 'password')) ->and('sometimes')->toBeIn(array_get((new UserRequest)->rules(), 'user_role_id')) ->and('sometimes')->toBeIn(array_get((new UserRequest)->rules(), 'groups')); }); -it('has max characters rule for inputs', function () { +it('has max characters rule for inputs', function() { expect('between:2,255')->toBeIn(array_get((new UserRequest)->rules(), 'name')) ->and('max:96')->toBeIn(array_get((new UserRequest)->rules(), 'email')) ->and('email:filter')->toBeIn(array_get((new UserRequest)->rules(), 'email')) @@ -27,7 +27,7 @@ ->and('between:6,32')->toBeIn(array_get((new UserRequest)->rules(), 'password')); }); -it('has unique rule for inputs', function () { +it('has unique rule for inputs', function() { expect('unique:admin_users,email')->toBeIn(array_get((new UserRequest)->rules(), 'email')) ->and('unique:admin_users,username')->toBeIn(array_get((new UserRequest)->rules(), 'username')); })->skip();