Passed
Push — master ( 843515...db168e )
by Diego
04:15
created

AffiliateReferralView   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 36
rs 10
c 1
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setAffiliateReferral() 0 3 1
A getIp() 0 3 1
A __construct() 0 3 1
A getAffiliateReferral() 0 3 1
A getId() 0 3 1
A setIp() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusReferralsPlugin\Entity;
6
7
use Sylius\Component\Resource\Model\TimestampableTrait;
8
9
class AffiliateReferralView implements AffiliateReferralViewInterface
10
{
11
    use TimestampableTrait;
12
13
    protected ?int $id = null;
14
    protected ?string $ip = null;
15
    protected ?AffiliateReferralInterface $affiliateReferral = null;
16
17
    public function __construct()
18
    {
19
        $this->createdAt = new \DateTime();
20
    }
21
22
    public function getId(): ?int
23
    {
24
        return $this->id;
25
    }
26
27
    public function getIp(): ?string
28
    {
29
        return $this->ip;
30
    }
31
32
    public function setIp(?string $ip): void
33
    {
34
        $this->ip = $ip;
35
    }
36
37
    public function getAffiliateReferral(): ?AffiliateReferralInterface
38
    {
39
        return $this->affiliateReferral;
40
    }
41
42
    public function setAffiliateReferral(?AffiliateReferralInterface $affiliateReferral): void
43
    {
44
        $this->affiliateReferral = $affiliateReferral;
45
    }
46
}
47