Passed
Push — master ( c14628...00c958 )
by vistart
04:09
created

UnauthorizedManageMemberException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 18
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 UnauthorizedManageMemberException
20
 * @package rhosocial\organization\exceptions
21
 * @version 1.0
22
 * @author vistart <[email protected]>
23
 */
24
class UnauthorizedManageMemberException extends UnauthorizedHttpException
25
{
26
    /**
27
     * Constructor.
28
     * @param string $message error message
0 ignored issues
show
Bug introduced by
There is no parameter named $message. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
29
     * @param int $code error code
30
     * @param \Exception $previous The previous exception used for the exception chaining.
31
     */
32
    public function __construct($code = 0, \Exception $previous = null)
33
    {
34
        parent::__construct(Yii::t('organization', 'You do not have permission to manage member.'), $code, $previous);
35
    }
36
37
    public function getName()
38
    {
39
        return 'UnauthorizedManageMemberException';
40
    }
41
}
42