UnauthorizedManageProfileException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
1
<?php
2
3
/**
4
 *  _   __ __ _____ _____ ___  ____  _____
5
 * | | / // // ___//_  _//   ||  __||_   _|
6
 * | |/ // /(__  )  / / / /| || |     | |
7
 * |___//_//____/  /_/ /_/ |_||_|     |_|
8
 * @link https://vistart.me/
9
 * @copyright Copyright (c) 2016 - 2017 vistart
10
 * @license https://vistart.me/license/
11
 */
12
13
namespace rhosocial\organization\exceptions;
14
15
use Yii;
16
use yii\web\UnauthorizedHttpException;
17
18
/**
19
 * Class UnauthorizedManageProfileException
20
 * @package rhosocial\organization\exceptions
21
 * @version 1.0
22
 * @author vistart <[email protected]>
23
 */
24
class UnauthorizedManageProfileException extends UnauthorizedHttpException
25
{
26
    /**
27
     * Constructor.
28
     * @param int $code error code
29
     * @param \Exception $previous The previous exception used for the exception chaining.
30
     */
31
    public function __construct($code = 0, \Exception $previous = null)
32
    {
33
        parent::__construct(Yii::t('organization', 'You do not have permission to manage the profile of this organization / department.'), $code, $previous);
34
    }
35
36
    public function getName()
37
    {
38
        return 'UnauthorizedManageProfileException';
39
    }
40
}
41