Permission   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getLevel() 0 2 1
A setLevel() 0 2 1
1
<?php
2
namespace Ubiquity\security\acl\models;
3
4
/**
5
 * Ubiquity\security\acl\models$Permission
6
 * This class is part of Ubiquity
7
 *
8
 * @author jc
9
 * @version 1.0.0
10
 *
11
 */
12
class Permission extends AbstractAclPart {
13
14
	/**
15
	 *
16
	 * @var int
17
	 * @column("name"=>"level","dbType"=>"int(11)")
18
	 */
19
	protected $level;
20
21 25
	public function __construct(?string $name = null, int $level = 0) {
22 25
		parent::__construct($name);
23 25
		$this->level = $level;
24
	}
25
26
	/**
27
	 *
28
	 * @return int
29
	 */
30 15
	public function getLevel() {
31 15
		return $this->level;
32
	}
33
34
	/**
35
	 *
36
	 * @param int $level
37
	 */
38 5
	public function setLevel(int $level) {
39 5
		$this->level = $level;
40
	}
41
}
42
43