Publisher::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
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          $topicArn
15
     * @param LoggerInterface $logger
16
     */
17
    public function __construct($region, $topicArn, LoggerInterface $logger)
18
    {
19
        $sns = SnsClient::factory(['region' => $region, 'version' => '2010-03-31']);
0 ignored issues
show
Deprecated Code introduced by
The method Aws\AwsClient::factory() has been deprecated.

This method has been deprecated.

Loading history...
20
        $queueWriter = new QueueWriter(
21
            $sns,
22
            $topicArn,
23
            $logger
24
        );
25
        parent::__construct($queueWriter);
26
    }
27
}
28