Completed
Push — master ( b0cbe8...b5c281 )
by Fabrice
02:16
created

NodalFlowException::getContext()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of NodalFlow.
5
 *     (c) Fabrice de Stefanis / https://github.com/fab2s/NodalFlow
6
 * This source file is licensed under the MIT license which you will
7
 * find in the LICENSE file or at https://opensource.org/licenses/MIT
8
 */
9
10
namespace fab2s\NodalFlow;
11
12
/**
13
 * Class NodalFlowException
14
 */
15
class NodalFlowException extends \Exception
16
{
17
    /**
18
     * @var array
19
     */
20
    protected $context = [];
21
22
    /**
23
     * @param string          $message
24
     * @param int             $code
25
     * @param null|\Exception $previous
26
     * @param array           $context
27
     */
28
    public function __construct($message, $code = 0, \Exception $previous = null, array $context = [])
29
    {
30
        $this->context = $context;
31
32
        parent::__construct($message, $code, $previous);
33
    }
34
35
    /**
36
     * @return array
37
     */
38
    public function getContext()
39
    {
40
        return $this->context;
41
    }
42
}
43