UserProfileContacts   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 58
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getId() 0 4 1
A getProfile() 0 4 1
A getProvider() 0 4 1
A getUrl() 0 4 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