NoPermission::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * EGroupware API - No Permission Exceptions
4
 *
5
 * @link http://www.egroupware.org
6
 * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
7
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
8
 * @package api
9
 * @subpackage exception
10
 * @access public
11
 * @version $Id$
12
 */
13
14
namespace EGroupware\Api\Exception;
15
16
/**
17
 * Base class for all exceptions about missing permissions
18
 *
19
 * New NoPermisison excpetion has to extend deprecated egw_exception_no_permission
20
 * to allow legacy code to catch them!
21
 */
22
class NoPermission extends \egw_exception_no_permission
0 ignored issues
show
Deprecated Code introduced by
The class egw_exception_no_permission has been deprecated: use Api\Exception\NoPermission ( Ignorable by Annotation )

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

22
class NoPermission extends /** @scrutinizer ignore-deprecated */ \egw_exception_no_permission
Loading history...
23
{
24
	/**
25
	 * Constructor
26
	 *
27
	 * @param string $msg =null message, default "Permission denied!"
28
	 * @param int $code =100 numerical code, default 100
29
	 */
30
	function __construct($msg=null,$code=100)
31
	{
32
		if (is_null($msg)) $msg = lang('Permisson denied!');
33
34
		parent::__construct($msg,$code);
35
	}
36
}
37