diff --git a/composer.json b/composer.json index d4871f6d..90047037 100644 --- a/composer.json +++ b/composer.json @@ -30,14 +30,14 @@ "psr/http-message": "^1.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", - "laminas/laminas-diactoros": "^2.8", + "doctrine/coding-standard": "^10.0.0", + "laminas/laminas-diactoros": "^2.16.0", "php-http/curl-client": "^2.2", "php-http/mock-client": "^1.5", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.5.23", "psalm/plugin-phpunit": "^0.17.0", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "^4.20" + "squizlabs/php_codesniffer": "^3.7.1", + "vimeo/psalm": "^4.26.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index a591c1f3..80fd7a53 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dd5ce1bfabbf43d7003432d585cabeeb", + "content-hash": "5f189c513bbb6ecdf6df11e727f8ba42", "packages": [ { "name": "fig/http-message-util", @@ -459,16 +459,16 @@ }, { "name": "clue/stream-filter", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/clue/stream-filter.git", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/d6169430c7731d8509da7aecd0af756a5747b78e", + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e", "shasum": "" }, "require": { @@ -509,7 +509,7 @@ ], "support": { "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.5.0" + "source": "https://github.com/clue/stream-filter/tree/v1.6.0" }, "funding": [ { @@ -521,7 +521,7 @@ "type": "github" } ], - "time": "2020-10-02T12:38:20+00:00" + "time": "2022-02-21T13:15:14+00:00" }, { "name": "composer/package-versions-deprecated", @@ -928,23 +928,23 @@ }, { "name": "doctrine/coding-standard", - "version": "9.0.0", + "version": "10.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/coding-standard.git", - "reference": "35a2452c6025cb739c3244b3348bcd1604df07d1" + "reference": "7903671d7d33c231c8921058b7c14b8f57cbacb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/35a2452c6025cb739c3244b3348bcd1604df07d1", - "reference": "35a2452c6025cb739c3244b3348bcd1604df07d1", + "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/7903671d7d33c231c8921058b7c14b8f57cbacb7", + "reference": "7903671d7d33c231c8921058b7c14b8f57cbacb7", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "slevomat/coding-standard": "^7.0.0", - "squizlabs/php_codesniffer": "^3.6.0" + "php": "^7.2 || ^8.0", + "slevomat/coding-standard": "^8.2", + "squizlabs/php_codesniffer": "^3.7" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -977,9 +977,9 @@ ], "support": { "issues": "https://github.com/doctrine/coding-standard/issues", - "source": "https://github.com/doctrine/coding-standard/tree/9.0.0" + "source": "https://github.com/doctrine/coding-standard/tree/10.0.0" }, - "time": "2021-04-12T15:11:14+00:00" + "time": "2022-08-26T10:53:05+00:00" }, { "name": "doctrine/instantiator", @@ -1725,16 +1725,16 @@ }, { "name": "php-http/httplug", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + "reference": "f640739f80dfa1152533976e3c112477f69274eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", + "reference": "f640739f80dfa1152533976e3c112477f69274eb", "shasum": "" }, "require": { @@ -1781,9 +1781,9 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/master" + "source": "https://github.com/php-http/httplug/tree/2.3.0" }, - "time": "2020-07-13T15:43:23+00:00" + "time": "2022-02-21T09:52:22+00:00" }, { "name": "php-http/message", @@ -2200,35 +2200,31 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.2.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e" + "reference": "367a8d9d5f7da2a0136422d27ce8840583926955" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/dbc093d7af60eff5cd575d2ed761b15ed40bd08e", - "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/367a8d9d5f7da2a0136422d27ce8840583926955", + "reference": "367a8d9d5f7da2a0136422d27ce8840583926955", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5", "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "PHPStan\\PhpDocParser\\": [ @@ -2243,9 +2239,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.2.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.7.0" }, - "time": "2021-09-16T20:46:02+00:00" + "time": "2022-08-09T12:23:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3678,16 +3674,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb44e1cc6e557418387ad815780360057e40753e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e", + "reference": "fb44e1cc6e557418387ad815780360057e40753e", "shasum": "" }, "require": { @@ -3699,7 +3695,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3722,7 +3718,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.1.0" }, "funding": [ { @@ -3730,7 +3726,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-08-29T06:55:37+00:00" }, { "name": "sebastian/version", @@ -3787,37 +3783,37 @@ }, { "name": "slevomat/coding-standard", - "version": "7.0.18", + "version": "8.4.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "b81ac84f41a4797dc25c8ede1b0718e2a74be0fc" + "reference": "02f27326be19633a1b6ba76745390bbf9a4be0b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b81ac84f41a4797dc25c8ede1b0718e2a74be0fc", - "reference": "b81ac84f41a4797dc25c8ede1b0718e2a74be0fc", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/02f27326be19633a1b6ba76745390bbf9a4be0b6", + "reference": "02f27326be19633a1b6ba76745390bbf9a4be0b6", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "^1.0.0", - "squizlabs/php_codesniffer": "^3.6.1" + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": ">=1.7.0 <1.8.0", + "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { - "phing/phing": "2.17.0", - "php-parallel-lint/php-parallel-lint": "1.3.1", - "phpstan/phpstan": "1.2.0", + "phing/phing": "2.17.4", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.8.2", "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0", - "phpstan/phpstan-strict-rules": "1.1.0", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.10" + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.3.0", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.21" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -3832,7 +3828,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.0.18" + "source": "https://github.com/slevomat/coding-standard/tree/8.4.0" }, "funding": [ { @@ -3844,7 +3840,7 @@ "type": "tidelift" } ], - "time": "2021-12-07T17:19:06+00:00" + "time": "2022-08-09T19:03:45+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -3904,16 +3900,16 @@ }, { "name": "symfony/console", - "version": "v5.4.11", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10" + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/535846c7ee6bc4dd027ca0d93220601456734b10", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10", + "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", "shasum": "" }, "require": { @@ -3983,7 +3979,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.11" + "source": "https://github.com/symfony/console/tree/v5.4.12" }, "funding": [ { @@ -3999,7 +3995,7 @@ "type": "tidelift" } ], - "time": "2022-07-22T10:42:43+00:00" + "time": "2022-08-17T13:18:05+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4070,16 +4066,16 @@ }, { "name": "symfony/options-resolver", - "version": "v5.4.3", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8" + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", "shasum": "" }, "require": { @@ -4119,7 +4115,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.3" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" }, "funding": [ { @@ -4135,7 +4131,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4714,16 +4710,16 @@ }, { "name": "symfony/string", - "version": "v5.4.11", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322" + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322", + "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", "shasum": "" }, "require": { @@ -4780,7 +4776,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.11" + "source": "https://github.com/symfony/string/tree/v5.4.12" }, "funding": [ { @@ -4796,7 +4792,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T16:15:25+00:00" + "time": "2022-08-12T17:03:11+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/Postmark/ClientBehaviour/Bounces.php b/src/Postmark/ClientBehaviour/Bounces.php index 10330748..79c11833 100644 --- a/src/Postmark/ClientBehaviour/Bounces.php +++ b/src/Postmark/ClientBehaviour/Bounces.php @@ -65,7 +65,7 @@ public function getBounces( public function getBounce($id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/bounces/%s', $id)) + $this->processRestRequest('GET', sprintf('/bounces/%s', $id)), ); } @@ -79,7 +79,7 @@ public function getBounce($id): DynamicResponseModel public function getBounceDump($id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/bounces/%s/dump', $id)) + $this->processRestRequest('GET', sprintf('/bounces/%s/dump', $id)), ); } @@ -93,7 +93,7 @@ public function getBounceDump($id): DynamicResponseModel public function activateBounce($id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('PUT', sprintf('/bounces/%s/activate', $id)) + $this->processRestRequest('PUT', sprintf('/bounces/%s/activate', $id)), ); } } diff --git a/src/Postmark/ClientBehaviour/InboundMessages.php b/src/Postmark/ClientBehaviour/InboundMessages.php index a38f8adc..75691dfc 100644 --- a/src/Postmark/ClientBehaviour/InboundMessages.php +++ b/src/Postmark/ClientBehaviour/InboundMessages.php @@ -60,7 +60,7 @@ public function getInboundMessages( public function getInboundMessageDetails(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/messages/inbound/%s/details', $id)) + $this->processRestRequest('GET', sprintf('/messages/inbound/%s/details', $id)), ); } @@ -73,7 +73,7 @@ public function getInboundMessageDetails(string $id): DynamicResponseModel public function bypassInboundMessageRules(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('PUT', sprintf('/messages/inbound/%s/bypass', $id)) + $this->processRestRequest('PUT', sprintf('/messages/inbound/%s/bypass', $id)), ); } @@ -85,7 +85,7 @@ public function bypassInboundMessageRules(string $id): DynamicResponseModel public function retryInboundMessageHook(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('PUT', sprintf('/messages/inbound/%s/retry', $id)) + $this->processRestRequest('PUT', sprintf('/messages/inbound/%s/retry', $id)), ); } @@ -100,7 +100,7 @@ public function createInboundRuleTrigger(string $rule): DynamicResponseModel $body['Rule'] = $rule; return new DynamicResponseModel( - $this->processRestRequest('POST', '/triggers/inboundrules', $body) + $this->processRestRequest('POST', '/triggers/inboundrules', $body), ); } @@ -118,7 +118,7 @@ public function listInboundRuleTriggers(int $count = 100, int $offset = 0): Dyna $query['offset'] = $offset; return new DynamicResponseModel( - $this->processRestRequest('GET', '/triggers/inboundrules', $query) + $this->processRestRequest('GET', '/triggers/inboundrules', $query), ); } @@ -130,7 +130,7 @@ public function listInboundRuleTriggers(int $count = 100, int $offset = 0): Dyna public function deleteInboundRuleTrigger(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('DELETE', sprintf('/triggers/inboundrules/%s', $id)) + $this->processRestRequest('DELETE', sprintf('/triggers/inboundrules/%s', $id)), ); } } diff --git a/src/Postmark/ClientBehaviour/MessageStreams.php b/src/Postmark/ClientBehaviour/MessageStreams.php index 199d99d5..9bbb91d1 100644 --- a/src/Postmark/ClientBehaviour/MessageStreams.php +++ b/src/Postmark/ClientBehaviour/MessageStreams.php @@ -94,7 +94,7 @@ public function listMessageStreams( public function archiveMessageStream(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('POST', sprintf('/message-streams/%s/archive', $id)) + $this->processRestRequest('POST', sprintf('/message-streams/%s/archive', $id)), ); } @@ -108,7 +108,7 @@ public function archiveMessageStream(string $id): DynamicResponseModel public function unarchiveMessageStream(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('POST', sprintf('/message-streams/%s/unarchive', $id)) + $this->processRestRequest('POST', sprintf('/message-streams/%s/unarchive', $id)), ); } } diff --git a/src/Postmark/ClientBehaviour/OutboundMessages.php b/src/Postmark/ClientBehaviour/OutboundMessages.php index 5aba62bb..e74922de 100644 --- a/src/Postmark/ClientBehaviour/OutboundMessages.php +++ b/src/Postmark/ClientBehaviour/OutboundMessages.php @@ -84,7 +84,7 @@ public function getOutboundMessages( public function getOutboundMessageDetails(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/messages/outbound/%s/details', $id)) + $this->processRestRequest('GET', sprintf('/messages/outbound/%s/details', $id)), ); } @@ -97,7 +97,7 @@ public function getOutboundMessageDetails(string $id): DynamicResponseModel public function getOutboundMessageDump(string $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/messages/outbound/%s/dump', $id)) + $this->processRestRequest('GET', sprintf('/messages/outbound/%s/dump', $id)), ); } } diff --git a/src/Postmark/ClientBehaviour/PostmarkClientBase.php b/src/Postmark/ClientBehaviour/PostmarkClientBase.php index 026c1df0..f5c8cd84 100644 --- a/src/Postmark/ClientBehaviour/PostmarkClientBase.php +++ b/src/Postmark/ClientBehaviour/PostmarkClientBase.php @@ -112,7 +112,7 @@ protected function processRestRequest(string $method, string $path, array $param case RequestMethodInterface::METHOD_POST: case RequestMethodInterface::METHOD_PATCH: $body = $this->streamFactory->createStream( - json_encode($params, JSON_THROW_ON_ERROR) + json_encode($params, JSON_THROW_ON_ERROR), ); break; @@ -130,7 +130,7 @@ protected function processRestRequest(string $method, string $path, array $param PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, - PHP_OS_FAMILY + PHP_OS_FAMILY, )) ->withHeader('Accept', 'application/json') ->withHeader('Content-Type', 'application/json') @@ -157,7 +157,7 @@ protected function processRestRequest(string $method, string $path, array $param (string) $response->getBody(), true, 512, - JSON_THROW_ON_ERROR | JSON_BIGINT_AS_STRING + JSON_THROW_ON_ERROR | JSON_BIGINT_AS_STRING, ); return $body; diff --git a/src/Postmark/ClientBehaviour/Statistics.php b/src/Postmark/ClientBehaviour/Statistics.php index b1cb7a21..2a133e47 100644 --- a/src/Postmark/ClientBehaviour/Statistics.php +++ b/src/Postmark/ClientBehaviour/Statistics.php @@ -74,7 +74,7 @@ public function getOpenStatistics( $query['messagestream'] = $messagestream; return new DynamicResponseModel( - $this->processRestRequest('GET', '/messages/outbound/opens', $query) + $this->processRestRequest('GET', '/messages/outbound/opens', $query), ); } @@ -133,7 +133,7 @@ public function getClickStatistics( $query['messagestream'] = $messagestream; return new DynamicResponseModel( - $this->processRestRequest('GET', '/messages/outbound/clicks', $query) + $this->processRestRequest('GET', '/messages/outbound/clicks', $query), ); } @@ -156,8 +156,8 @@ public function getOpenStatisticsForMessage( [ 'count' => $count, 'offset' => $offset, - ] - ) + ], + ), ); } @@ -180,8 +180,8 @@ public function getClickStatisticsForMessage( [ 'count' => $count, 'offset' => $offset, - ] - ) + ], + ), ); } @@ -201,8 +201,8 @@ private function stats( 'fromdate' => $fromDate, 'todate' => $toDate, 'messagestream' => $messageStream, - ] - ) + ], + ), ); } @@ -379,8 +379,8 @@ public function getOutboundReadTimeStatistics( 'tag' => $tag, 'fromdate' => $fromdate, 'todate' => $todate, - ] - ) + ], + ), ); } diff --git a/src/Postmark/ClientBehaviour/Suppressions.php b/src/Postmark/ClientBehaviour/Suppressions.php index 9470c916..55b00d96 100644 --- a/src/Postmark/ClientBehaviour/Suppressions.php +++ b/src/Postmark/ClientBehaviour/Suppressions.php @@ -31,8 +31,8 @@ public function createSuppressions( $this->processRestRequest( 'POST', sprintf('/message-streams/%s/suppressions', $messageStream), - ['Suppressions' => $suppressionChanges] - ) + ['Suppressions' => $suppressionChanges], + ), ); } @@ -56,8 +56,8 @@ public function deleteSuppressions( $this->processRestRequest( 'POST', sprintf('/message-streams/%s/suppressions/delete', $messageStream), - ['Suppressions' => $suppressionChanges] - ) + ['Suppressions' => $suppressionChanges], + ), ); } @@ -90,7 +90,7 @@ public function getSuppressions( $query['EmailAddress'] = $emailAddress; return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/message-streams/%s/suppressions/dump', $messageStream), $query) + $this->processRestRequest('GET', sprintf('/message-streams/%s/suppressions/dump', $messageStream), $query), ); } } diff --git a/src/Postmark/ClientBehaviour/Templates.php b/src/Postmark/ClientBehaviour/Templates.php index a00be327..413a89bf 100644 --- a/src/Postmark/ClientBehaviour/Templates.php +++ b/src/Postmark/ClientBehaviour/Templates.php @@ -28,7 +28,7 @@ trait Templates public function deleteTemplate($id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('DELETE', sprintf('/templates/%s', $id)) + $this->processRestRequest('DELETE', sprintf('/templates/%s', $id)), ); } @@ -104,7 +104,7 @@ public function editTemplate( $template['layoutTemplate'] = $layoutTemplate; return new DynamicResponseModel( - $this->processRestRequest('PUT', sprintf('/templates/%s', $id), $template) + $this->processRestRequest('PUT', sprintf('/templates/%s', $id), $template), ); } @@ -117,7 +117,7 @@ public function editTemplate( public function getTemplate($id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/templates/%s', $id)) + $this->processRestRequest('GET', sprintf('/templates/%s', $id)), ); } diff --git a/src/Postmark/ClientBehaviour/Webhooks.php b/src/Postmark/ClientBehaviour/Webhooks.php index 375120b3..f3ce7472 100644 --- a/src/Postmark/ClientBehaviour/Webhooks.php +++ b/src/Postmark/ClientBehaviour/Webhooks.php @@ -29,7 +29,7 @@ trait Webhooks public function getWebhookConfiguration(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/webhooks/%s', $id)) + $this->processRestRequest('GET', sprintf('/webhooks/%s', $id)), ); } @@ -42,7 +42,7 @@ public function getWebhookConfiguration(int $id): DynamicResponseModel public function getWebhookConfigurations(?string $messageStream = null): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', '/webhooks', ['MessageStream' => $messageStream]) + $this->processRestRequest('GET', '/webhooks', ['MessageStream' => $messageStream]), ); } @@ -54,7 +54,7 @@ public function getWebhookConfigurations(?string $messageStream = null): Dynamic public function deleteWebhookConfiguration(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('DELETE', sprintf('/webhooks/%s', $id)) + $this->processRestRequest('DELETE', sprintf('/webhooks/%s', $id)), ); } @@ -111,7 +111,7 @@ public function editWebhookConfiguration( $body['Triggers'] = $triggers; return new DynamicResponseModel( - $this->processRestRequest('PUT', sprintf('/webhooks/%s', $id), $body) + $this->processRestRequest('PUT', sprintf('/webhooks/%s', $id), $body), ); } } diff --git a/src/Postmark/Exception/AttachmentFileCannotBeLoaded.php b/src/Postmark/Exception/AttachmentFileCannotBeLoaded.php index 6c39374f..4c0e64d9 100644 --- a/src/Postmark/Exception/AttachmentFileCannotBeLoaded.php +++ b/src/Postmark/Exception/AttachmentFileCannotBeLoaded.php @@ -15,7 +15,7 @@ public static function fromPath(string $filePath): self { return new self(sprintf( 'The file at "%s" cannot be loaded. Either because it does not exist, or couldn’t be read', - $filePath + $filePath, ), 0); } } diff --git a/src/Postmark/Exception/CommunicationFailure.php b/src/Postmark/Exception/CommunicationFailure.php index 28cdaba8..d7517a52 100644 --- a/src/Postmark/Exception/CommunicationFailure.php +++ b/src/Postmark/Exception/CommunicationFailure.php @@ -26,7 +26,7 @@ public static function withNetworkError(NetworkExceptionInterface $error, Reques { return new self(sprintf( 'The request failed to send due to a network error: %s', - $error->getMessage() + $error->getMessage(), ), $request, $error); } @@ -34,7 +34,7 @@ public static function withInvalidRequest(RequestExceptionInterface $error, Requ { return new self(sprintf( 'The request was not sent because it is considered invalid: %s', - $error->getMessage() + $error->getMessage(), ), $request, $error); } @@ -42,7 +42,7 @@ public static function generic(ClientExceptionInterface $error, RequestInterface { return new self(sprintf( 'An unknown error occurred during request dispatch: %s', - $error->getMessage() + $error->getMessage(), ), $request, $error); } diff --git a/src/Postmark/Exception/DiscoveryFailure.php b/src/Postmark/Exception/DiscoveryFailure.php index 8b9366f4..5d6ecb0f 100644 --- a/src/Postmark/Exception/DiscoveryFailure.php +++ b/src/Postmark/Exception/DiscoveryFailure.php @@ -15,7 +15,7 @@ public static function clientDiscoveryFailed(?Throwable $previous = null): self 'A PSR-18 HTTP Client could not be discovered. Make sure that you install one with composer, ' . 'for example: `composer require php-http/curl-client`', 0, - $previous + $previous, ); } @@ -25,7 +25,7 @@ public static function requestFactoryDiscoveryFailed(?Throwable $previous = null 'A PSR-17 Request Factory implementation could not be found. Please install one first, ' . 'for example: `composer require laminas/laminas-diactoros`', 0, - $previous + $previous, ); } @@ -35,7 +35,7 @@ public static function uriFactoryDiscoveryFailed(?Throwable $previous): self 'A PSR-17 URI Factory implementation could not be found. Please install one first, ' . 'for example: `composer require laminas/laminas-diactoros`', 0, - $previous + $previous, ); } @@ -45,7 +45,7 @@ public static function streamFactoryDiscoveryFailed(?Throwable $previous): self 'A PSR-17 Stream Factory implementation could not be found. Please install one first, ' . 'for example: `composer require laminas/laminas-diactoros`', 0, - $previous + $previous, ); } } diff --git a/src/Postmark/Exception/InvalidRequestMethod.php b/src/Postmark/Exception/InvalidRequestMethod.php index d9b97e54..d55b4f89 100644 --- a/src/Postmark/Exception/InvalidRequestMethod.php +++ b/src/Postmark/Exception/InvalidRequestMethod.php @@ -14,7 +14,7 @@ public static function with(string $method): self { return new self(sprintf( 'The request method "%s" is invalid', - $method + $method, )); } } diff --git a/src/Postmark/Exception/RequestFailure.php b/src/Postmark/Exception/RequestFailure.php index 7269d522..c9e1df69 100644 --- a/src/Postmark/Exception/RequestFailure.php +++ b/src/Postmark/Exception/RequestFailure.php @@ -34,7 +34,7 @@ public static function with(RequestInterface $request, ResponseInterface $respon 'Unauthorized: Missing or incorrect API token in header. ' . 'Please verify that you used the correct token when you constructed your client.', $request, - $response + $response, ); case 500: @@ -43,14 +43,14 @@ public static function with(RequestInterface $request, ResponseInterface $respon . 'In most cases the message is lost during the process, ' . 'and Postmark is notified so that we can investigate the issue.', $request, - $response + $response, ); case 503: return new self( 'The Postmark API is currently unavailable, please try your request later.', $request, - $response + $response, ); default: @@ -58,7 +58,7 @@ public static function with(RequestInterface $request, ResponseInterface $respon self::retrieveErrorMessage($response) ?: 'A request error occurred and there was no message encoded in the response.', $request, - $response + $response, ); } } diff --git a/src/Postmark/Models/PostmarkAttachment.php b/src/Postmark/Models/PostmarkAttachment.php index 52338877..de16d31c 100644 --- a/src/Postmark/Models/PostmarkAttachment.php +++ b/src/Postmark/Models/PostmarkAttachment.php @@ -95,7 +95,7 @@ public static function fromFile( $data, $attachmentName, $mimeType, - $contentId + $contentId, ); } diff --git a/src/Postmark/PostmarkAdminClient.php b/src/Postmark/PostmarkAdminClient.php index 1d1309ac..eb1e422e 100644 --- a/src/Postmark/PostmarkAdminClient.php +++ b/src/Postmark/PostmarkAdminClient.php @@ -35,7 +35,7 @@ protected function authorizationHeaderName(): string public function getServer(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/servers/%s', $id)) + $this->processRestRequest('GET', sprintf('/servers/%s', $id)), ); } @@ -53,7 +53,7 @@ public function listServers(int $count = 100, int $offset = 0, ?string $name = n 'count' => $count, 'offset' => $offset, 'name' => $name, - ]) + ]), ); } @@ -67,7 +67,7 @@ public function listServers(int $count = 100, int $offset = 0, ?string $name = n public function deleteServer(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('DELETE', sprintf('/servers/%s', $id)) + $this->processRestRequest('DELETE', sprintf('/servers/%s', $id)), ); } @@ -217,7 +217,7 @@ public function listSenderSignatures(int $count = 100, int $offset = 0): Dynamic $this->processRestRequest('GET', '/senders/', [ 'count' => $count, 'offset' => $offset, - ]) + ]), ); } @@ -229,7 +229,7 @@ public function listSenderSignatures(int $count = 100, int $offset = 0): Dynamic public function getSenderSignature(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/senders/%s', $id)) + $this->processRestRequest('GET', sprintf('/senders/%s', $id)), ); } @@ -255,7 +255,7 @@ public function createSenderSignature( 'name' => $name, 'replyToEmail' => $replyToEmail, 'returnPathDomain' => $returnPathDomain, - ]) + ]), ); } @@ -278,7 +278,7 @@ public function editSenderSignature( 'name' => $name, 'replyToEmail' => $replyToEmail, 'returnPathDomain' => $returnPathDomain, - ]) + ]), ); } @@ -290,7 +290,7 @@ public function editSenderSignature( public function deleteSenderSignature(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('DELETE', sprintf('/senders/%s', $id)) + $this->processRestRequest('DELETE', sprintf('/senders/%s', $id)), ); } @@ -303,7 +303,7 @@ public function deleteSenderSignature(int $id): DynamicResponseModel public function resendSenderSignatureConfirmation(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('POST', sprintf('/senders/%s/resend', $id)) + $this->processRestRequest('POST', sprintf('/senders/%s/resend', $id)), ); } @@ -319,7 +319,7 @@ public function listDomains(int $count = 100, int $offset = 0): DynamicResponseM $this->processRestRequest('GET', '/domains/', [ 'count' => $count, 'offset' => $offset, - ]) + ]), ); } @@ -331,7 +331,7 @@ public function listDomains(int $count = 100, int $offset = 0): DynamicResponseM public function getDomain(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('GET', sprintf('/domains/%s', $id)) + $this->processRestRequest('GET', sprintf('/domains/%s', $id)), ); } @@ -347,7 +347,7 @@ public function createDomain(string $name, ?string $returnPathDomain = null): Dy $this->processRestRequest('POST', '/domains/', [ 'returnPathDomain' => $returnPathDomain, 'name' => $name, - ]) + ]), ); } @@ -360,7 +360,7 @@ public function createDomain(string $name, ?string $returnPathDomain = null): Dy public function editDomain(int $id, ?string $returnPathDomain = null): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('PUT', sprintf('/domains/%s', $id), ['returnPathDomain' => $returnPathDomain]) + $this->processRestRequest('PUT', sprintf('/domains/%s', $id), ['returnPathDomain' => $returnPathDomain]), ); } @@ -372,7 +372,7 @@ public function editDomain(int $id, ?string $returnPathDomain = null): DynamicRe public function deleteDomain(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('DELETE', sprintf('/domains/%s', $id)) + $this->processRestRequest('DELETE', sprintf('/domains/%s', $id)), ); } @@ -386,7 +386,7 @@ public function deleteDomain(int $id): DynamicResponseModel public function verifyDomainSPF(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('POST', sprintf('/domains/%s/verifyspf', $id)) + $this->processRestRequest('POST', sprintf('/domains/%s/verifyspf', $id)), ); } @@ -400,7 +400,7 @@ public function verifyDomainSPF(int $id): DynamicResponseModel public function rotateDKIMForDomain(int $id): DynamicResponseModel { return new DynamicResponseModel( - $this->processRestRequest('POST', sprintf('/domains/%s/rotatedkim', $id)) + $this->processRestRequest('POST', sprintf('/domains/%s/rotatedkim', $id)), ); } } diff --git a/src/Postmark/PostmarkClient.php b/src/Postmark/PostmarkClient.php index e60015eb..8b1d33cf 100644 --- a/src/Postmark/PostmarkClient.php +++ b/src/Postmark/PostmarkClient.php @@ -285,7 +285,7 @@ public function sendEmailBatchWithTemplate(array $emailBatch = []): DynamicRespo } return new DynamicResponseModel( - $this->processRestRequest('POST', '/email/batchWithTemplates', ['Messages' => $final]) + $this->processRestRequest('POST', '/email/batchWithTemplates', ['Messages' => $final]), ); } diff --git a/tests/Unit/ClientBehaviour/BouncesTest.php b/tests/Unit/ClientBehaviour/BouncesTest.php index 8ead275b..dd59ebe6 100644 --- a/tests/Unit/ClientBehaviour/BouncesTest.php +++ b/tests/Unit/ClientBehaviour/BouncesTest.php @@ -9,9 +9,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @link Bounces - */ +/** @link Bounces */ class BouncesTest extends MockClientTestCase { private PostmarkClient $client; @@ -79,7 +77,7 @@ public function testGetBouncesWithParameters(): void 'msg-id', 'FROM', 'TO', - 'Stream' + 'Stream', ); $this->assertQueryParameterValueEquals('count', '42'); diff --git a/tests/Unit/ClientBehaviour/InboundMessagesTest.php b/tests/Unit/ClientBehaviour/InboundMessagesTest.php index 83f22f1f..7cfeeb09 100644 --- a/tests/Unit/ClientBehaviour/InboundMessagesTest.php +++ b/tests/Unit/ClientBehaviour/InboundMessagesTest.php @@ -9,9 +9,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @see InboundMessages - */ +/** @see InboundMessages */ class InboundMessagesTest extends MockClientTestCase { private PostmarkClient $client; diff --git a/tests/Unit/ClientBehaviour/MessageStreamsTest.php b/tests/Unit/ClientBehaviour/MessageStreamsTest.php index 095db913..bfafe880 100644 --- a/tests/Unit/ClientBehaviour/MessageStreamsTest.php +++ b/tests/Unit/ClientBehaviour/MessageStreamsTest.php @@ -9,9 +9,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @see MessageStreams - */ +/** @see MessageStreams */ class MessageStreamsTest extends MockClientTestCase { private PostmarkClient $client; diff --git a/tests/Unit/ClientBehaviour/OutboundMessagesTest.php b/tests/Unit/ClientBehaviour/OutboundMessagesTest.php index e65b7e85..9313df90 100644 --- a/tests/Unit/ClientBehaviour/OutboundMessagesTest.php +++ b/tests/Unit/ClientBehaviour/OutboundMessagesTest.php @@ -11,9 +11,7 @@ use function array_keys; -/** - * @see OutboundMessages - */ +/** @see OutboundMessages */ class OutboundMessagesTest extends MockClientTestCase { private PostmarkClient $client; @@ -79,7 +77,7 @@ public function testGetOutboundMessagesWithArguments(): void 'FromDate', 'ToDate', null, - 'Stream' + 'Stream', ); $this->assertLastRequestMethodWas('GET'); $this->assertLastRequestPathEquals('/messages/outbound'); diff --git a/tests/Unit/ClientBehaviour/PostmarkClientBaseTest.php b/tests/Unit/ClientBehaviour/PostmarkClientBaseTest.php index 47245a2e..56166ed5 100644 --- a/tests/Unit/ClientBehaviour/PostmarkClientBaseTest.php +++ b/tests/Unit/ClientBehaviour/PostmarkClientBaseTest.php @@ -32,7 +32,7 @@ public function testThatByDefaultTheUriWillPointToThePostmarkApi(): void $expect = PostmarkClientBase::DEFAULT_BASE_URI; self::assertEquals( $expect, - (string) (new StubClient('foo'))->baseUri() + (string) (new StubClient('foo'))->baseUri(), ); } diff --git a/tests/Unit/ClientBehaviour/StatisticsTest.php b/tests/Unit/ClientBehaviour/StatisticsTest.php index 53d87d61..42ad9501 100644 --- a/tests/Unit/ClientBehaviour/StatisticsTest.php +++ b/tests/Unit/ClientBehaviour/StatisticsTest.php @@ -9,9 +9,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @link Statistics - */ +/** @link Statistics */ class StatisticsTest extends MockClientTestCase { private PostmarkClient $client; diff --git a/tests/Unit/ClientBehaviour/SuppressionsTest.php b/tests/Unit/ClientBehaviour/SuppressionsTest.php index 298825f4..9a681487 100644 --- a/tests/Unit/ClientBehaviour/SuppressionsTest.php +++ b/tests/Unit/ClientBehaviour/SuppressionsTest.php @@ -10,9 +10,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @see Suppressions - */ +/** @see Suppressions */ class SuppressionsTest extends MockClientTestCase { private PostmarkClient $client; @@ -119,7 +117,7 @@ public function testGetSuppressionsWithArguments(): void 'Origin', 'FromDate', 'ToDate', - 'Email' + 'Email', ); $this->assertLastRequestMethodWas('GET'); $this->assertLastRequestPathEquals('/message-streams/other/suppressions/dump'); diff --git a/tests/Unit/ClientBehaviour/TemplatesTest.php b/tests/Unit/ClientBehaviour/TemplatesTest.php index 7cbfb782..f361d060 100644 --- a/tests/Unit/ClientBehaviour/TemplatesTest.php +++ b/tests/Unit/ClientBehaviour/TemplatesTest.php @@ -9,9 +9,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @see Templates - */ +/** @see Templates */ class TemplatesTest extends MockClientTestCase { private PostmarkClient $client; @@ -59,7 +57,7 @@ public function testCreateTemplate(): void 'TEXT', 'alias', 'Type', - 'Layout' + 'Layout', ); $this->assertLastRequestMethodWas('POST'); @@ -190,7 +188,7 @@ public function testValidateTemplateWithArguments(): void $model, false, 'Foo', - 'Baz' + 'Baz', ); $this->assertLastRequestMethodWas('POST'); diff --git a/tests/Unit/ClientBehaviour/WebhooksTest.php b/tests/Unit/ClientBehaviour/WebhooksTest.php index c76a2544..3ec82bdb 100644 --- a/tests/Unit/ClientBehaviour/WebhooksTest.php +++ b/tests/Unit/ClientBehaviour/WebhooksTest.php @@ -12,9 +12,7 @@ use Postmark\Tests\Unit\MockClientTestCase; use Postmark\Tests\Unit\ResponseFixture; -/** - * @see Webhooks - */ +/** @see Webhooks */ class WebhooksTest extends MockClientTestCase { private PostmarkClient $client; diff --git a/tests/Unit/Exception/RequestFailureTest.php b/tests/Unit/Exception/RequestFailureTest.php index 4f186e16..d78ce914 100644 --- a/tests/Unit/Exception/RequestFailureTest.php +++ b/tests/Unit/Exception/RequestFailureTest.php @@ -34,8 +34,8 @@ private function responseHasJsonBody(array $body): void { $this->response = $this->response->withBody( $this->streamFactory->createStream( - json_encode($body, JSON_THROW_ON_ERROR) - ) + json_encode($body, JSON_THROW_ON_ERROR), + ), ); } @@ -51,7 +51,7 @@ public function testExpectedMessageWhenTheResponseHasNoBody(): void $exception = RequestFailure::with($this->request, $this->response); self::assertEquals( 'A request error occurred and there was no message encoded in the response.', - $exception->getMessage() + $exception->getMessage(), ); } diff --git a/tests/Unit/PostmarkAdminClientTest.php b/tests/Unit/PostmarkAdminClientTest.php index 921a7f2d..33f7e80a 100644 --- a/tests/Unit/PostmarkAdminClientTest.php +++ b/tests/Unit/PostmarkAdminClientTest.php @@ -121,7 +121,7 @@ public function testEditServerWithArguments(): void 'Track', 'Click', 'Deliver', - true + true, ); $expected = [ @@ -194,7 +194,7 @@ public function testCreateServerWithArguments(): void 'Track', 'Click', 'Deliver', - true + true, ); $expected = [ diff --git a/tests/Unit/PostmarkClientTest.php b/tests/Unit/PostmarkClientTest.php index de17e24f..47fa6374 100644 --- a/tests/Unit/PostmarkClientTest.php +++ b/tests/Unit/PostmarkClientTest.php @@ -152,7 +152,7 @@ public function testEditServerParams(): void 20, 'Track Links', 'Click Hook', - 'Delivery Hook' + 'Delivery Hook', ); $expect = [