| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 16 | public static function make($name, $email, $password) |
||
| 17 | { |
||
| 18 | $user = User::firstOrCreate([ |
||
| 19 | 'email' => trim($email), |
||
| 20 | ], [ |
||
| 21 | 'name' => trim($name), |
||
| 22 | 'password' => bcrypt($password), |
||
| 23 | ]); |
||
| 24 | |||
| 25 | $role = Role::where('name', 'superadmin')->exists() |
||
| 26 | ? Role::where('name', 'superadmin')->first() |
||
| 27 | : $role = Role::create([ |
||
| 28 | 'name' => 'superadmin', |
||
| 29 | 'description' => 'This is super admin. This role has authority over everything in this application.', |
||
| 30 | 'level' => 6, |
||
| 31 | ]); |
||
| 32 | $user->roles()->attach($role); |
||
| 33 | $user->profile()->create(); |
||
| 34 | } |
||
| 36 |
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