TwoFactorTrait::getTwilioPhoneNumber()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
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 1
    public function getTwilioPhoneNumber(): ?string
14
    {
15 1
        return $this->twilioPhoneNumber;
16
    }
17
18 1
    public function setTwilioPhoneNumber(?string $twilioPhoneNumber)
19
    {
20 1
        $this->twilioPhoneNumber = $twilioPhoneNumber;
21
22 1
        return $this;
23
    }
24
25 1
    public function getTwilioPreferredMethod(): ?string
26
    {
27 1
        return $this->twilioPreferredMethod;
28
    }
29
30 1
    public function setTwilioPreferredMethod(?string $twilioPreferredMethod)
31
    {
32 1
        $this->twilioPreferredMethod = $twilioPreferredMethod;
33
34 1
        return $this;
35
    }
36
37 1
    public function isTwilioAuthEnabled(): bool
38
    {
39 1
        return $this->getTwilioPhoneNumber() !== null;
40
    }
41
}