Total Complexity | 7 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class Role extends Model |
||
13 | { |
||
14 | use HasFactory; |
||
15 | use LogsActivity; |
||
16 | |||
17 | protected $guarded = []; |
||
18 | |||
19 | // Mutators |
||
20 | public function setNameAttribute($value) |
||
21 | { |
||
22 | $this->attributes['name'] = strtolower(str_replace(' ', '_', $value)); |
||
23 | } |
||
24 | |||
25 | // Relations |
||
26 | public function users() |
||
27 | { |
||
28 | return $this->belongsToMany(User::class)->withTimestamps(); |
||
29 | } |
||
30 | |||
31 | // Forget cache on updating or saving and deleting |
||
32 | public static function boot() |
||
42 | }); |
||
43 | } |
||
44 | |||
45 | // Cache Keys |
||
46 | private static function cacheKey() |
||
49 | } |
||
50 | |||
51 | // Logs |
||
52 | protected static $logName = 'role'; |
||
53 | |||
54 | public function getActivitylogOptions(): LogOptions |
||
55 | { |
||
56 | return LogOptions::defaults(); |
||
57 | } |
||
58 | |||
59 | // Relations |
||
60 | public function permissions() |
||
63 | } |
||
64 | } |
||
65 |
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