wip
This commit is contained in:
		| @@ -9,7 +9,6 @@ use Spatie\SlashCommand\Attachment; | ||||
| use Spatie\SlashCommand\Request; | ||||
| use Spatie\SlashCommand\Response; | ||||
| use Toby\Domain\DailySummaryRetriever; | ||||
| use Toby\Domain\Slack\SignatureHandler; | ||||
| use Toby\Eloquent\Models\User; | ||||
| use Toby\Eloquent\Models\Vacation; | ||||
|  | ||||
|   | ||||
| @@ -8,10 +8,9 @@ use Illuminate\Validation\ValidationException; | ||||
| use Spatie\SlashCommand\Request; | ||||
| use Spatie\SlashCommand\Response; | ||||
| use Toby\Domain\Notifications\KeyHasBeenGivenNotification; | ||||
| use Toby\Domain\Slack\SignatureHandler; | ||||
| use Toby\Domain\Slack\SlackUserExistsRule; | ||||
| use Toby\Domain\Slack\Exceptions\UserNotFoundException; | ||||
| use Toby\Domain\Slack\Rules\SlackUserExistsRule; | ||||
| use Toby\Domain\Slack\Traits\FindsUserBySlackId; | ||||
| use Toby\Domain\Slack\UserNotFoundException; | ||||
| use Toby\Eloquent\Models\Key; | ||||
|  | ||||
| class GiveKeysTo extends SignatureHandler | ||||
|   | ||||
| @@ -7,7 +7,6 @@ namespace Toby\Domain\Slack\Handlers; | ||||
| use Spatie\SlashCommand\Attachment; | ||||
| use Spatie\SlashCommand\Request; | ||||
| use Spatie\SlashCommand\Response; | ||||
| use Toby\Domain\Slack\SignatureHandler; | ||||
| use Toby\Domain\Slack\Traits\ListsHandlers; | ||||
|  | ||||
| class Help extends SignatureHandler | ||||
|   | ||||
| @@ -9,7 +9,6 @@ use Spatie\SlashCommand\Request; | ||||
| use Spatie\SlashCommand\Response; | ||||
| use Toby\Domain\Actions\VacationRequest\CreateAction; | ||||
| use Toby\Domain\Enums\VacationType; | ||||
| use Toby\Domain\Slack\SignatureHandler; | ||||
| use Toby\Domain\Slack\Traits\FindsUserBySlackId; | ||||
| use Toby\Eloquent\Models\User; | ||||
| use Toby\Eloquent\Models\YearPeriod; | ||||
|   | ||||
| @@ -7,7 +7,6 @@ namespace Toby\Domain\Slack\Handlers; | ||||
| use Spatie\SlashCommand\Attachment; | ||||
| use Spatie\SlashCommand\Request; | ||||
| use Spatie\SlashCommand\Response; | ||||
| use Toby\Domain\Slack\SignatureHandler; | ||||
| use Toby\Eloquent\Models\Key; | ||||
|  | ||||
| class KeyList extends SignatureHandler | ||||
|   | ||||
							
								
								
									
										26
									
								
								app/Domain/Slack/Handlers/SignatureHandler.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								app/Domain/Slack/Handlers/SignatureHandler.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| <?php | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Toby\Domain\Slack\Handlers; | ||||
|  | ||||
| use Illuminate\Support\Facades\Validator; | ||||
| use Spatie\SlashCommand\Handlers\SignatureHandler as BaseSignatureHandler; | ||||
|  | ||||
| abstract class SignatureHandler extends BaseSignatureHandler | ||||
| { | ||||
|     public function validate() | ||||
|     { | ||||
|         return Validator::validate($this->getArguments(), $this->getRules(), $this->getMessages()); | ||||
|     } | ||||
|  | ||||
|     protected function getRules(): array | ||||
|     { | ||||
|         return []; | ||||
|     } | ||||
|  | ||||
|     protected function getMessages(): array | ||||
|     { | ||||
|         return []; | ||||
|     } | ||||
| } | ||||
| @@ -8,10 +8,9 @@ use Illuminate\Validation\ValidationException; | ||||
| use Spatie\SlashCommand\Request; | ||||
| use Spatie\SlashCommand\Response; | ||||
| use Toby\Domain\Notifications\KeyHasBeenTakenNotification; | ||||
| use Toby\Domain\Slack\SignatureHandler; | ||||
| use Toby\Domain\Slack\SlackUserExistsRule; | ||||
| use Toby\Domain\Slack\Exceptions\UserNotFoundException; | ||||
| use Toby\Domain\Slack\Rules\SlackUserExistsRule; | ||||
| use Toby\Domain\Slack\Traits\FindsUserBySlackId; | ||||
| use Toby\Domain\Slack\UserNotFoundException; | ||||
| use Toby\Eloquent\Models\Key; | ||||
|  | ||||
| class TakeKeysFrom extends SignatureHandler | ||||
|   | ||||
		Reference in New Issue
	
	Block a user