Completed
Push — master ( 5e25c8...dae486 )
by Abdelrahman
02:22
created

AuthyMessage::doNotForce()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace NotificationChannels\Authy;
4
5
class AuthyMessage
6
{
7
    /**
8
     * The notification method (sms/call).
9
     *
10
     * @var string
11
     */
12
    public $method = 'sms';
13
14
    /**
15
     * Determine whether to force the notification over cellphone network.
16
     *
17
     * @var bool
18
     */
19
    public $force = false;
20
21
    /**
22
     * Create a new Authy message instance.
23
     *
24
     * @return static
25
     */
26
    public static function create()
27
    {
28
        return new static();
29
    }
30
31
    /**
32
     * Set the method of the Authy message.
33
     *
34
     * @param string $method
35
     *
36
     * @return $this
37
     */
38
    public function method($method)
39
    {
40
        $this->method = $method === 'call' ? 'call' : 'sms';
41
42
        return $this;
43
    }
44
45
    /**
46
     * Indicate that the notification is forced over cellphone network.
47
     *
48
     * @return $this
49
     */
50
    public function force()
51
    {
52
        $this->force = true;
53
54
        return $this;
55
    }
56
}
57