UserProfileContacts::getProfile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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