AccessDeniedException::__construct()   A
last analyzed

Complexity

Conditions 3
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 3
eloc 2
nc 1
nop 3
1
<?php
2
3
namespace Tonic\Component\ApiLayer\JsonRpcExtensions\Security\Exception;
4
5
use Tonic\Component\ApiLayer\JsonRpc\Exception\Exception;
6
7
/**
8
 * Usually happens when access denied.
9
 */
10
class AccessDeniedException extends Exception
11
{
12
    const CODE = 3;
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function __construct($message = '', $code = 0, \Exception $previous = null)
18
    {
19
        parent::__construct($message ?: 'Access denied', $code ?: self::CODE, $previous);
20
    }
21
}
22