Completed
Push — master ( c79f7e...463ede )
by Gallice
02:34
created

ConversationException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 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
11
     */
12
    private $sessionId;
13
14
    /**
15
     * @var Context
16
     */
17
    private $context;
18
19
    /**
20
     * @var array
21
     */
22
    private $step;
23
24
    /**
25
     * @param string $sessionId
26
     * @param string $message
27
     * @param Context $context
28
     * @param array $step
29
     */
30 4
    public function __construct($sessionId, $message, Context $context, array $step = [])
31
    {
32 4
        parent::__construct($message);
33
34 4
        $this->sessionId = $sessionId;
35 4
        $this->context = $context;
36 4
        $this->step = $step;
37 4
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getSessionId()
43
    {
44
        return $this->sessionId;
45
    }
46
47
    /**
48
     * @return Context
49
     */
50
    public function getContext()
51
    {
52
        return $this->context;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getStep()
59
    {
60
        return $this->step;
61
    }
62
}
63