Completed
Push — feature/fix-somescrutinizer-is... ( 03fa6a...7ccc0d )
by Narcotic
09:35
created

XDynamicKeyException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 9.4286
c 2
b 0
f 1
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * XDynamicKeyException
4
 */
5
6
namespace Graviton\ExceptionBundle\Exception;
7
8
use Symfony\Component\HttpFoundation\Response;
9
10
/**
11
 * XDynamicKey exception class
12
 *
13
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
14
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
15
 * @link     http://swisscom.ch
16
 */
17
final class XDynamicKeyException extends RestException
18
{
19
    /**
20
     * Constructor
21
     *
22
     * @param string     $message Error message
23
     * @param \Exception $prev    Previous Exception
24
     */
25
    public function __construct($message = "x-dynamic-key ref-field could not be resolved", $prev = null)
26
    {
27
28
        parent::__construct(Response::HTTP_INTERNAL_SERVER_ERROR, $message, $prev);
29
    }
30
}
31