HttpException::getStatusCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Mosaic\Routing\Exceptions;
4
5
use Exception;
6
use Throwable;
7
8
class HttpException extends Exception
9
{
10
    /**
11
     * @var int
12
     */
13
    protected $status;
14
15
    /**
16
     * @param string         $message
17
     * @param int            $status
18
     * @param int            $code
19
     * @param Throwable|null $previous
20
     */
21 4
    public function __construct($message = "", $status = 500, $code = 0, Throwable $previous = null)
22
    {
23 4
        parent::__construct($message, $code, $previous);
24 4
        $this->status = $status;
25 4
    }
26
27
    /**
28
     * @return int
29
     */
30 1
    public function getStatusCode()
31
    {
32 1
        return $this->status;
33
    }
34
}
35