Completed
Pull Request — master (#29)
by
unknown
03:41
created

Message   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 77.78%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 41
ccs 7
cts 9
cp 0.7778
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getMessage() 0 4 1
A getQuickReplies() 0 4 1
1
<?php
2
3
namespace Tgallice\Wit\Model\Step;
4
5
use Tgallice\Wit\Model\Step;
6
7
class Message extends AbstractStep
8
{
9
    /**
10
     * @var string
11
     */
12
    private $message;
13
14
    /**
15
     * @var array
16
     */
17
    private $quickreplies;
18
19
    /**
20
     * @param string $message
21
     * @param float $confidence
22
     * @param array $entities
23
     * @param array $quickreplies
24
     */
25 8
    public function __construct($message, $confidence, array $entities = [], array $quickreplies = [])
26
    {
27 8
        parent::__construct(Step::TYPE_MESSAGE, $confidence, $entities, $quickreplies);
0 ignored issues
show
Unused Code introduced by
The call to AbstractStep::__construct() has too many arguments starting with $quickreplies.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
28 8
        $this->message = $message;
29 8
        $this->quickreplies = $quickreplies;
30 8
    }
31
32
    /**
33
     * @return string
34
     */
35 2
    public function getMessage()
36
    {
37 2
        return $this->message;
38
    }
39
40
    /**
41
     * @return array
42
     */
43
    public function getQuickReplies()
44
    {
45
        return $this->quickreplies;
46
    }
47
}