From ee320dc6c26d13b6cd18b967f3bcebfe72894bf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jan 2023 02:05:33 +0000 Subject: [PATCH 1/2] Bump json5 from 1.0.1 to 1.0.2 Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index f2451d7..37a2870 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4551,9 +4551,9 @@ json3@^3.3.2: integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" @@ -5069,9 +5069,9 @@ minimatch@3.0.4, minimatch@^3.0.4: brace-expansion "^1.1.7" minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== mississippi@^3.0.0: version "3.0.0" From 2a21bbfe633e23b7c05f25c62ccc1c61be522b1f Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Fri, 6 Jan 2023 02:05:41 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- app/Events/User/BanRepealed.php | 2 +- app/Events/User/Banned.php | 2 +- app/Events/User/BaseUserEvent.php | 2 +- app/Exceptions/Handler.php | 6 ++-- .../Directives/HasPermissionDirective.php | 11 ++++--- app/GraphQL/Queries/AuthorizeUser.php | 9 +++--- app/GraphQL/Queries/UserRoles.php | 8 ++--- app/Http/Controllers/Auth/LoginController.php | 2 +- .../Auth/ResetPasswordController.php | 2 +- app/Http/Middleware/Authenticate.php | 2 +- .../Middleware/CheckForExpiredPasswords.php | 4 +-- app/Http/Middleware/MustHavePassword.php | 4 +-- app/Http/Middleware/PasswordConfirmation.php | 5 +-- app/Libraries/SSO/RsaSha1.php | 1 + app/Libraries/SSO/VATSIMSSO.php | 32 +++++++++---------- app/Models/Concerns/HasBans.php | 17 ++++++---- app/Models/Concerns/HasMemberships.php | 2 +- app/Models/Concerns/HasPassword.php | 4 +-- app/Models/Concerns/HasPermissions.php | 24 +++++--------- app/Models/Concerns/HasRoles.php | 31 ++++++++---------- app/Providers/ConstantServiceProvider.php | 2 +- app/Rules/PasswordStrengthRule.php | 4 +-- tests/Browser/Pages/RolePage.php | 2 +- tests/Browser/Pages/RolesPage.php | 2 +- tests/DuskTestCase.php | 1 + .../PasswordConfirmationMiddlewareTest.php | 3 +- 26 files changed, 91 insertions(+), 93 deletions(-) diff --git a/app/Events/User/BanRepealed.php b/app/Events/User/BanRepealed.php index 97a3d33..96d7f16 100644 --- a/app/Events/User/BanRepealed.php +++ b/app/Events/User/BanRepealed.php @@ -14,7 +14,7 @@ class BanRepealed extends BaseUserEvent /** * Create a new event instance. * - * @param Ban $ban + * @param Ban $ban */ public function __construct(Ban $ban) { diff --git a/app/Events/User/Banned.php b/app/Events/User/Banned.php index 270860b..0528bb4 100644 --- a/app/Events/User/Banned.php +++ b/app/Events/User/Banned.php @@ -14,7 +14,7 @@ class Banned extends BaseUserEvent /** * Create a new event instance. * - * @param Ban $ban + * @param Ban $ban */ public function __construct(Ban $ban) { diff --git a/app/Events/User/BaseUserEvent.php b/app/Events/User/BaseUserEvent.php index c362704..a65d9eb 100644 --- a/app/Events/User/BaseUserEvent.php +++ b/app/Events/User/BaseUserEvent.php @@ -18,7 +18,7 @@ abstract class BaseUserEvent /** * Create a new event instance. * - * @param User $user + * @param User $user */ public function __construct(User $user) { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index e8dd942..544d910 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -32,7 +32,7 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param Throwable $exception + * @param Throwable $exception * @return void * * @throws Exception @@ -46,8 +46,8 @@ public function report(Throwable $exception) /** * Render an exception into an HTTP response. * - * @param Request $request - * @param Throwable $exception + * @param Request $request + * @param Throwable $exception * @return Response * * @throws Throwable diff --git a/app/GraphQL/Directives/HasPermissionDirective.php b/app/GraphQL/Directives/HasPermissionDirective.php index c7aa4a6..b9098de 100644 --- a/app/GraphQL/Directives/HasPermissionDirective.php +++ b/app/GraphQL/Directives/HasPermissionDirective.php @@ -20,7 +20,8 @@ class HasPermissionDirective extends BaseDirective implements FieldMiddleware /** * CanDirective constructor. - * @param Gate $gate + * + * @param Gate $gate * @return void */ public function __construct(Gate $gate) @@ -31,8 +32,8 @@ public function __construct(Gate $gate) /** * Ensure the user is authorized to access this field. * - * @param FieldValue $fieldValue - * @param Closure $next + * @param FieldValue $fieldValue + * @param Closure $next * @return FieldValue */ public function handleField(FieldValue $fieldValue, Closure $next): FieldValue @@ -54,8 +55,8 @@ function ($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) } /** - * @param Gate $gate - * @param string|string[] $ability + * @param Gate $gate + * @param string|string[] $ability * @return void * * @throws AuthorizationException diff --git a/app/GraphQL/Queries/AuthorizeUser.php b/app/GraphQL/Queries/AuthorizeUser.php index d0a1d5e..3f78d96 100644 --- a/app/GraphQL/Queries/AuthorizeUser.php +++ b/app/GraphQL/Queries/AuthorizeUser.php @@ -13,11 +13,12 @@ class AuthorizeUser /** * Checks if the authenticated user is able to perform a permission or not. * - * @param null $rootValue Usually contains the result returned from the parent field. In this case, it is always `null`. - * @param mixed[] $args The arguments that were passed into the field. - * @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext $context Arbitrary data that is shared between all fields of a single query. - * @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo Information about the query itself, such as the execution state, the field name, path to the field from the root, and more. + * @param null $rootValue Usually contains the result returned from the parent field. In this case, it is always `null`. + * @param mixed[] $args The arguments that were passed into the field. + * @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext $context Arbitrary data that is shared between all fields of a single query. + * @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo Information about the query itself, such as the execution state, the field name, path to the field from the root, and more. * @return mixed + * * @throws AuthorizationException */ public function __invoke($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/GraphQL/Queries/UserRoles.php b/app/GraphQL/Queries/UserRoles.php index b940349..5ac57f3 100644 --- a/app/GraphQL/Queries/UserRoles.php +++ b/app/GraphQL/Queries/UserRoles.php @@ -11,10 +11,10 @@ class UserRoles /** * Return a value for the field. * - * @param null $rootValue Usually contains the result returned from the parent field. In this case, it is always `null`. - * @param mixed[] $args The arguments that were passed into the field. - * @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext $context Arbitrary data that is shared between all fields of a single query. - * @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo Information about the query itself, such as the execution state, the field name, path to the field from the root, and more. + * @param null $rootValue Usually contains the result returned from the parent field. In this case, it is always `null`. + * @param mixed[] $args The arguments that were passed into the field. + * @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext $context Arbitrary data that is shared between all fields of a single query. + * @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo Information about the query itself, such as the execution state, the field name, path to the field from the root, and more. * @return mixed */ public function __invoke($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index a34c912..5b792ce 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -52,7 +52,7 @@ public function logout() /** * This function acts as an internal router for all login-related actions. * - * @param Request $request + * @param Request $request * @return mixed */ public function handleLogin(Request $request) diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 2df9db1..3d1eea0 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -37,7 +37,7 @@ protected function guard() /** * Reset the given user's password. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse */ public function reset(Request $request) diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 057711f..a4be5c5 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -9,7 +9,7 @@ class Authenticate extends Middleware /** * Get the path the user should be redirected to when they are not authenticated. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * @return string */ protected function redirectTo($request) diff --git a/app/Http/Middleware/CheckForExpiredPasswords.php b/app/Http/Middleware/CheckForExpiredPasswords.php index 9723db7..ca84ebe 100644 --- a/app/Http/Middleware/CheckForExpiredPasswords.php +++ b/app/Http/Middleware/CheckForExpiredPasswords.php @@ -11,8 +11,8 @@ class CheckForExpiredPasswords /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle($request, Closure $next) diff --git a/app/Http/Middleware/MustHavePassword.php b/app/Http/Middleware/MustHavePassword.php index b05ddc4..c904e7c 100644 --- a/app/Http/Middleware/MustHavePassword.php +++ b/app/Http/Middleware/MustHavePassword.php @@ -11,8 +11,8 @@ class MustHavePassword /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) diff --git a/app/Http/Middleware/PasswordConfirmation.php b/app/Http/Middleware/PasswordConfirmation.php index f59108a..1e02fee 100644 --- a/app/Http/Middleware/PasswordConfirmation.php +++ b/app/Http/Middleware/PasswordConfirmation.php @@ -11,9 +11,10 @@ class PasswordConfirmation extends RequirePassword /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * @return mixed + * * @throws \Throwable UnauthorizedException */ public function handle($request, Closure $next, $redirectToRoute = null) diff --git a/app/Libraries/SSO/RsaSha1.php b/app/Libraries/SSO/RsaSha1.php index 006bb05..c656f0a 100644 --- a/app/Libraries/SSO/RsaSha1.php +++ b/app/Libraries/SSO/RsaSha1.php @@ -29,6 +29,7 @@ public function fetch_private_cert(&$request) * Fetch the public RSA certificate (we do not use this functionality). * * @param $request + * * @throws OAuthServerException */ public function fetch_public_cert(&$request) diff --git a/app/Libraries/SSO/VATSIMSSO.php b/app/Libraries/SSO/VATSIMSSO.php index 1da0eb7..9dbbccb 100644 --- a/app/Libraries/SSO/VATSIMSSO.php +++ b/app/Libraries/SSO/VATSIMSSO.php @@ -106,7 +106,7 @@ public static function isEnabled() * * @param $returnUrl * @param $success - * @param null $error + * @param null $error * @return bool|mixed */ public function login($returnUrl, $success, $error = null) @@ -133,7 +133,7 @@ public function login($returnUrl, $success, $error = null) * @param $secret * @param $verifier * @param $success - * @param null $error + * @param null $error * @return bool|mixed */ public function validate($key, $secret, $verifier, $success, $error = null) @@ -155,9 +155,9 @@ public function validate($key, $secret, $verifier, $success, $error = null) /** * Request a login token from VATSIM (required to send someone for an SSO login). * - * @param string $return_url URL for VATSIM to return memers to after login - * @param bool $allow_sus true to allow suspended VATSIM accounts to log in - * @param bool $allow_ina true to allow inactive VATSIM accounts to log in + * @param string $return_url URL for VATSIM to return memers to after login + * @param bool $allow_sus true to allow suspended VATSIM accounts to log in + * @param bool $allow_ina true to allow inactive VATSIM accounts to log in * @return object|bool */ public function requestToken($return_url = false, $allow_sus = false, $allow_ina = false) @@ -223,9 +223,9 @@ public function requestToken($return_url = false, $allow_sus = false, $allow_ina /** * Obtains a user's login details from a token key and secret. * - * @param string $tokenKey The token key provided by VATSIM - * @param secret $tokenSecret The secret associated with the token - * @return object|false false if error, otherwise returns user details + * @param string $tokenKey The token key provided by VATSIM + * @param secret $tokenSecret The secret associated with the token + * @return object|false false if error, otherwise returns user details */ public function checkLogin($tokenKey, $tokenSecret, $tokenVerifier) { @@ -282,9 +282,9 @@ public function checkLogin($tokenKey, $tokenSecret, $tokenVerifier) /** * Perform a (post) cURL request. * - * @param type $url Destination of request - * @param type $bodu Query string of data to be posted - * @return bool true if able to make request + * @param type $url Destination of request + * @param type $bodu Query string of data to be posted + * @return bool true if able to make request */ private function curlRequest($url, $body) { @@ -325,7 +325,7 @@ private function responseFormat($response) /** * Redirect the user to VATSIM to log in/confirm login. * - * @return bool false if failed + * @return bool false if failed */ public function sendToVatsim() { @@ -341,9 +341,9 @@ public function sendToVatsim() /** * Set the signing method to be used to encrypt request signature. * - * @param string $signature Signature encryption method: RSA|HMAC - * @param string $private_key openssl RSA private key (only needed if using RSA) - * @return bool true if able to use this signing type + * @param string $signature Signature encryption method: RSA|HMAC + * @param string $private_key openssl RSA private key (only needed if using RSA) + * @return bool true if able to use this signing type */ public function signature($signature, $private_key = false) { @@ -389,7 +389,7 @@ protected function callClassBasedResponse($callback, $parameters) /** * Obtain the last generated error from this class. * - * @return array Array of the latest error + * @return array Array of the latest error */ public function getError() { diff --git a/app/Models/Concerns/HasBans.php b/app/Models/Concerns/HasBans.php index c7c7136..dfaac8a 100644 --- a/app/Models/Concerns/HasBans.php +++ b/app/Models/Concerns/HasBans.php @@ -64,10 +64,11 @@ public function getBannedAttribute(): bool * Ban the user locally. * * @param $body - * @param Ban\Reason $reason - * @param User|int $banner - * @param Carbon $end + * @param Ban\Reason $reason + * @param User|int $banner + * @param Carbon $end * @return Ban + * * @throws BanEndsBeforeStartException */ public function banLocally($body, Ban\Reason $reason = null, $banner = null, Carbon $end = null): Ban @@ -78,8 +79,9 @@ public function banLocally($body, Ban\Reason $reason = null, $banner = null, Car /** * Adds a network ban for the user (only affects status on local system). * - * @param null $body + * @param null $body * @return Ban + * * @throws AlreadyNetworkBannedException * @throws BanEndsBeforeStartException */ @@ -112,10 +114,11 @@ public function endNetworkBanIfHas(): ?Ban * * @param $type int A BanConstant type * @param $body string - * @param Ban\Reason $reason - * @param User|int $banner - * @param Carbon|null $end + * @param Ban\Reason $reason + * @param User|int $banner + * @param Carbon|null $end * @return Ban + * * @throws BanEndsBeforeStartException */ private function ban($type, $body, Ban\Reason $reason = null, $banner = null, Carbon $end = null): Ban diff --git a/app/Models/Concerns/HasMemberships.php b/app/Models/Concerns/HasMemberships.php index 1a4ac52..2c21e95 100644 --- a/app/Models/Concerns/HasMemberships.php +++ b/app/Models/Concerns/HasMemberships.php @@ -108,7 +108,7 @@ public function removeAllSecondaryMemberships(): void } /** - * @param Membership|int|string $membership + * @param Membership|int|string $membership * @return bool */ public function hasMembership($membership): bool diff --git a/app/Models/Concerns/HasPassword.php b/app/Models/Concerns/HasPassword.php index 079f7a2..f911d18 100644 --- a/app/Models/Concerns/HasPassword.php +++ b/app/Models/Concerns/HasPassword.php @@ -31,7 +31,7 @@ public function verifyPassword(string $password): bool * * Will hash the password, or set it as null if required. * - * @param null|string $password The password value to set. + * @param null|string $password The password value to set. */ public function setPasswordAttribute($password): void { @@ -109,7 +109,7 @@ public function hasPassword(): bool /** * Set the user's password. * - * @param string $password The password string. + * @param string $password The password string. * @return bool */ public function setPassword(string $password): bool diff --git a/app/Models/Concerns/HasPermissions.php b/app/Models/Concerns/HasPermissions.php index 90cb109..d298955 100644 --- a/app/Models/Concerns/HasPermissions.php +++ b/app/Models/Concerns/HasPermissions.php @@ -27,8 +27,7 @@ public function permissions(): MorphMany /** * Determine if the model may perform the given permission. * - * @param string $permission - * + * @param string $permission * @return bool */ public function hasPermissionTo($permission): bool @@ -39,8 +38,7 @@ public function hasPermissionTo($permission): bool /** * Determine if the model has any of the given permissions. * - * @param array ...$permissions - * + * @param array ...$permissions * @return bool */ public function hasAnyPermission(...$permissions): bool @@ -60,8 +58,7 @@ public function hasAnyPermission(...$permissions): bool /** * Determine if the model has all of the given permissions. * - * @param array ...$permissions - * + * @param array ...$permissions * @return bool */ public function hasAllPermissions(...$permissions): bool @@ -81,8 +78,7 @@ public function hasAllPermissions(...$permissions): bool /** * Determine if the model has, via roles, the given permission. * - * @param string $permission - * + * @param string $permission * @return bool */ public function hasPermissionViaRole($permission): bool @@ -93,8 +89,7 @@ public function hasPermissionViaRole($permission): bool /** * Determine if the model has the given permission. * - * @param string $permission - * + * @param string $permission * @return bool */ public function hasDirectPermission($permission): bool @@ -134,8 +129,7 @@ public function getAllPermissions(): Collection /** * Grant the given permission(s) to a role. * - * @param string|array|Collection $permissions - * + * @param string|array|Collection $permissions * @return $this */ public function givePermissionTo(...$permissions): self @@ -175,8 +169,7 @@ public function givePermissionTo(...$permissions): self /** * Remove all current permissions and set the given ones. * - * @param string|array|Collection $permissions - * + * @param string|array|Collection $permissions * @return $this */ public function syncPermissions(...$permissions): self @@ -193,8 +186,7 @@ public function syncPermissions(...$permissions): self /** * Revoke the given permission. * - * @param string|string[] $permission - * + * @param string|string[] $permission * @return $this */ public function revokePermissionTo($permission): self diff --git a/app/Models/Concerns/HasRoles.php b/app/Models/Concerns/HasRoles.php index 0c37788..8cca42f 100644 --- a/app/Models/Concerns/HasRoles.php +++ b/app/Models/Concerns/HasRoles.php @@ -32,8 +32,8 @@ public function roles(): BelongsToMany /** * Scope the model query to certain roles only. * - * @param Builder $query - * @param string|array|Collection $roles + * @param Builder $query + * @param string|array|Collection $roles * @return Builder */ public function scopeRole(Builder $query, $roles): Builder @@ -65,8 +65,7 @@ public function scopeRole(Builder $query, $roles): Builder /** * Assign the given role to the model. * - * @param Collection|array|string ...$roles - * + * @param Collection|array|string ...$roles * @return $this */ public function assignRole(...$roles): self @@ -95,8 +94,7 @@ public function assignRole(...$roles): self /** * Revoke the given role from the model. * - * @param string|Role $role - * + * @param string|Role $role * @return self */ public function removeRole($role): self @@ -114,8 +112,7 @@ public function removeRole($role): self /** * Remove all current roles and set the given ones. * - * @param array|Role|string ...$roles - * + * @param array|Role|string ...$roles * @return $this */ public function syncRoles(...$roles): self @@ -142,7 +139,7 @@ public function syncRoles(...$roles): self /** * Determine if the model has (one of) the given role(s). * - * @param string|int|array|Role $roles + * @param string|int|array|Role $roles * @return bool */ public function hasRole($roles): bool @@ -174,7 +171,7 @@ public function hasRole($roles): bool /** * Returns if the model has a role by a role ID. * - * @param int $roleID + * @param int $roleID * @return bool */ public function hasRoleByID(int $roleID): bool @@ -185,7 +182,7 @@ public function hasRoleByID(int $roleID): bool /** * Returns if the model has a role by a role name. * - * @param string $roleName + * @param string $roleName * @return bool */ public function hasRoleByName(string $roleName): bool @@ -196,8 +193,7 @@ public function hasRoleByName(string $roleName): bool /** * Determine if the model has any of the given role(s). * - * @param string|array|Role|Collection $roles - * + * @param string|array|Role|Collection $roles * @return bool */ public function hasAnyRole($roles): bool @@ -208,7 +204,7 @@ public function hasAnyRole($roles): bool /** * Determine if the model has all of the given role(s). * - * @param string|Role|Collection|array $roles + * @param string|Role|Collection|array $roles * @return bool */ public function hasAllRoles($roles): bool @@ -242,8 +238,9 @@ public function getRoleNames(): Collection /** * Return a role model from an id or name. * - * @param int|string|Role $role + * @param int|string|Role $role * @return Role + * * @throws ModelNotFoundException */ protected function getStoredRole($role): Role @@ -261,7 +258,7 @@ protected function getStoredRole($role): Role /** * Converts a glued string into an array of parts. * - * @param string $pipeString + * @param string $pipeString * @return array */ protected function convertPipeToArray(string $pipeString): array @@ -285,7 +282,7 @@ protected function convertPipeToArray(string $pipeString): array /** * Converts an input list of role identifiers, and returns a collection of their id's. * - * @param array|Role|string $roles + * @param array|Role|string $roles * @return Collection */ private function roleInputToIds($roles): Collection diff --git a/app/Providers/ConstantServiceProvider.php b/app/Providers/ConstantServiceProvider.php index fb3ca3b..128a3ba 100644 --- a/app/Providers/ConstantServiceProvider.php +++ b/app/Providers/ConstantServiceProvider.php @@ -13,7 +13,7 @@ class ConstantServiceProvider extends ServiceProvider /** * Bootstrap services. * - * @param TypeRegistry $typeRegistry + * @param TypeRegistry $typeRegistry * @return void */ public function boot(TypeRegistry $typeRegistry) diff --git a/app/Rules/PasswordStrengthRule.php b/app/Rules/PasswordStrengthRule.php index d078846..cb73266 100644 --- a/app/Rules/PasswordStrengthRule.php +++ b/app/Rules/PasswordStrengthRule.php @@ -11,8 +11,8 @@ class PasswordStrengthRule implements Rule /** * Determine if the validation rule passes. * - * @param string $attribute - * @param mixed $value + * @param string $attribute + * @param mixed $value * @return bool */ public function passes($attribute, $value) diff --git a/tests/Browser/Pages/RolePage.php b/tests/Browser/Pages/RolePage.php index fe78a0c..8339a19 100644 --- a/tests/Browser/Pages/RolePage.php +++ b/tests/Browser/Pages/RolePage.php @@ -26,7 +26,7 @@ public function url() /** * Assert that the browser is on the page. * - * @param Browser $browser + * @param Browser $browser * @return void */ public function assert(Browser $browser) diff --git a/tests/Browser/Pages/RolesPage.php b/tests/Browser/Pages/RolesPage.php index 6cfcfef..66d82e0 100644 --- a/tests/Browser/Pages/RolesPage.php +++ b/tests/Browser/Pages/RolesPage.php @@ -19,7 +19,7 @@ public function url() /** * Assert that the browser is on the page. * - * @param Browser $browser + * @param Browser $browser * @return void */ public function assert(Browser $browser) diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php index 16f936d..84d83a9 100644 --- a/tests/DuskTestCase.php +++ b/tests/DuskTestCase.php @@ -21,6 +21,7 @@ abstract class DuskTestCase extends BaseTestCase * Prepare for Dusk test execution. * * @beforeClass + * * @return void */ public static function prepare() diff --git a/tests/Unit/Middleware/PasswordConfirmationMiddlewareTest.php b/tests/Unit/Middleware/PasswordConfirmationMiddlewareTest.php index 1050dc0..959b471 100644 --- a/tests/Unit/Middleware/PasswordConfirmationMiddlewareTest.php +++ b/tests/Unit/Middleware/PasswordConfirmationMiddlewareTest.php @@ -47,7 +47,8 @@ private function mockRequest() // just return an anonymous dummy class that knows the has() method and // returns true or false depending on our needs. Alternative would be // to also mock the session and return the session mock. - ->andReturn(new class { + ->andReturn(new class + { public function get(string $key) { return true; // or false, depends on what you want to test