NexmoMessage   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
dl 0
loc 53
c 0
b 0
f 0
wmc 3
lcom 2
cbo 0
ccs 6
cts 9
cp 0.6667
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A content() 0 6 1
A from() 0 6 1
1
<?php
2
3
namespace Illuminate\Notifications\Messages;
4
5
class NexmoMessage
6
{
7
    /**
8
     * The message content.
9
     *
10
     * @var string
11
     */
12
    public $content;
13
14
    /**
15
     * The phone number the message should be sent from.
16
     *
17
     * @var string
18
     */
19
    public $from;
20
21
    /**
22
     * Create a new message instance.
23
     *
24
     * @param  string  $message
0 ignored issues
show
Bug introduced by
There is no parameter named $message. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
25
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
26
     */
27 2
    public function __construct($content = '')
28
    {
29 2
        $this->content = $content;
30 2
    }
31
32
    /**
33
     * Set the message content.
34
     *
35
     * @param  string  $content
36
     * @return $this
37
     */
38
    public function content($content)
39
    {
40
        $this->content = $content;
41
42
        return $this;
43
    }
44
45
    /**
46
     * Set the phone number the message should be sent from.
47
     *
48
     * @param  string  $number
0 ignored issues
show
Bug introduced by
There is no parameter named $number. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
49
     * @return $this
50
     */
51 1
    public function from($from)
52
    {
53 1
        $this->from = $from;
54
55 1
        return $this;
56
    }
57
}
58