Completed
Push — master ( 5fca22...233410 )
by Emily
01:43
created

MissingContextException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 22
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
/**
3
 * This file is part of the Composite Utils package.
4
 *
5
 * (c) Emily Shepherd <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the
8
 * LICENSE.md file that was distributed with this source code.
9
 *
10
 * @package spaark/composite-utils
11
 * @author Emily Shepherd <[email protected]>
12
 * @license MIT
13
 */
14
15
namespace Spaark\CompositeUtils\Exception;
16
17
use \LogicException;
18
use \Throwable;
19
20
/**
21
 * Thrown when a property cannot be accessed for any reason
22
 */
23
class MissingContextException extends LogicException
24
{
25
    /**
26
     * Creates the exception, populating its error message from class
27
     * and property names
28
     *
29
     * @param Throwable $previous The exception which caused this
30
     */
31
    public function __construct
32
    (
33
        Throwable $previous = null
34
    )
35
    {
36
        parent::__construct
37
        (
38
              'Cannot serialize object containing generics without '
39
            . 'context',
40
            0,
41
            $previous
42
        );
43
    }
44
}
45