Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed May 23, 2022
2 parents ee2fa1a + 2c0b748 commit 0aaf388
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"php":"8.1.3","version":"3.7.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Commands\/MangopayCommand.php":980724347,"src\/MangopayServiceProvider.php":3175133958,"src\/Models\/MangopayPivot.php":2582574527,"src\/Exceptions\/MangopayUserIsBlocked.php":1227613300,"src\/Exceptions\/MangopayUserException.php":4192100258,"src\/Traits\/HasMangopayUser.php":3320115338,"src\/Traits\/HasBankAccount.php":3958683994,"src\/Traits\/HasWallet.php":3483673320,"tests\/ExampleTest.php":777923210,"tests\/TestCase.php":2008195903}}
{"php":"8.1.6","version":"3.8.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Models\/MangopayPivot.php":2582574527,"src\/Traits\/HasWallet.php":3483673320,"src\/Traits\/HasMangopayUser.php":664870761,"src\/Traits\/HasBankAccount.php":3958683994,"src\/Commands\/MangopayCommand.php":980724347,"src\/MangopayServiceProvider.php":3175133958,"src\/Exceptions\/MangopayUserIsBlocked.php":1227613300,"src\/Exceptions\/MangopayUserException.php":4192100258,"tests\/TestCase.php":2008195903,"tests\/ExampleTest.php":777923210}}
38 changes: 19 additions & 19 deletions src/Traits/HasMangopayUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function mangopayPivot(): \Illuminate\Database\Eloquent\Relations\MorphOn
*/
public function hasMangopayUser(): bool
{
return !!$this->mangopayPivot;
return ! ! $this->mangopayPivot;
}

public function scopeHasMangopayUser(Builder $query, $value): Builder
Expand All @@ -82,7 +82,7 @@ public function mangopayUserId()
protected function mangopayUserIdForApi()
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}

Expand All @@ -100,7 +100,7 @@ public function mangopayUser(): \MangoPay\User
{
$api = $this->mangopayApi();
$userId = $this->mangopayUserId();
if (!$userId) {
if (! $userId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}

Expand Down Expand Up @@ -145,7 +145,7 @@ public function createMangopayUser(array $data = [])
public function updateMangopayUser(array $data = [])
{
$pivot = $this->mangopayPivot;
if (!$pivot) {
if (! $pivot) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}

Expand Down Expand Up @@ -327,7 +327,7 @@ protected function buildNaturalMangopayUserObject(array $data = []): UserNatural
*/
protected function validateNaturalMangopayUser(): bool
{
return !Validator::make($this->buildMangopayUserData(), [
return ! Validator::make($this->buildMangopayUserData(), [
'Name' => ['required', 'string'],
'Email' => ['required', 'email'],
'UserCategory' => ['required', 'in:Owner,Payer'],
Expand Down Expand Up @@ -393,7 +393,7 @@ protected function validateLegalMangopayUser(): bool
]);
}

return !Validator::make($data, $rules)->fails();
return ! Validator::make($data, $rules)->fails();
}

public function validateMangopayUser(): bool
Expand All @@ -408,7 +408,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();
Expand Down Expand Up @@ -440,7 +440,7 @@ public function mangopayKycDocuments($type = null, $status = null): Collection
public function getMangopayKycDocument(string $kycDocumentId): KycDocument
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -464,7 +464,7 @@ public function getMangopayKycDocument(string $kycDocumentId): KycDocument
public function consultMangopayKycDocument(string $kycDocumentId): Collection
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -488,7 +488,7 @@ public function consultMangopayKycDocument(string $kycDocumentId): Collection
public function createMangopayKycDocument(string $type): KycDocument
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -511,7 +511,7 @@ public function createMangopayKycDocument(string $type): KycDocument
public function createMangopayKycPage(string $kycDocumentId, string $filePath): bool
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -532,7 +532,7 @@ public function createMangopayKycPage(string $kycDocumentId, string $filePath):
public function submitMangopayKycDocument(string $kycDocumentId): KycDocument
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -558,7 +558,7 @@ public function submitMangopayKycDocument(string $kycDocumentId): KycDocument
public function createMangopayUboDeclaration(): UboDeclaration
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -579,7 +579,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();
Expand Down Expand Up @@ -618,7 +618,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();
Expand Down Expand Up @@ -666,7 +666,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();
Expand Down Expand Up @@ -704,7 +704,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();
Expand All @@ -728,7 +728,7 @@ public function mangopayUboDeclarations(): Collection
public function mangopayBlockStatus()
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand All @@ -749,7 +749,7 @@ public function mangopayBlockStatus()
public function mangopayRegulatory()
{
$mangopayUserId = $this->mangopayUserId();
if (!$mangopayUserId) {
if (! $mangopayUserId) {
throw MangopayUserException::mangopayUserIdNotFound(get_class($this));
}
$api = $this->mangopayApi();
Expand Down

0 comments on commit 0aaf388

Please sign in to comment.