Test Setup Failed
Push — graphql_api ( 4ff753 )
by Herberto
07:48 queued 01:35
created

AbstractUserViewModel   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 90
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
A getId() 0 4 1
A getFullName() 0 4 1
A getUsername() 0 4 1
A getEmail() 0 4 1
A getMobile() 0 4 1
A getPassword() 0 4 1
A getType() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Explicit Architecture POC,
7
 * which is created on top of the Symfony Demo application.
8
 *
9
 * (c) Herberto Graça <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Acme\App\Presentation\Api\GraphQl\Node\User;
16
17
abstract class AbstractUserViewModel
18
{
19
    /**
20
     * @var string
21
     */
22
    private $id;
23
24
    /**
25
     * @var string
26
     */
27
    private $fullName;
28
29
    /**
30
     * @var string
31
     */
32
    private $username;
33
34
    /**
35
     * @var string
36
     */
37
    private $email;
38
39
    /**
40
     * @var string
41
     */
42
    private $mobile;
43
44
    /**
45
     * @var string
46
     */
47
    private $password;
48
49
    /**
50
     * @var string
51
     */
52
    private $type;
53
54
    protected function __construct(
55
        string $id,
56
        string $fullName,
57
        string $username,
58
        string $email,
59
        string $mobile,
60
        string $password,
61
        string $type
62
    ) {
63
        $this->id = $id;
64
        $this->fullName = $fullName;
65
        $this->username = $username;
66
        $this->email = $email;
67
        $this->mobile = $mobile;
68
        $this->password = $password;
69
        $this->type = $type;
70
    }
71
72
    public function getId(): string
73
    {
74
        return $this->id;
75
    }
76
77
    public function getFullName(): string
78
    {
79
        return $this->fullName;
80
    }
81
82
    public function getUsername(): string
83
    {
84
        return $this->username;
85
    }
86
87
    public function getEmail(): string
88
    {
89
        return $this->email;
90
    }
91
92
    public function getMobile(): string
93
    {
94
        return $this->mobile;
95
    }
96
97
    public function getPassword(): string
98
    {
99
        return $this->password;
100
    }
101
102
    public function getType(): string
103
    {
104
        return $this->type;
105
    }
106
}
107