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

MissingContextException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 0
cts 13
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 1
crap 2
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