ContextException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of ContextException
5
 *     (c) Fabrice de Stefanis / https://github.com/fab2s/ContextException
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\ContextException;
11
12
/**
13
 * Class ContextException
14
 */
15
class ContextException extends \Exception implements ContextExceptionInterface
16
{
17
    use ContextExceptionTrait;
18
19
    /**
20
     * Instantiate an exception
21
     *
22
     * @param string          $message
23
     * @param int             $code
24
     * @param null|\Throwable $previous
25
     * @param array           $context
26
     */
27
    public function __construct(string $message = '', int $code = 0, ? \Throwable $previous = null, array $context = [])
28
    {
29
        $this->context = $context;
30
31
        parent::__construct($message, $code, $previous);
32
    }
33
}
34