Completed
Pull Request — master (#9)
by Valentyn
02:26
created

UserProfileContacts::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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