AffiliateReferralView::setIp()   A
last analyzed

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 1
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
15
    protected ?string $ip = null;
16
17
    protected ?AffiliateReferralInterface $affiliateReferral = null;
18
19
    public function __construct()
20
    {
21
        $this->createdAt = new \DateTime();
22
    }
23
24
    public function getId(): ?int
25
    {
26
        return $this->id;
27
    }
28
29
    public function getIp(): ?string
30
    {
31
        return $this->ip;
32
    }
33
34
    public function setIp(?string $ip): void
35
    {
36
        $this->ip = $ip;
37
    }
38
39
    public function getAffiliateReferral(): ?AffiliateReferralInterface
40
    {
41
        return $this->affiliateReferral;
42
    }
43
44
    public function setAffiliateReferral(?AffiliateReferralInterface $affiliateReferral): void
45
    {
46
        $this->affiliateReferral = $affiliateReferral;
47
    }
48
}
49