Test Setup Failed
Branch master (cd85d0)
by Valery
09:54
created

Profile::setFullName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Entity;
6
7
use App\Entity\Traits\EntityIdTrait;
8
use App\Repository\ProfileRepository;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * @ORM\Entity(repositoryClass=ProfileRepository::class)
13
 */
14
class Profile
15
{
16
    use EntityIdTrait;
17
18
    /**
19
     * @ORM\Column(type="string", length=255, nullable=true)
20
     */
21
    private $full_name;
22
23
    /**
24
     * @ORM\Column(type="string", length=255, nullable=true)
25
     */
26
    private $phone;
27
28
    /**
29
     * @ORM\OneToOne(targetEntity=User::class, inversedBy="profile", cascade={"persist", "remove"})
30
     * @ORM\JoinColumn(nullable=false)
31
     */
32
    private $user;
33
34
    public function getFullName(): ?string
35
    {
36
        return $this->full_name;
37
    }
38
39
    public function setFullName(?string $full_name): self
40
    {
41
        $this->full_name = $full_name;
42
43
        return $this;
44
    }
45
46
    public function getPhone(): ?string
47
    {
48
        return $this->phone;
49
    }
50
51
    public function setPhone(?string $phone): self
52
    {
53
        $this->phone = $phone;
54
55
        return $this;
56
    }
57
58
    public function getUser(): ?User
59
    {
60
        return $this->user;
61
    }
62
63
    public function setUser(User $user): self
64
    {
65
        $this->user = $user;
66
67
        return $this;
68
    }
69
}
70