Passed
Push — main ( e591c1...2428da )
by Jean-Christophe
02:42
created

Permission   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A setLevel() 0 2 1
A getLevel() 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
	 */
18
	protected $level;
19
20 7
	public function __construct(?string $name = null, int $level = 0) {
21 7
		parent::__construct($name);
22 7
		$this->level = $level;
23 7
	}
24
25
	/**
26
	 *
27
	 * @return int
28
	 */
29 2
	public function getLevel() {
30 2
		return $this->level;
31
	}
32
33
	/**
34
	 *
35
	 * @param int $level
36
	 */
37
	public function setLevel(int $level) {
38
		$this->level = $level;
39
	}
40
}
41
42