Total Complexity | 11 |
Total Lines | 165 |
Duplicated Lines | 44.24 % |
Changes | 15 | ||
Bugs | 0 | Features | 3 |
Metric | Value |
---|---|
wmc | 11 |
c | 15 |
b | 0 |
f | 3 |
lcom | 1 |
cbo | 0 |
dl | 73 |
loc | 165 |
rs | 10 |
Rating | Name | Duplication | Size | Complexity |
---|---|---|---|---|
A | setAssignments() | 0 | 6 | 2 |
B | testClient() | 24 | 24 | 1 |
A | testSupport() | 23 | 23 | 1 |
B | testManager() | 0 | 26 | 1 |
A | testEmployee() | 0 | 12 | 1 |
A | testPermission() | 0 | 8 | 3 |
B | testMighty() | 0 | 30 | 1 |
B | testDeny() | 26 | 26 | 1 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | <?php |
||
2 | /** |
||
3 | * RBAC implementation for HiPanel. |
||
4 | * |
||
5 | * @link https://github.com/hiqdev/hipanel-rbac |
||
6 | * @package hipanel-rbac |
||
7 | * @license BSD-3-Clause |
||
8 | * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/) |
||
9 | */ |
||
10 | |||
11 | namespace hipanel\rbac\tests\unit; |
||
12 | |||
13 | trait CheckAccessTrait |
||
14 | { |
||
15 | public function setAssignments() |
||
16 | { |
||
17 | foreach ($this->auth->getAllItems() as $item) { |
||
18 | $this->auth->setAssignment($item->name, $item->name); |
||
0 ignored issues
–
show
|
|||
19 | } |
||
20 | } |
||
21 | |||
22 | View Code Duplication | public function testClient() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
23 | { |
||
24 | $this->assertTrue($this->auth->checkAccess('role:client', 'restore-password')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
25 | $this->assertTrue($this->auth->checkAccess('role:client', 'deposit')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
26 | $this->assertTrue($this->auth->checkAccess('role:client', 'domain.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
27 | $this->assertTrue($this->auth->checkAccess('role:client', 'domain.push')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
28 | $this->assertTrue($this->auth->checkAccess('role:client', 'server.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
29 | |||
30 | $this->assertFalse($this->auth->checkAccess('role:client', 'support')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
31 | $this->assertFalse($this->auth->checkAccess('role:client', 'manage')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
32 | $this->assertFalse($this->auth->checkAccess('role:client', 'employee.read')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
33 | $this->assertFalse($this->auth->checkAccess('role:client', 'domain.freeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
34 | $this->assertFalse($this->auth->checkAccess('role:client', 'domain.unfreeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
35 | $this->assertFalse($this->auth->checkAccess('role:client', 'domain.force-push')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
36 | $this->assertFalse($this->auth->checkAccess('role:client', 'domain.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
37 | $this->assertFalse($this->auth->checkAccess('role:client', 'admin')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
38 | $this->assertFalse($this->auth->checkAccess('role:client', 'resell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
39 | $this->assertFalse($this->auth->checkAccess('role:client', 'own')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
40 | $this->assertFalse($this->auth->checkAccess('role:client', 'document.manage')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
41 | $this->assertFalse($this->auth->checkAccess('role:client', 'contact.force-verify')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
42 | $this->assertFalse($this->auth->checkAccess('role:client', 'mailing.prepare')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
43 | $this->assertFalse($this->auth->checkAccess('role:client', 'mailing.send')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
44 | $this->assertFalse($this->auth->checkAccess('role:client', 'server.sell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
45 | } |
||
46 | |||
47 | View Code Duplication | public function testSupport() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
48 | { |
||
49 | $this->assertTrue($this->auth->checkAccess('role:support', 'support')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
50 | |||
51 | $this->assertFalse($this->auth->checkAccess('role:support', 'deposit')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
52 | $this->assertFalse($this->auth->checkAccess('role:support', 'domain.pay')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
53 | $this->assertFalse($this->auth->checkAccess('role:support', 'server.pay')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
54 | $this->assertFalse($this->auth->checkAccess('role:support', 'server.sell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
55 | $this->assertFalse($this->auth->checkAccess('role:support', 'restore-password')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
56 | $this->assertFalse($this->auth->checkAccess('role:support', 'manage')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
57 | $this->assertFalse($this->auth->checkAccess('role:support', 'employee.read')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
58 | $this->assertFalse($this->auth->checkAccess('role:support', 'domain.freeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
59 | $this->assertFalse($this->auth->checkAccess('role:support', 'domain.unfreeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
60 | $this->assertFalse($this->auth->checkAccess('role:support', 'domain.force-push')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
61 | $this->assertFalse($this->auth->checkAccess('role:support', 'domain.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
62 | $this->assertFalse($this->auth->checkAccess('role:support', 'admin')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
63 | $this->assertFalse($this->auth->checkAccess('role:support', 'resell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
64 | $this->assertFalse($this->auth->checkAccess('role:support', 'own')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
65 | $this->assertFalse($this->auth->checkAccess('role:support', 'document.manage')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
66 | $this->assertFalse($this->auth->checkAccess('role:support', 'contact.force-verify')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
67 | $this->assertFalse($this->auth->checkAccess('role:support', 'mailing.prepare')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
68 | $this->assertFalse($this->auth->checkAccess('role:support', 'mailing.send')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
69 | } |
||
70 | |||
71 | public function testManager() |
||
72 | { |
||
73 | $this->assertTrue($this->auth->checkAccess('role:manager', 'support')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
74 | $this->assertTrue($this->auth->checkAccess('role:manager', 'manage')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
75 | $this->assertTrue($this->auth->checkAccess('role:manager', 'domain.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
76 | $this->assertTrue($this->auth->checkAccess('role:manager', 'server.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
77 | $this->assertTrue($this->auth->checkAccess('role:manager', 'server.sell')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
78 | $this->assertTrue($this->auth->checkAccess('role:manager', 'document.manage')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
79 | $this->assertTrue($this->auth->checkAccess('role:manager', 'contact.force-verify')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
80 | $this->assertTrue($this->auth->checkAccess('role:manager', 'mailing.prepare')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
81 | $this->assertTrue($this->auth->checkAccess('role:manager', 'mailing.send')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
82 | |||
83 | $this->assertFalse($this->auth->checkAccess('role:manager', 'employee.read')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
84 | $this->assertFalse($this->auth->checkAccess('role:manager', 'deposit')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
85 | $this->assertFalse($this->auth->checkAccess('role:manager', 'restore-password')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
86 | $this->assertFalse($this->auth->checkAccess('role:manager', 'admin')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
87 | $this->assertFalse($this->auth->checkAccess('role:manager', 'resell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
88 | $this->assertFalse($this->auth->checkAccess('role:manager', 'own')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
89 | $this->assertFalse($this->auth->checkAccess('role:manager', 'domain.freeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
90 | $this->assertFalse($this->auth->checkAccess('role:manager', 'domain.unfreeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
91 | $this->assertFalse($this->auth->checkAccess('role:manager', 'domain.force-push')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
92 | $this->assertFalse($this->auth->checkAccess('role:manager', 'domain.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
93 | $this->assertFalse($this->auth->checkAccess('role:manager', 'bill.create')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
94 | $this->assertFalse($this->auth->checkAccess('role:manager', 'bill.update')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
95 | $this->assertFalse($this->auth->checkAccess('role:manager', 'bill.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
96 | } |
||
97 | |||
98 | public function testEmployee() |
||
99 | { |
||
100 | $this->assertTrue($this->auth->checkAccess('role:employee', 'role:client')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
101 | $this->assertTrue($this->auth->checkAccess('role:employee', 'employee.read')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
102 | |||
103 | $this->assertFalse($this->auth->checkAccess('role:employee', 'role:support')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
104 | $this->assertFalse($this->auth->checkAccess('role:employee', 'role:manager')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
105 | $this->assertFalse($this->auth->checkAccess('role:employee', 'employee.create')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
106 | $this->assertFalse($this->auth->checkAccess('role:employee', 'employee.update')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
107 | $this->assertFalse($this->auth->checkAccess('role:employee', 'employee.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
108 | $this->assertFalse($this->auth->checkAccess('role:employee', 'server.sell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
109 | } |
||
110 | |||
111 | public function testPermission() |
||
112 | { |
||
113 | foreach ($this->auth->getPermissions() as $user) { |
||
114 | foreach ($this->auth->getPermissions() as $perm) { |
||
115 | $this->assertSame($user->name === $perm->name, $this->auth->checkAccess($user->name, $perm->name)); |
||
0 ignored issues
–
show
It seems like
assertSame() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
116 | } |
||
117 | } |
||
118 | } |
||
119 | |||
120 | public function testMighty() |
||
121 | { |
||
122 | $this->auth->setAssignments('role:admin,role:manager,bill.create,domain.freeze,domain.force-push,domain.delete,employee.read', 'user:mighty'); |
||
123 | |||
124 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'support')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
125 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'manage')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
126 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'employee.read')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
127 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'domain.freeze')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
128 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'domain.force-push')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
129 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'domain.delete')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
130 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'admin')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
131 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'bill.create')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
132 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'domain.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
133 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'server.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
134 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'document.manage')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
135 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'contact.force-verify')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
136 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'mailing.prepare')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
137 | $this->assertTrue($this->auth->checkAccess('user:mighty', 'mailing.send')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
138 | |||
139 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'deposit')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
140 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'restore-password')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
141 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'resell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
142 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'own')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
143 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'bill.update')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
144 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'bill.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
145 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'employee.create')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
146 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'employee.update')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
147 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'employee.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
148 | $this->assertFalse($this->auth->checkAccess('user:mighty', 'domain.unfreeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
149 | } |
||
150 | |||
151 | View Code Duplication | public function testDeny() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
152 | { |
||
153 | $this->auth->setAssignments('role:client,deny:deposit,deny:domain.push,deny:server.pay', 'user:limited'); |
||
154 | |||
155 | $this->assertTrue($this->auth->checkAccess('user:limited', 'restore-password')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
156 | $this->assertTrue($this->auth->checkAccess('user:limited', 'domain.pay')); |
||
0 ignored issues
–
show
It seems like
assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
157 | |||
158 | $this->assertFalse($this->auth->checkAccess('user:limited', 'deposit')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
159 | $this->assertFalse($this->auth->checkAccess('user:limited', 'domain.push')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
160 | $this->assertFalse($this->auth->checkAccess('user:limited', 'server.pay')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
161 | |||
162 | $this->assertFalse($this->auth->checkAccess('user:limited', 'support')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
163 | $this->assertFalse($this->auth->checkAccess('user:limited', 'manage')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
164 | $this->assertFalse($this->auth->checkAccess('user:limited', 'employee.read')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
165 | $this->assertFalse($this->auth->checkAccess('user:limited', 'domain.freeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
166 | $this->assertFalse($this->auth->checkAccess('user:limited', 'domain.unfreeze')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
167 | $this->assertFalse($this->auth->checkAccess('user:limited', 'domain.force-push')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
168 | $this->assertFalse($this->auth->checkAccess('user:limited', 'domain.delete')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
169 | $this->assertFalse($this->auth->checkAccess('user:limited', 'admin')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
170 | $this->assertFalse($this->auth->checkAccess('user:limited', 'resell')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
171 | $this->assertFalse($this->auth->checkAccess('user:limited', 'own')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
172 | $this->assertFalse($this->auth->checkAccess('user:limited', 'document.manage')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
173 | $this->assertFalse($this->auth->checkAccess('user:limited', 'contact.force-verify')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
174 | $this->assertFalse($this->auth->checkAccess('user:limited', 'mailing.prepare')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
175 | $this->assertFalse($this->auth->checkAccess('user:limited', 'mailing.send')); |
||
0 ignored issues
–
show
It seems like
assertFalse() must be provided by classes using this trait. How about adding it as abstract method to this trait?
This check looks for methods that are used by a trait but not required by it. To illustrate, let’s look at the following code example trait Idable {
public function equalIds(Idable $other) {
return $this->getId() === $other->getId();
}
}
The trait Adding the ![]() |
|||
176 | } |
||
177 | } |
||
178 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: