Completed
Pull Request — master (#229)
by
unknown
02:44
created

CreateAddress   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A address() 0 4 1
A userEmail() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sylius\ShopApiPlugin\Command;
6
7
use Sylius\ShopApiPlugin\Model\Address;
8
9
final class CreateAddress
10
{
11
    /**
12
     * @var Address
13
     */
14
    private $address;
15
16
    /**
17
     * @var string
18
     */
19
    private $userEmail;
20
21
    /**
22
     * @param Address $address
23
     * @param string $userEmail
24
     */
25
    public function __construct(Address $address, string $userEmail)
26
    {
27
        $this->address = $address;
28
        $this->userEmail = $userEmail;
29
    }
30
31
    /**
32
     * @return Address
33
     */
34
    public function address(): Address
35
    {
36
        return $this->address;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function userEmail(): string
43
    {
44
        return $this->userEmail;
45
    }
46
}
47