mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-25 14:26:04 +03:00
Correct config file (#837)
Test Test Test Test Test Test Test Ignore errors Ignore errors Ignore errors Webhook is still using ClientInterface type declaration #783
This commit is contained in:
parent
30fe24de74
commit
62bd235af7
4
roave-bc-check.yaml
Normal file
4
roave-bc-check.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
- '#Mailgun\\Api\\Webhook#'
|
||||
- '#Mailgun\\Api\\Suppression#'
|
@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Mailgun\Api;
|
||||
|
||||
use Http\Client\Common\PluginClient;
|
||||
use Mailgun\Exception\HttpClientException;
|
||||
use Mailgun\Exception\HttpServerException;
|
||||
use Mailgun\Exception\UnknownErrorException;
|
||||
@ -31,7 +30,7 @@ abstract class HttpApi
|
||||
/**
|
||||
* The HTTP client.
|
||||
*
|
||||
* @var ClientInterface|PluginClient
|
||||
* @var ClientInterface
|
||||
*/
|
||||
protected $httpClient;
|
||||
|
||||
@ -45,13 +44,13 @@ abstract class HttpApi
|
||||
*/
|
||||
protected $requestBuilder;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $httpClient
|
||||
* @param RequestBuilder $requestBuilder
|
||||
* @param Hydrator $hydrator
|
||||
*/
|
||||
public function __construct($httpClient, RequestBuilder $requestBuilder, Hydrator $hydrator)
|
||||
{
|
||||
if (!is_a($httpClient, ClientInterface::class) &&
|
||||
!is_a($httpClient, PluginClient::class)) {
|
||||
throw new \RuntimeException('httpClient must be an instance of
|
||||
Psr\Http\Client\ClientInterface or Http\Client\Common\PluginClient');
|
||||
}
|
||||
$this->httpClient = $httpClient;
|
||||
$this->requestBuilder = $requestBuilder;
|
||||
if (!$hydrator instanceof NoopHydrator) {
|
||||
|
@ -41,7 +41,12 @@ class Suppression
|
||||
*/
|
||||
private $hydrator;
|
||||
|
||||
public function __construct(ClientInterface $httpClient, RequestBuilder $requestBuilder, Hydrator $hydrator)
|
||||
/**
|
||||
* @param ClientInterface $httpClient
|
||||
* @param RequestBuilder $requestBuilder
|
||||
* @param Hydrator $hydrator
|
||||
*/
|
||||
public function __construct($httpClient, RequestBuilder $requestBuilder, Hydrator $hydrator)
|
||||
{
|
||||
$this->httpClient = $httpClient;
|
||||
$this->requestBuilder = $requestBuilder;
|
||||
|
@ -34,7 +34,13 @@ class Webhook extends HttpApi
|
||||
*/
|
||||
private $apiKey;
|
||||
|
||||
public function __construct(ClientInterface $httpClient, RequestBuilder $requestBuilder, Hydrator $hydrator, string $apiKey)
|
||||
/**
|
||||
* @param ClientInterface $httpClient
|
||||
* @param RequestBuilder $requestBuilder
|
||||
* @param Hydrator $hydrator
|
||||
* @param string $apiKey
|
||||
*/
|
||||
public function __construct($httpClient, RequestBuilder $requestBuilder, Hydrator $hydrator, string $apiKey)
|
||||
{
|
||||
parent::__construct($httpClient, $requestBuilder, $hydrator);
|
||||
$this->apiKey = $apiKey;
|
||||
|
Loading…
Reference in New Issue
Block a user