Skip to content

Commit

Permalink
Psalm fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-mykhailenko committed Jul 10, 2024
1 parent 8f09178 commit 5d14b13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"nyholm/psr7": "^1.3.1",
"phpunit/phpunit": "^9.3",
"squizlabs/php_codesniffer": "^3.7",
"symfony/http-client": "^5.4 || ^6.3"
"symfony/http-client": "^5.4 || ^6.3",
"vimeo/psalm": "^5.25"
},
"suggest": {
"nyholm/psr7": "PSR-7 message implementation",
Expand Down
9 changes: 2 additions & 7 deletions src/Api/DomainV4.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,10 @@ public function create(
}

if (null !== $wildcard) {
Assert::boolean($wildcard);

$params['wildcard'] = $wildcard ? 'true' : 'false';
}

if (null !== $forceDkimAuthority) {
Assert::boolean($forceDkimAuthority);

$params['force_dkim_authority'] = $forceDkimAuthority ? 'true' : 'false';
}

Expand Down Expand Up @@ -174,8 +170,8 @@ public function create(
/**
* Removes a domain from the account.
* WARNING: This action is irreversible! Be cautious!
* @param string $domain name of the domain
* @param array $requestHeaders
* @param string $domain name of the domain
* @param array $requestHeaders
* @return DeleteResponse|array|ResponseInterface
* @throws ClientExceptionInterface
*/
Expand Down Expand Up @@ -451,7 +447,6 @@ public function updateUnsubscribeTracking(string $domain, string $active, string
Assert::stringNotEmpty($active);
Assert::oneOf($active, ['yes', 'no', 'true', 'false']);
Assert::stringNotEmpty($htmlFooter);
Assert::nullOrString($textFooter);

$params = [
'active' => (in_array($active, ['yes', 'true'], true)) ? 'true' : 'false',
Expand Down

0 comments on commit 5d14b13

Please sign in to comment.