| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | public function makeAdmin($id, $is_super = false) |
||
| 12 | { |
||
| 13 | $user = $this->findUser($id); |
||
| 14 | |||
| 15 | if ($user->panelAdmin()->exists()){ |
||
| 16 | return [ |
||
| 17 | 'type' => 'error', |
||
| 18 | 'message' => 'User already is an admin!' |
||
| 19 | ]; |
||
| 20 | } |
||
| 21 | |||
| 22 | $user->panelAdmin()->create([ |
||
| 23 | 'is_superuser' => $is_super, |
||
| 24 | ]); |
||
| 25 | |||
| 26 | if($is_super) |
||
| 27 | $this->makeSuperAdminRole($user); |
||
| 28 | |||
| 29 | return [ |
||
| 30 | 'type' => 'success', |
||
| 31 | 'message' => "User '$id' was converted to an admin", |
||
| 32 | ]; |
||
| 75 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths