Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function makeAdmin($id, $is_super = false) |
||
11 | { |
||
12 | $user = $this->findUser($id); |
||
13 | |||
14 | if ($user->panelAdmin()->exists()){ |
||
15 | return [ |
||
16 | 'type' => 'error', |
||
17 | 'message' => 'User already is an admin!' |
||
18 | ]; |
||
19 | } |
||
20 | |||
21 | $user->panelAdmin()->create([ |
||
22 | 'is_superuser' => $is_super, |
||
23 | ]); |
||
24 | |||
25 | return [ |
||
26 | 'type' => 'success', |
||
27 | 'message' => "User '$id' was converted to an admin", |
||
28 | ]; |
||
54 |
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