From acb702b65c437a5d6c3db259d423c3229fcf1880 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Feb 2022 11:52:18 +0000 Subject: [PATCH 1/2] chore: Bump ajv from 6.12.2 to 6.12.6 Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6. - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.2...v6.12.6) --- updated-dependencies: - dependency-name: ajv dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4466dc2..dd54967 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1120,9 +1120,9 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: - version "6.12.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" - integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -2057,7 +2057,7 @@ commander@~2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== -commitizen@^4.0.3, commitizen@^4.1.2: +commitizen@^4.0.3: version "4.1.2" resolved "https://registry.yarnpkg.com/commitizen/-/commitizen-4.1.2.tgz#6095eb825fd3f0d3611df88e6803c69b23307e9a" integrity sha512-LBxTQKHbVgroMz9ohpm86N+GfJobonGyvDc3zBGdZazbwCLz2tqLa48Rf2TnAdKx7/06W1i1R3SXUt5QW97qVQ== @@ -3155,9 +3155,9 @@ extsprintf@^1.2.0: integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^2.0.2: version "2.2.7" @@ -7811,9 +7811,9 @@ upper-case@^1.1.1: integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" From beb60795e2d59ce922810896aefb986f3e8a47ac Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sat, 12 Feb 2022 11:52:25 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- app/Constants/ControllerRating.php | 1 + app/GraphQL/Scalars/DateTimeZulu.php | 4 ++- .../Mutations/AvailabilityHandler.php | 31 ++++++++++--------- .../Services/AvailabilityService.php | 9 +++--- .../Mutations/CreateBookingHandler.php | 1 + .../Mutations/UpdateBookingHandler.php | 1 + .../Mutations/GrantSoloEndorsementHandler.php | 1 + .../GrantSpecialEndorsementHandler.php | 1 + .../RequestSpecialEndorsementHandler.php | 1 + .../Mutations/SpecialEndorsementsForUser.php | 1 + .../SessionRequest/SessionRequestService.php | 24 +++++++------- app/Rules/UserExistsRule.php | 4 +-- tests/Feature/Booking/BookingCreateTest.php | 1 + 13 files changed, 47 insertions(+), 33 deletions(-) diff --git a/app/Constants/ControllerRating.php b/app/Constants/ControllerRating.php index e27bcfa..d2be66a 100644 --- a/app/Constants/ControllerRating.php +++ b/app/Constants/ControllerRating.php @@ -47,6 +47,7 @@ public static function getRatingCodeByNumber(int $index): ?string /** * Get the human readable version of a given code. + * * @param string $code * @return string */ diff --git a/app/GraphQL/Scalars/DateTimeZulu.php b/app/GraphQL/Scalars/DateTimeZulu.php index 3f6b5c5..cd713d1 100644 --- a/app/GraphQL/Scalars/DateTimeZulu.php +++ b/app/GraphQL/Scalars/DateTimeZulu.php @@ -15,8 +15,9 @@ class DateTimeZulu extends ScalarType /** * Serialize an internal value, ensuring it is a valid datetime string. * - * @param \Carbon\Carbon|string $value + * @param \Carbon\Carbon|string $value * @return string + * * @throws */ public function serialize($value): string @@ -35,6 +36,7 @@ public function serialize($value): string * * @param mixed $value * @return \Carbon\Carbon + * * @throws */ public function parseValue($value): Carbon diff --git a/app/Modules/Availability/Mutations/AvailabilityHandler.php b/app/Modules/Availability/Mutations/AvailabilityHandler.php index cb25c5c..61227ff 100644 --- a/app/Modules/Availability/Mutations/AvailabilityHandler.php +++ b/app/Modules/Availability/Mutations/AvailabilityHandler.php @@ -15,13 +15,14 @@ class AvailabilityHandler /** * 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 GraphQLContext $context Arbitrary data that is shared between all fields of a single query. - * @param 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 GraphQLContext $context Arbitrary data that is shared between all fields of a single query. + * @param 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 Availability + * * @throws BindingResolutionException */ public function update($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) @@ -39,12 +40,13 @@ public function update($rootValue, array $args, GraphQLContext $context, Resolve * 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`. + * it is always `null`. * @param mixed[] $args The arguments that were passed into the field. * @param GraphQLContext $context Arbitrary data that is shared between all fields of a single query. * @param ResolveInfo $resolveInfo Information about the query itself, such as the execution state, - * the field name, path to the field from the root, and more. + * the field name, path to the field from the root, and more. * @return mixed + * * @throws OverlappingAvailabilityException * @throws BindingResolutionException */ @@ -60,13 +62,14 @@ public function create($rootValue, array $args, GraphQLContext $context, Resolve /** * Remove date range. * - * @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 GraphQLContext $context Arbitrary data that is shared between all fields of a single query. - * @param 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 GraphQLContext $context Arbitrary data that is shared between all fields of a single query. + * @param 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 BindingResolutionException */ public function remove($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/Modules/Availability/Services/AvailabilityService.php b/app/Modules/Availability/Services/AvailabilityService.php index 16468ab..e09e69f 100644 --- a/app/Modules/Availability/Services/AvailabilityService.php +++ b/app/Modules/Availability/Services/AvailabilityService.php @@ -27,11 +27,12 @@ public function __construct(User $user) /** * Validate that two given times are valid within the context of other availability. * - * @param Carbon $from - * @param Carbon $to - * @param User $user - User - * @param int $doNotCheck - Pass in an int to exclude from the search + * @param Carbon $from + * @param Carbon $to + * @param User $user - User + * @param int $doNotCheck - Pass in an int to exclude from the search * @return bool + * * @throws AvailabilityMinimumTimeException * @throws AvailabilityInPastException * @throws \Throwable diff --git a/app/Modules/Bookings/Mutations/CreateBookingHandler.php b/app/Modules/Bookings/Mutations/CreateBookingHandler.php index 1907b10..d955d31 100644 --- a/app/Modules/Bookings/Mutations/CreateBookingHandler.php +++ b/app/Modules/Bookings/Mutations/CreateBookingHandler.php @@ -19,6 +19,7 @@ class CreateBookingHandler * @param GraphQLContext $context Arbitrary data that is shared between all fields of a single query. * @param ResolveInfo $resolveInfo Information about the query itself. * @return mixed + * * @throws RatingRequirementNotMetException * @throws SpecialEndorsementNotAttainedException * @throws OverlappingBookingException diff --git a/app/Modules/Bookings/Mutations/UpdateBookingHandler.php b/app/Modules/Bookings/Mutations/UpdateBookingHandler.php index 97e709a..5c659b5 100644 --- a/app/Modules/Bookings/Mutations/UpdateBookingHandler.php +++ b/app/Modules/Bookings/Mutations/UpdateBookingHandler.php @@ -17,6 +17,7 @@ class UpdateBookingHandler * @param mixed[] $args The arguments that were passed into the field. * @param GraphQLContext $context Arbitrary data that is shared between all fields of a single query. * @param ResolveInfo $resolveInfo Information about the query itself. + * * @throws OverlappingBookingException */ public function __invoke($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/Modules/Endorsement/Solo/Mutations/GrantSoloEndorsementHandler.php b/app/Modules/Endorsement/Solo/Mutations/GrantSoloEndorsementHandler.php index ddb6a2a..26dbc43 100644 --- a/app/Modules/Endorsement/Solo/Mutations/GrantSoloEndorsementHandler.php +++ b/app/Modules/Endorsement/Solo/Mutations/GrantSoloEndorsementHandler.php @@ -18,6 +18,7 @@ class GrantSoloEndorsementHandler * @param mixed[] $args The arguments that were passed into the field. * @param GraphQLContext $context Arbitrary data that is shared between all fields of a single query. * @param ResolveInfo $resolveInfo Information about the query itself. + * * @throws OverlappingBookingException */ public function __invoke($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/Modules/Endorsement/Special/Mutations/GrantSpecialEndorsementHandler.php b/app/Modules/Endorsement/Special/Mutations/GrantSpecialEndorsementHandler.php index 22aa334..ab33d8f 100644 --- a/app/Modules/Endorsement/Special/Mutations/GrantSpecialEndorsementHandler.php +++ b/app/Modules/Endorsement/Special/Mutations/GrantSpecialEndorsementHandler.php @@ -19,6 +19,7 @@ class GrantSpecialEndorsementHandler * @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. * @return mixed + * * @throws EndorsementAlreadyGrantedException */ public function __invoke($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/Modules/Endorsement/Special/Mutations/RequestSpecialEndorsementHandler.php b/app/Modules/Endorsement/Special/Mutations/RequestSpecialEndorsementHandler.php index 6eaf3ce..3c9a94b 100644 --- a/app/Modules/Endorsement/Special/Mutations/RequestSpecialEndorsementHandler.php +++ b/app/Modules/Endorsement/Special/Mutations/RequestSpecialEndorsementHandler.php @@ -27,6 +27,7 @@ public function __construct(User $user) * @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. * @return mixed + * * @throws EndorsementRequestAlreadyExistsException * @throws EndorsementAlreadyGrantedException */ diff --git a/app/Modules/Endorsement/Special/Mutations/SpecialEndorsementsForUser.php b/app/Modules/Endorsement/Special/Mutations/SpecialEndorsementsForUser.php index ab49ae3..455e6ff 100644 --- a/app/Modules/Endorsement/Special/Mutations/SpecialEndorsementsForUser.php +++ b/app/Modules/Endorsement/Special/Mutations/SpecialEndorsementsForUser.php @@ -24,6 +24,7 @@ public function __construct(User $user) * @param GraphQLContext $context Arbitrary data that is shared between all fields of a single query. * @param ResolveInfo $resolveInfo Information about the query itself. * @return mixed + * * @throws \InvalidArgumentException */ public function __invoke($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) diff --git a/app/Modules/SessionRequest/SessionRequestService.php b/app/Modules/SessionRequest/SessionRequestService.php index 0de9862..b9dd3bf 100644 --- a/app/Modules/SessionRequest/SessionRequestService.php +++ b/app/Modules/SessionRequest/SessionRequestService.php @@ -23,8 +23,8 @@ public function __construct(BookingsService $bookingsService) /** * Creates a session request for a given user on a particular position. * - * @param User $user - * @param Position $position + * @param User $user + * @param Position $position * @return SessionRequest */ public function createSessionRequest(User $user, Position $position): SessionRequest @@ -45,7 +45,7 @@ public function createSessionRequest(User $user, Position $position): SessionReq /** * Revokes a session request for a given session which hasn't been accepted. * - * @param SessionRequest $sessionRequest + * @param SessionRequest $sessionRequest * @return bool */ public function revokeSessionRequest(SessionRequest $sessionRequest): bool @@ -58,13 +58,13 @@ public function revokeSessionRequest(SessionRequest $sessionRequest): bool /** * Accept a session request with the given times. * - * @param SessionRequest $sessionRequest - * @param User $acceptingUser - * @param Carbon $sessionDateFrom - * @param Carbon $sessionDateTo - * @param Carbon $bookingDateFrom - * @param Carbon $bookingDateTo - * @param int $networkType + * @param SessionRequest $sessionRequest + * @param User $acceptingUser + * @param Carbon $sessionDateFrom + * @param Carbon $sessionDateTo + * @param Carbon $bookingDateFrom + * @param Carbon $bookingDateTo + * @param int $networkType * @return SessionRequest */ public function acceptSessionRequest( @@ -106,8 +106,8 @@ public function acceptSessionRequest( /** * Cancel a session request which has already been accepted. * - * @param SessionRequest $sessionRequest - * @param string $reason + * @param SessionRequest $sessionRequest + * @param string $reason * @return SessionRequest */ public function cancelSession(SessionRequest $sessionRequest, string $reason): SessionRequest diff --git a/app/Rules/UserExistsRule.php b/app/Rules/UserExistsRule.php index cee11d4..bcf998f 100644 --- a/app/Rules/UserExistsRule.php +++ b/app/Rules/UserExistsRule.php @@ -9,8 +9,8 @@ class UserExistsRule 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/Feature/Booking/BookingCreateTest.php b/tests/Feature/Booking/BookingCreateTest.php index 041c01a..dd621bd 100644 --- a/tests/Feature/Booking/BookingCreateTest.php +++ b/tests/Feature/Booking/BookingCreateTest.php @@ -514,6 +514,7 @@ public function testItCanDeleteABooking() /** * Setup a test case to pass the rating check for testing overlapping. + * * @param string $callsign */ private function bypassRatingChecks($callsign = 'EGGD_TWR')