 hiqdev    /
                    hipanel-rbac
                      hiqdev    /
                    hipanel-rbac
                
                            | Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 8 | 
| Code Lines | 4 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| Metric | Value | 
|---|---|
| c | 0 | 
| b | 0 | 
| f | 0 | 
| dl | 0 | 
| loc | 8 | 
| rs | 9.4285 | 
| cc | 3 | 
| eloc | 4 | 
| nc | 3 | 
| nop | 0 | 
| 1 | <?php | ||
| 2 | |||
| 3 | /* | ||
| 4 | * RBAC implementation for HiPanel | ||
| 5 | * | ||
| 6 | * @link https://github.com/hiqdev/hipanel-rbac | ||
| 7 | * @package hipanel-rbac | ||
| 8 | * @license BSD-3-Clause | ||
| 9 | * @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/) | ||
| 10 | */ | ||
| 11 | |||
| 12 | namespace hipanel\rbac\tests\unit; | ||
| 13 | |||
| 14 | trait CheckAccessTrait | ||
| 15 | { | ||
| 16 | public function setAssignments() | ||
| 17 |     { | ||
| 18 |         foreach ($this->auth->getAllItems() as $item) { | ||
| 19 | $this->auth->setAssignment($item->name, $item->name); | ||
| 0 ignored issues–
                            show | |||
| 20 | } | ||
| 21 | } | ||
| 22 | |||
| 23 | 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.  Loading history... | |||
| 24 |     { | ||
| 25 |         $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   Loading history... | |||
| 26 |         $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   Loading history... | |||
| 27 |         $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   Loading history... | |||
| 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   Loading history... | |||
| 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   Loading history... | |||
| 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   Loading history... | |||
| 32 |         $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   Loading history... | |||
| 33 |         $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   Loading history... | |||
| 34 |         $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   Loading history... | |||
| 35 |         $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   Loading history... | |||
| 36 |         $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   Loading history... | |||
| 37 |         $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   Loading history... | |||
| 38 |         $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   Loading history... | |||
| 39 |         $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   Loading history... | |||
| 40 |         $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   Loading history... | |||
| 41 | } | ||
| 42 | |||
| 43 | 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.  Loading history... | |||
| 44 |     { | ||
| 45 |         $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   Loading history... | |||
| 46 | |||
| 47 |         $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   Loading history... | |||
| 48 |         $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   Loading history... | |||
| 49 |         $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   Loading history... | |||
| 50 |         $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   Loading history... | |||
| 51 |         $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   Loading history... | |||
| 52 |         $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   Loading history... | |||
| 53 |         $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   Loading history... | |||
| 54 |         $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   Loading history... | |||
| 55 |         $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   Loading history... | |||
| 56 |         $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   Loading history... | |||
| 57 |         $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   Loading history... | |||
| 58 |         $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   Loading history... | |||
| 59 |         $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   Loading history... | |||
| 60 |         $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   Loading history... | |||
| 61 | } | ||
| 62 | |||
| 63 | View Code Duplication | public function testManager() | |
| 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.  Loading history... | |||
| 64 |     { | ||
| 65 |         $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   Loading history... | |||
| 66 |         $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   Loading history... | |||
| 67 |         $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   Loading history... | |||
| 68 |         $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   Loading history... | |||
| 69 |         $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   Loading history... | |||
| 70 |         $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   Loading history... | |||
| 71 |         $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   Loading history... | |||
| 72 |         $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   Loading history... | |||
| 73 | |||
| 74 |         $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   Loading history... | |||
| 75 |         $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   Loading history... | |||
| 76 |         $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   Loading history... | |||
| 77 |         $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   Loading history... | |||
| 78 |         $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   Loading history... | |||
| 79 |         $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   Loading history... | |||
| 80 |         $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   Loading history... | |||
| 81 |         $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   Loading history... | |||
| 82 |         $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   Loading history... | |||
| 83 |         $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   Loading history... | |||
| 84 | } | ||
| 85 | |||
| 86 | public function testPermission() | ||
| 87 |     { | ||
| 88 |         foreach ($this->auth->getPermissions() as $user) { | ||
| 89 |             foreach ($this->auth->getPermissions() as $perm) { | ||
| 90 | $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   Loading history... | |||
| 91 | } | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | View Code Duplication | public function testMighty() | |
| 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.  Loading history... | |||
| 96 |     { | ||
| 97 |         $this->auth->setAssignments('role:admin,role:manager,bill.create,domain.freeze', 'user:mighty'); | ||
| 98 | |||
| 99 |         $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   Loading history... | |||
| 100 |         $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   Loading history... | |||
| 101 |         $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   Loading history... | |||
| 102 |         $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   Loading history... | |||
| 103 |         $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   Loading history... | |||
| 104 |         $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   Loading history... | |||
| 105 |         $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   Loading history... | |||
| 106 |         $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   Loading history... | |||
| 107 |         $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   Loading history... | |||
| 108 |         $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   Loading history... | |||
| 109 |         $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   Loading history... | |||
| 110 | |||
| 111 |         $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   Loading history... | |||
| 112 |         $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   Loading history... | |||
| 113 |         $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   Loading history... | |||
| 114 |         $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   Loading history... | |||
| 115 |         $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   Loading history... | |||
| 116 |         $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   Loading history... | |||
| 117 |         $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   Loading history... | |||
| 118 | } | ||
| 119 | } | ||
| 120 | 
 
                                
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: