Completed
Branch develop (656ecc)
by Janusz
10:43 queued 06:18
created

TwoFactorTrait::getTwilioPhoneNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace FlyingColours\TwilioTwoFactorBundle\Model\Twilio;
4
5
trait TwoFactorTrait
6
{
7
    /** @var string */
8
    protected $twilioPhoneNumber;
9
10
    /** @var string */
11
    protected $twilioPreferredMethod;
12
13
    public function getTwilioPhoneNumber(): ?string
14
    {
15
        return $this->twilioPhoneNumber;
16
    }
17
18
    public function setTwilioPhoneNumber(?string $twilioPhoneNumber)
19
    {
20
        $this->twilioPhoneNumber = $twilioPhoneNumber;
21
22
        return $this;
23
    }
24
25
    public function getTwilioPreferredMethod(): ?string
26
    {
27
        return $this->twilioPreferredMethod;
28
    }
29
30
    public function setTwilioPreferredMethod(?string $twilioPreferredMethod)
31
    {
32
        $this->twilioPreferredMethod = $twilioPreferredMethod;
33
34
        return $this;
35
    }
36
37
    public function isTwilioAuthEnabled(): bool
38
    {
39
        return $this->getTwilioPhoneNumber() !== null;
40
    }
41
}