Test Failed
Branch master (fdda4e)
by ANTHONIUS
03:39
created

Profile::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file is part of the EOffice project.
5
 *
6
 * (c) Anthonius Munthi <https://itstoni.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace EOffice\User\Model;
15
16
use EOffice\Contracts\User\Model\ProfileInterface;
17
use EOffice\Contracts\User\Model\UserInterface;
18
19
class Profile implements ProfileInterface
20
{
21
    protected string $id;
22
    protected string $nama;
23
    protected ?UserInterface $user;
24
25
    /**
26
     * @param string        $nama
27
     * @param UserInterface $user
28
     */
29
    public function __construct(string $nama, UserInterface $user = null)
30
    {
31
        $this->nama      = $nama;
32
        $this->user      = $user;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getId(): string
39
    {
40
        return $this->id;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getNama(): string
47
    {
48
        return $this->nama;
49
    }
50
51
    /**
52
     * @param string $nama
53
     */
54
    public function setNama(string $nama): void
55
    {
56
        $this->nama = $nama;
57
    }
58
59
    /**
60
     * @return UserInterface|null
61
     */
62
    public function getUser(): ?UserInterface
63
    {
64
        return $this->user;
65
    }
66
67
    /**
68
     * @param UserInterface|null $user
69
     */
70
    public function setUser(?UserInterface $user): void
71
    {
72
        $this->user = $user;
73
    }
74
}
75