CreateAdminUserDefinition   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 50
ccs 0
cts 8
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A define() 0 3 1
1
<?php
2
3
namespace Deployee\Plugins\ShopwareTasks\Definitions;
4
5
use Deployee\Plugins\Deploy\Definitions\Parameter\ParameterCollection;
6
use Deployee\Plugins\Deploy\Definitions\Parameter\ParameterCollectionInterface;
7
use Deployee\Plugins\Deploy\Definitions\Tasks\TaskDefinitionInterface;
8
9
class CreateAdminUserDefinition implements TaskDefinitionInterface
10
{
11
    /**
12
     * @var string
13
     */
14
    private $email;
15
16
    /**
17
     * @var string
18
     */
19
    private $username;
20
21
    /**
22
     * @var string
23
     */
24
    private $password;
25
26
    /**
27
     * @var string
28
     */
29
    private $name;
30
31
    /**
32
     * @var string
33
     */
34
    private $locale;
35
36
    /**
37
     * CreateAdminUserDefinition constructor.
38
     * @param string $email
39
     * @param string $username
40
     * @param string $password
41
     * @param string $name
42
     * @param string $locale
43
     */
44
    public function __construct(string $email, string $username, string $password, string $name, string $locale = "en_GB")
45
    {
46
        $this->email = $email;
47
        $this->username = $username;
48
        $this->password = $password;
49
        $this->name = $name;
50
        $this->locale = $locale;
51
    }
52
53
    /**
54
     * @return ParameterCollectionInterface
55
     */
56
    public function define(): ParameterCollectionInterface
57
    {
58
        return new ParameterCollection(get_object_vars($this));
59
    }
60
}