Completed
Push — master ( 463ede...2a793d )
by Gallice
03:25
created

ConversationException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 56
ccs 12
cts 12
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getSessionId() 0 4 1
A getContext() 0 4 1
A getStepData() 0 4 1
1
<?php
2
3
namespace Tgallice\Wit\Exception;
4
5
use Tgallice\Wit\Model\Context;
6
7
class ConversationException extends \RuntimeException
8
{
9
    /**
10
     * @var string|null
11
     */
12
    private $sessionId;
13
14
    /**
15
     * @var Context|null
16
     */
17
    private $context;
18
19
    /**
20
     * @var array
21
     */
22
    private $stepData;
23
24
    /**
25
     * @param string $message
26
     * @param string|null $sessionId
27
     * @param Context|null $context
28
     * @param array $step
0 ignored issues
show
Bug introduced by
There is no parameter named $step. 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...
29
     */
30 11
    public function __construct($message, $sessionId = null, Context $context = null, array $stepData = [])
31
    {
32 11
        parent::__construct($message);
33
34 11
        $this->sessionId = $sessionId;
35 11
        $this->context = $context;
36 11
        $this->stepData = $stepData;
37 11
    }
38
39
    /**
40
     * @return string|null
41
     */
42 2
    public function getSessionId()
43
    {
44 2
        return $this->sessionId;
45
    }
46
47
    /**
48
     * @return Context|null
49
     */
50 2
    public function getContext()
51
    {
52 2
        return $this->context;
53
    }
54
55
    /**
56
     * @return array
57
     */
58 4
    public function getStepData()
59
    {
60 4
        return $this->stepData;
61
    }
62
}
63