MobileVerificationMessage::token()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Fouladgar\MobileVerification\Notifications\Messages;
4
5
class MobileVerificationMessage
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $token;
11
12
    /**
13
     * @var string
14
     */
15
    protected $to;
16
17
    /**
18
     * @param $to
19
     *
20
     * @return MobileVerificationMessage
21
     */
22
    public function to($to): self
23
    {
24
        $this->to = $to;
25
26
        return $this;
27
    }
28
29
    /**
30
     * @param $token
31
     *
32
     * @return MobileVerificationMessage
33
     */
34
    public function token($token): self
35
    {
36
        $this->token = $token;
37
38
        return $this;
39
    }
40
41
    /**
42
     * @return Payload
43
     */
44
    public function getPayload(): Payload
45
    {
46
        return (new Payload())->setTo($this->to)
47
            ->setToken($this->token);
48
    }
49
}
50