GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

SmsapiSmsMessage::fast()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 7
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace NotificationChannels\Smsapi;
4
5
use NotificationChannels\Smsapi\Exceptions\ExceptionFactory;
6
7
class SmsapiSmsMessage extends SmsapiMessage
8
{
9
    /**
10
     * @param string|null $content
11
     */
12 6
    public function __construct($content = null)
13
    {
14 6
        ExceptionFactory::assertArgumentTypes(1, __METHOD__, ['string', 'NULL'], $content);
15 6
        if ($content !== null) {
16 2
            $this->data['content'] = $content;
17 2
        }
18 6
    }
19
20
    /**
21
     * @param  string $content
22
     * @return self
23
     */
24 5
    public function content($content)
25
    {
26 5
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $content);
27 1
        $this->data['content'] = $content;
28
29 1
        return $this;
30
    }
31
32
    /**
33
     * @param  string $template
34
     * @return self
35
     */
36 5
    public function template($template)
37
    {
38 5
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $template);
39 1
        $this->data['template'] = $template;
40
41 1
        return $this;
42
    }
43
44
    /**
45
     * @param  string $from
46
     * @return self
47
     */
48 5
    public function from($from)
49
    {
50 5
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $from);
51 1
        $this->data['from'] = $from;
52
53 1
        return $this;
54
    }
55
56
    /**
57
     * @param  bool $fast
58
     * @return self
59
     */
60 6 View Code Duplication
    public function fast($fast = true)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
61
    {
62 6
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'boolean', $fast);
63 2
        $this->data['fast'] = $fast;
64
65 2
        return $this;
66
    }
67
68
    /**
69
     * @param  bool $flash
70
     * @return self
71
     */
72 7 View Code Duplication
    public function flash($flash = true)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
73
    {
74 7
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'boolean', $flash);
75 3
        $this->data['flash'] = $flash;
76
77 3
        return $this;
78
    }
79
80
    /**
81
     * @param  string $encoding
82
     * @return self
83
     */
84 5
    public function encoding($encoding)
85
    {
86 5
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $encoding);
87 1
        $this->data['encoding'] = $encoding;
88
89 1
        return $this;
90
    }
91
92
    /**
93
     * @param  bool $normalize
94
     * @return self
95
     */
96 7 View Code Duplication
    public function normalize($normalize = true)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
97
    {
98 7
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'boolean', $normalize);
99 3
        $this->data['normalize'] = $normalize;
100
101 3
        return $this;
102
    }
103
104
    /**
105
     * @param  bool $nounicode
106
     * @return self
107
     */
108 7 View Code Duplication
    public function nounicode($nounicode = true)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
109
    {
110 7
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'boolean', $nounicode);
111 3
        $this->data['nounicode'] = $nounicode;
112
113 3
        return $this;
114
    }
115
116
    /**
117
     * @param  bool $single
118
     * @return self
119
     */
120 6 View Code Duplication
    public function single($single = true)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
121
    {
122 6
        ExceptionFactory::assertArgumentType(1, __METHOD__, 'boolean', $single);
123 2
        $this->data['single'] = $single;
124
125 2
        return $this;
126
    }
127
}
128