AccountPermissionException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 2
c 1
b 1
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
/**
3
 * sysPass
4
 *
5
 * @author    nuxsmin
6
 * @link      https://syspass.org
7
 * @copyright 2012-2019, Rubén Domínguez nuxsmin@$syspass.org
8
 *
9
 * This file is part of sysPass.
10
 *
11
 * sysPass is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU General Public License as published by
13
 * the Free Software Foundation, either version 3 of the License, or
14
 * (at your option) any later version.
15
 *
16
 * sysPass is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 *  along with sysPass.  If not, see <http://www.gnu.org/licenses/>.
23
 */
24
25
namespace SP\Core\Acl;
26
27
use Exception;
28
use SP\Core\Exceptions\SPException;
29
30
/**
31
 * Class AccountPermissionException
32
 *
33
 * @package SP\Core\Acl
34
 */
35
final class AccountPermissionException extends SPException
36
{
37
    /**
38
     * SPException constructor.
39
     *
40
     * @param string         $type
41
     * @param int            $code
42
     * @param Exception|null $previous
43
     */
44
    public function __construct($type, $code = 0, Exception $previous = null)
45
    {
46
        parent::__construct(__u('You don\'t have permission to access this account'), $type, __u('Please contact to the administrator'), $code, $previous);
0 ignored issues
show
Bug introduced by
$type of type string is incompatible with the type integer expected by parameter $type of SP\Core\Exceptions\SPException::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

46
        parent::__construct(__u('You don\'t have permission to access this account'), /** @scrutinizer ignore-type */ $type, __u('Please contact to the administrator'), $code, $previous);
Loading history...
47
    }
48
}