EmailManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 2
c 3
b 1
f 0
lcom 1
cbo 3
dl 0
loc 25
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 8 1
1
<?php
2
3
namespace PeterNijssen\Ses\Manager;
4
5
use Aws\Ses\SesClient;
6
use PeterNijssen\Ses\Model\EmailIdentity;
7
8
/**
9
 * This manager handles email identities
10
 */
11
class EmailManager extends SesManager
12
{
13
    /**
14
     * Constructor
15
     *
16
     * @param SesClient     $sesClient
17
     * @param EmailIdentity $identity
18
     */
19 8
    public function __construct(SesClient $sesClient, EmailIdentity $identity)
20
    {
21 8
        parent::__construct($sesClient, $identity);
22 8
    }
23
24
    /**
25
     * Create the identity within SES
26
     */
27 1
    public function create()
28
    {
29 1
        $this->sesClient->verifyEmailIdentity(
30
            [
31 1
                'EmailAddress' => $this->identity->getIdentity(),
32
            ]
33 1
        );
34 1
    }
35
}
36