mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-06 00:09:24 +03:00
Use PSR-17 and mark classes as final
This commit is contained in:
parent
466af8b9a8
commit
f84f757ae2
@ -11,14 +11,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Mailgun\HttpClient;
|
namespace Mailgun\HttpClient;
|
||||||
|
|
||||||
use Http\Client\Common\PluginClient;
|
|
||||||
use Http\Discovery\Psr18ClientDiscovery;
|
|
||||||
use Http\Discovery\UriFactoryDiscovery;
|
|
||||||
use Http\Message\UriFactory;
|
|
||||||
use Http\Client\Common\Plugin;
|
use Http\Client\Common\Plugin;
|
||||||
|
use Http\Client\Common\PluginClient;
|
||||||
|
use Http\Discovery\Psr17FactoryDiscovery;
|
||||||
|
use Http\Discovery\Psr18ClientDiscovery;
|
||||||
use Mailgun\HttpClient\Plugin\History;
|
use Mailgun\HttpClient\Plugin\History;
|
||||||
use Mailgun\HttpClient\Plugin\ReplaceUriPlugin;
|
use Mailgun\HttpClient\Plugin\ReplaceUriPlugin;
|
||||||
use Psr\Http\Client\ClientInterface;
|
use Psr\Http\Client\ClientInterface;
|
||||||
|
use Psr\Http\Message\UriFactoryInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure a HTTP client.
|
* Configure a HTTP client.
|
||||||
@ -45,7 +45,7 @@ final class HttpClientConfigurator
|
|||||||
private $apiKey;
|
private $apiKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var UriFactory
|
* @var UriFactoryInterface
|
||||||
*/
|
*/
|
||||||
private $uriFactory;
|
private $uriFactory;
|
||||||
|
|
||||||
@ -108,16 +108,16 @@ final class HttpClientConfigurator
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getUriFactory(): UriFactory
|
private function getUriFactory(): UriFactoryInterface
|
||||||
{
|
{
|
||||||
if (null === $this->uriFactory) {
|
if (null === $this->uriFactory) {
|
||||||
$this->uriFactory = UriFactoryDiscovery::find();
|
$this->uriFactory = Psr17FactoryDiscovery::findUrlFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->uriFactory;
|
return $this->uriFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUriFactory(UriFactory $uriFactory): self
|
public function setUriFactory(UriFactoryInterface $uriFactory): self
|
||||||
{
|
{
|
||||||
$this->uriFactory = $uriFactory;
|
$this->uriFactory = $uriFactory;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ use Mailgun\Model\ApiResponse;
|
|||||||
/**
|
/**
|
||||||
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||||
*/
|
*/
|
||||||
class ShowResponse implements ApiResponse
|
final class ShowResponse implements ApiResponse
|
||||||
{
|
{
|
||||||
private $webhook = [];
|
private $webhook = [];
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@ namespace Mailgun\Model\Webhook;
|
|||||||
/**
|
/**
|
||||||
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||||
*/
|
*/
|
||||||
class UpdateResponse extends BaseResponse
|
final class UpdateResponse extends BaseResponse
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user