MobileVerificationMessage   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 9
c 1
b 0
f 0
dl 0
loc 43
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A token() 0 5 1
A getPayload() 0 4 1
A to() 0 5 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