Skip to content

Commit

Permalink
use Predis\ClientInterface not a Predis\Client
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Jul 14, 2017
1 parent 23a7c55 commit d3c7b57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Queue/Pull/PredisPullEventQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

use GpsLab\Domain\Event\Event;
use GpsLab\Domain\Event\Queue\Serializer\Serializer;
use Predis\Client;
use Predis\ClientInterface;
use Psr\Log\LoggerInterface;

class PredisPullEventQueue implements PullEventQueue
{
/**
* @var Client
* @var ClientInterface
*/
private $client;

Expand All @@ -38,12 +38,12 @@ class PredisPullEventQueue implements PullEventQueue
private $queue_name = '';

/**
* @param Client $client
* @param ClientInterface $client
* @param Serializer $serializer
* @param LoggerInterface $logger
* @param string $queue_name
*/
public function __construct(Client $client, Serializer $serializer, LoggerInterface $logger, $queue_name)
public function __construct(ClientInterface $client, Serializer $serializer, LoggerInterface $logger, $queue_name)
{
$this->client = $client;
$this->serializer = $serializer;
Expand Down
6 changes: 3 additions & 3 deletions tests/Queue/Pull/PredisPullEventQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
use GpsLab\Domain\Event\Queue\Serializer\Serializer;
use GpsLab\Domain\Event\Tests\Fixture\PurchaseOrderCompletedEvent;
use GpsLab\Domain\Event\Tests\Fixture\PurchaseOrderCreatedEvent;
use Predis\Client;
use Predis\ClientInterface;
use Psr\Log\LoggerInterface;

class PredisPullEventQueueTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject|Client
* @var \PHPUnit_Framework_MockObject_MockObject|ClientInterface
*/
private $client;

Expand All @@ -46,7 +46,7 @@ class PredisPullEventQueueTest extends \PHPUnit_Framework_TestCase

protected function setUp()
{
$this->client = $this->getMock(Client::class);
$this->client = $this->getMock(ClientInterface::class);
$this->serializer = $this->getMock(Serializer::class);
$this->logger = $this->getMock(LoggerInterface::class);
$this->queue = new PredisPullEventQueue($this->client, $this->serializer, $this->logger, $this->queue_name);
Expand Down

0 comments on commit d3c7b57

Please sign in to comment.