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

Publisher   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
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