From aad266bdf137007d4b1a5a0cedd8f98a4848490f Mon Sep 17 00:00:00 2001 From: QuentinGab Date: Wed, 21 Apr 2021 15:53:38 +0000 Subject: [PATCH] Fix styling --- src/Traits/HasMangopayUser.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Traits/HasMangopayUser.php b/src/Traits/HasMangopayUser.php index 7ee5a3c..eb57ae7 100644 --- a/src/Traits/HasMangopayUser.php +++ b/src/Traits/HasMangopayUser.php @@ -52,7 +52,7 @@ public function mangopayUserPivot() */ public function hasMangopayUser(): bool { - return !!$this->mangopayUserPivot; + return ! ! $this->mangopayUserPivot; } public function scopeHasMangopayUser(Builder $query, $value): Builder @@ -76,7 +76,7 @@ public function mangopayUser(): User { $api = $this->mangopayApi(); $userId = $this->mangopayUserId(); - if (!$userId) { + if (! $userId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } @@ -112,7 +112,7 @@ public function createMangopayUser(array $data = []) public function updateMangopayUser(array $data = []) { $pivot = $this->mangopayUserPivot(); - if (!$pivot) { + if (! $pivot) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } @@ -273,7 +273,7 @@ protected function buildNaturalMangopayUserObject(array $data = []): UserNatural */ protected function validateNaturalMangopayUser(): bool { - return !Validator::make($this->buildMangopayUserData(), [ + return ! Validator::make($this->buildMangopayUserData(), [ 'Name' => 'string', 'Email' => 'email', 'HeadquartersAddress.AddressLine1' => 'string', @@ -335,7 +335,7 @@ protected function validateLegalMangopayUser(): bool ]); } - return !Validator::make($data, $rules)->fails(); + return ! Validator::make($data, $rules)->fails(); } public function validateMangopayUser(): bool @@ -348,7 +348,7 @@ public function validateMangopayUser(): bool public function mangopayKycDocuments($type = null, $status = null): Collection { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -380,7 +380,7 @@ public function mangopayKycDocuments($type = null, $status = null): Collection public function getMangopayKycDocument($kycDocumentId): KycDocument { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -404,7 +404,7 @@ public function getMangopayKycDocument($kycDocumentId): KycDocument public function createMangopayKycDocument(string $type): KycDocument { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -427,7 +427,7 @@ public function createMangopayKycDocument(string $type): KycDocument public function createMangopayKycPage(int $kycDocumentId, string $filePath): bool { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -448,7 +448,7 @@ public function createMangopayKycPage(int $kycDocumentId, string $filePath): boo public function submitMangopayKycDocument(int $kycDocumentId): KycDocument { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -474,7 +474,7 @@ public function submitMangopayKycDocument(int $kycDocumentId): KycDocument public function createMangopayUboDeclaration(): UboDeclaration { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -495,7 +495,7 @@ public function createMangopayUboDeclaration(): UboDeclaration public function createMangopayUbo($uboDeclarationId, array $data): Ubo { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -534,7 +534,7 @@ public function createMangopayUbo($uboDeclarationId, array $data): Ubo public function updateMangopayUbo($uboDeclarationId, array $data): Ubo { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -582,7 +582,7 @@ public function updateMangopayUbo($uboDeclarationId, array $data): Ubo public function submitMangopayUboDeclaration($uboDeclarationId): UboDeclaration { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi(); @@ -620,7 +620,7 @@ public function getMangopayUboDeclaration($uboDeclarationId): UboDeclaration public function mangopayUboDeclarations(): Collection { $mangopayUserId = $this->mangopayUserId(); - if (!$mangopayUserId) { + if (! $mangopayUserId) { throw MangopayUserException::mangopayUserIdNotFound(get_class($this)); } $api = $this->mangopayApi();