Completed
Push — 2.1 ( 37580d...257604 )
by
unknown
12:15
created

ForbiddenHttpException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
/**
3
 * @link http://www.yiiframework.com/
4
 * @copyright Copyright (c) 2008 Yii Software LLC
5
 * @license http://www.yiiframework.com/license/
6
 */
7
8
namespace yii\web;
9
10
/**
11
 * ForbiddenHttpException represents a "Forbidden" HTTP exception with status code 403.
12
 *
13
 * Use this exception when a user is not allowed to perform the requested action.
14
 * Using different credentials might or might not allow performing the requested action.
15
 * If you do not want to expose authorization information to the user, it is valid
16
 * to respond with a 404 [[NotFoundHttpException]].
17
 *
18
 * @see https://tools.ietf.org/html/rfc7231#section-6.5.3
19
 * @author Dan Schmidt <[email protected]>
20
 * @since 2.0
21
 */
22
class ForbiddenHttpException extends HttpException
23
{
24
    /**
25
     * Constructor.
26
     * @param string $message error message
27
     * @param int $code error code
28
     * @param \Exception $previous The previous exception used for the exception chaining.
29
     */
30
    public function __construct($message = null, $code = 0, \Exception $previous = null)
31
    {
32
        parent::__construct(403, $message, $code, $previous);
33
    }
34
}
35