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

AffiliateReferralView::getAffiliateReferral()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
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