From 4162dd3d67f175f9743b8f937cb52111920c8e74 Mon Sep 17 00:00:00 2001 From: EwelinaLasowy Date: Tue, 17 May 2022 15:05:28 +0200 Subject: [PATCH] #132 - cs fix --- .../Notifications/VacationRequestsSummaryNotification.php | 3 +-- .../Console/Commands/SendDailySummaryToSlack.php | 2 +- .../Slack/Elements/VacationRequestsAttachment.php | 2 +- app/Infrastructure/Slack/Handlers/GiveKeysTo.php | 2 +- app/Infrastructure/Slack/Handlers/TakeKeysFrom.php | 6 +++--- app/Infrastructure/Slack/Traits/FindsUserBySlackId.php | 2 +- app/Infrastructure/Slack/Traits/ListsHandlers.php | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/Domain/Notifications/VacationRequestsSummaryNotification.php b/app/Domain/Notifications/VacationRequestsSummaryNotification.php index 7e4f769..07eadc8 100644 --- a/app/Domain/Notifications/VacationRequestsSummaryNotification.php +++ b/app/Domain/Notifications/VacationRequestsSummaryNotification.php @@ -62,11 +62,10 @@ class VacationRequestsSummaryNotification extends Notification $url = route("vacation.requests.show", ["vacationRequest" => $request->id]); $message->line( - __("- [request no. :request](:url) of user :user (:startDate - :endDate)",["request" => $request->name, "url" => $url, "user" => $request->user->profile->full_name, "startDate" => $request->from->toDisplayString(), "endDate"=>$request->to->toDisplayString()]), + __("- [request no. :request](:url) of user :user (:startDate - :endDate)", ["request" => $request->name, "url" => $url, "user" => $request->user->profile->full_name, "startDate" => $request->from->toDisplayString(), "endDate" => $request->to->toDisplayString()]), ); } - return $message ->action(__("Go to requests"), $url); } diff --git a/app/Infrastructure/Console/Commands/SendDailySummaryToSlack.php b/app/Infrastructure/Console/Commands/SendDailySummaryToSlack.php index b07c5ff..0cf7a49 100644 --- a/app/Infrastructure/Console/Commands/SendDailySummaryToSlack.php +++ b/app/Infrastructure/Console/Commands/SendDailySummaryToSlack.php @@ -37,7 +37,7 @@ class SendDailySummaryToSlack extends Command Http::withToken($this->getSlackClientToken()) ->post($this->getUrl(), [ "channel" => $this->getSlackChannel(), - "text" => __("Daily summary for day :day",["day"=>$now->toDisplayString()]), + "text" => __("Daily summary for day :day", ["day" => $now->toDisplayString()]), "attachments" => $attachments, ]); } diff --git a/app/Infrastructure/Slack/Elements/VacationRequestsAttachment.php b/app/Infrastructure/Slack/Elements/VacationRequestsAttachment.php index 37653e1..d2ab75b 100644 --- a/app/Infrastructure/Slack/Elements/VacationRequestsAttachment.php +++ b/app/Infrastructure/Slack/Elements/VacationRequestsAttachment.php @@ -31,7 +31,7 @@ class VacationRequestsAttachment extends ListAttachment "url" => $url, "request" => $request->name, "user" => $request->user->profile->full_name, - "date" => $date + "date" => $date, ]); }); } diff --git a/app/Infrastructure/Slack/Handlers/GiveKeysTo.php b/app/Infrastructure/Slack/Handlers/GiveKeysTo.php index 6339cfe..0bdea25 100644 --- a/app/Infrastructure/Slack/Handlers/GiveKeysTo.php +++ b/app/Infrastructure/Slack/Handlers/GiveKeysTo.php @@ -51,7 +51,7 @@ class GiveKeysTo extends SignatureHandler $key->notify(new KeyHasBeenGivenNotification($authUser, $user)); return $this->respondToSlack( - __(":white_check_mark: Key no. :key has been given to <@:user>", ["key"=>$key->id, "user" => $user->profile->slack_id]) + __(":white_check_mark: Key no. :key has been given to <@:user>", ["key" => $key->id, "user" => $user->profile->slack_id]), ); } diff --git a/app/Infrastructure/Slack/Handlers/TakeKeysFrom.php b/app/Infrastructure/Slack/Handlers/TakeKeysFrom.php index 12d9333..e68c24a 100644 --- a/app/Infrastructure/Slack/Handlers/TakeKeysFrom.php +++ b/app/Infrastructure/Slack/Handlers/TakeKeysFrom.php @@ -35,7 +35,7 @@ class TakeKeysFrom extends SignatureHandler if (!$key) { throw ValidationException::withMessages([ - "key" => __("User <@:user> does not have any keys", ["user" => $user->profile->slack_id]) + "key" => __("User <@:user> does not have any keys", ["user" => $user->profile->slack_id]), ]); } @@ -51,7 +51,7 @@ class TakeKeysFrom extends SignatureHandler $key->notify(new KeyHasBeenTakenNotification($authUser, $user)); - return $this->respondToSlack(__(":white_check_mark: Key no. :key has been taken from user <@:user>", ["key"=>$key->id, "user"=> $user->profile->slack_id])); + return $this->respondToSlack(__(":white_check_mark: Key no. :key has been taken from user <@:user>", ["key" => $key->id, "user" => $user->profile->slack_id])); } protected function getRules(): array @@ -64,7 +64,7 @@ class TakeKeysFrom extends SignatureHandler protected function getMessages(): array { return [ - "user.required" => __("You must specified the user you want to take the keys from") + "user.required" => __("You must specified the user you want to take the keys from"), ]; } } diff --git a/app/Infrastructure/Slack/Traits/FindsUserBySlackId.php b/app/Infrastructure/Slack/Traits/FindsUserBySlackId.php index 880e1b1..4c92eaa 100644 --- a/app/Infrastructure/Slack/Traits/FindsUserBySlackId.php +++ b/app/Infrastructure/Slack/Traits/FindsUserBySlackId.php @@ -30,7 +30,7 @@ trait FindsUserBySlackId $user = $this->findUserBySlackId($slackId); if (!$user) { - throw new UserNotFoundException(__("User :input does not exist in toby", ["input"=> $slackId])); + throw new UserNotFoundException(__("User :input does not exist in toby", ["input" => $slackId])); } return $user; diff --git a/app/Infrastructure/Slack/Traits/ListsHandlers.php b/app/Infrastructure/Slack/Traits/ListsHandlers.php index 4b637b6..51a8b3a 100644 --- a/app/Infrastructure/Slack/Traits/ListsHandlers.php +++ b/app/Infrastructure/Slack/Traits/ListsHandlers.php @@ -37,7 +37,7 @@ trait ListsHandlers ) ->map( fn(SignatureHandler $handler): AttachmentField => AttachmentField::create( - __($handler->getDescription()) , + __($handler->getDescription()), "`/{$handler->getSignature()}`", ), )