Completed
Pull Request — master (#9)
by Valentyn
04:21
created

UserProfileContacts::setProfile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
ccs 0
cts 3
cp 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace App\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
8
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
9
use Symfony\Component\Security\Core\User\UserInterface;
10
use JMS\Serializer\Annotation\Exclude;
11
use JMS\Serializer\Annotation\Expose;
12
13
/**
14
 * @ORM\Entity
15
 * @ORM\Table(name="users_profiles_contacts")
16
 */
17
class UserProfileContacts
18
{
19
    /**
20
     * @ORM\Id()
21
     * @ORM\GeneratedValue()
22
     * @ORM\Column(type="integer")
23
     */
24
    private $id;
25
26
    /**
27
     * @ORM\ManyToOne(targetEntity="App\Entity\UserProfile", inversedBy="contacts")
28
     * @ORM\JoinColumn(nullable=true)
29
     */
30
    private $profile;
31
32
    /**
33
     * @ORM\Column(type="string", length=255)
34
     */
35
    public $provider;
36
37
    /**
38
     * @ORM\Column(type="string", length=255)
39
     */
40
    public $url;
41
42
    /**
43
     * @return mixed
44
     */
45
    public function getId()
46
    {
47
        return $this->id;
48
    }
49
50
    /**
51
     * @param mixed $profile
52
     * @return UserProfileContacts
53
     */
54
    public function setProfile(UserProfile $profile): self
55
    {
56
        $this->profile = $profile;
57
        return $this;
58
    }
59
}