Apply suggestion

Co-authored-by: Krzysztof Rewak <krzysztof.rewak@gmail.com>
This commit is contained in:
Kamil Niemczycki 2022-06-06 12:47:40 +02:00 committed by GitHub
parent 9e935c4fbf
commit cd537d1889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,8 +13,8 @@ class CreateVacationRequestRequest extends FormRequest
public function authorize(): bool public function authorize(): bool
{ {
return null === $this->get("user") || return ($this->get("user") === null) ||
(int)$this->get("user") === $this->user()->id || ((int)$this->get("user") === $this->user()->id) ||
$this->user()->can("createOnBehalfOfEmployee", VacationRequest::class); $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
} }