Completed
Pull Request — master (#28)
by Valentyn
02:24
created

UserProfileContacts   A

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
declare(strict_types=1);
3
4
namespace App\Users\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\Users\Entity\UserProfile", inversedBy="contacts")
23
     * @ORM\JoinColumn(nullable=false)
24
     */
25
    private $profile;
26
27
    /**
28
     * @ORM\Column(type="string", length=30)
29
     */
30
    private $provider;
31
32
    /**
33
     * @ORM\Column(type="string", length=255)
34
     */
35
    private $url;
36
37 4
    public function __construct(UserProfile $userProfile, string $provider, string $url)
38
    {
39 4
        $this->profile = $userProfile;
40 4
        $this->provider = $provider;
41 4
        $this->url = $url;
42 4
    }
43
44
    /**
45
     * @return mixed
46
     */
47 1
    public function getId()
48
    {
49 1
        return $this->id;
50
    }
51
52
    /**
53
     * @return UserProfile
54
     */
55 1
    public function getProfile(): UserProfile
56
    {
57 1
        return $this->profile;
58
    }
59
60 1
    public function getProvider(): string
61
    {
62 1
        return $this->provider;
63
    }
64
65 1
    public function getUrl(): string
66
    {
67 1
        return $this->url;
68
    }
69
}