| Total Complexity | 9 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class About extends Model implements HasMedia |
||
| 13 | { |
||
| 14 | use LogsActivity, InteractsWithMedia; |
||
| 15 | |||
| 16 | protected $guarded = []; |
||
| 17 | |||
| 18 | // Forget cache on updating or saving and deleting |
||
| 19 | public static function boot() |
||
| 20 | { |
||
| 21 | parent::boot(); |
||
| 22 | |||
| 23 | static::saving(function () { |
||
| 24 | self::cacheKey(); |
||
| 25 | }); |
||
| 26 | |||
| 27 | static::deleting(function () { |
||
| 28 | self::cacheKey(); |
||
| 29 | }); |
||
| 30 | } |
||
| 31 | |||
| 32 | // Cache Keys |
||
| 33 | private static function cacheKey() |
||
| 34 | { |
||
| 35 | Cache::has('abouts') ? Cache::forget('abouts') : ''; |
||
| 36 | } |
||
| 37 | |||
| 38 | // Logs |
||
| 39 | protected static $logName = 'about'; |
||
| 40 | |||
| 41 | public function getActivitylogOptions(): LogOptions |
||
| 42 | { |
||
| 43 | return LogOptions::defaults(); |
||
| 44 | } |
||
| 45 | |||
| 46 | // Accessors |
||
| 47 | public function getImageAttribute() |
||
| 48 | { |
||
| 49 | return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/placeholder.jpg'); |
||
| 50 | } |
||
| 51 | |||
| 52 | public function getIconImageAttribute() |
||
| 53 | { |
||
| 54 | return ! is_null($this->getFirstMedia('icon_image')) ? $this->getFirstMediaUrl('icon_image') : asset('adminetic/static/placeholder.jpg'); |
||
| 55 | } |
||
| 56 | |||
| 57 | public function scopeActive($qry) |
||
| 60 | } |
||
| 61 | } |
||
| 62 |
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