Passed
Push — master ( 311a17...5955ec )
by Fran
03:26 queued 43s
created

SecurityException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 2
1
<?php
2
3
namespace PSFS\base\exception;
4
5
/**
6
 * Class SecurityException
7
 * @package PSFS\base\exception
8
 */
9
class SecurityException extends \Exception
10
{
11
    /**
12
     * @param string|null $message
13
     */
14 3
    public function __construct($message = null)
15
    {
16 3
        parent::__construct($message ?: t("Not authorized"), 401);
17
    }
18
}
19