Completed
Pull Request — master (#15)
by Alex
01:44
created

Publisher::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 3
1
<?php
2
3
namespace Cmp\Queues\Infrastructure\AWS\v20121105\DomainEvent;
4
5
use Aws\Sns\SnsClient;
6
use Cmp\Queues\Domain\Event\Publisher as DomainPublisher;
7
use Cmp\Queues\Infrastructure\AWS\v20121105\Queue\QueueWriter;
8
use Psr\Log\LoggerInterface;
9
10
class Publisher extends DomainPublisher
11
{
12
    /**
13
     * @param string          $region
14
     * @param string          $topicName
15
     * @param LoggerInterface $logger
16
     */
17
    public function __construct($region, $topicName, LoggerInterface $logger)
18
    {
19
        $client = SnsClient::factory([
0 ignored issues
show
Deprecated Code introduced by
The method Aws\AwsClient::factory() has been deprecated.

This method has been deprecated.

Loading history...
20
            'region'  => $region,
21
            'version' => '2010-03-31',
22
        ]);
23
24
        $queueWriter = new QueueWriter($client, $topicName, $logger);
25
        parent::__construct($queueWriter);
26
    }
27
}
28