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