| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 14 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function run() |
||
| 22 | { |
||
| 23 | Permission::create(['name' => 'browse enrollments']); |
||
| 24 | Permission::create(['name' => 'read enrollments']); |
||
| 25 | Permission::create(['name' => 'edit enrollments']); |
||
| 26 | Permission::create(['name' => 'add enrollments']); |
||
| 27 | Permission::create(['name' => 'delete enrollments']); |
||
| 28 | $role = Role::create(['name' => 'manage enrollments']); |
||
| 29 | $role->givePermissionTo('browse enrollments'); |
||
| 30 | $role->givePermissionTo('read enrollments'); |
||
| 31 | $role->givePermissionTo('edit enrollments'); |
||
| 32 | $role->givePermissionTo('add enrollments'); |
||
| 33 | $role->givePermissionTo('delete enrollments'); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
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.