Passed
Push — master ( 05e7db...c14628 )
by vistart
04:22
created

NotMemberOfOrganizationException   A

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\ForbiddenHttpException;
17
18
/**
19
 * @version 1.0
20
 * @author vistart <[email protected]>
21
 */
22
class NotMemberOfOrganizationException extends ForbiddenHttpException
23
{
24
    /**
25
     * Constructor.
26
     * @param int $code error code
27
     * @param \Exception $previous The previous exception used for the exception chaining.
28
     */
29
    public function __construct($code = 0, \Exception $previous = null)
30
    {
31
        parent::__construct(Yii::t('organization', 'You are not a member of the organization.'), $code, $previous);
32
    }
33
34
    public function getName()
35
    {
36
        return 'NotMemberOfOrganizationException';
37
    }
38
}
39