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

Message::getQuickReplies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
}