| Total Complexity | 1 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | class Asset extends Model |
||
| 24 | { |
||
| 25 | use Localable; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * {@inheritdoc} |
||
| 29 | */ |
||
| 30 | protected $table = 'assets'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | protected $fillable = [ |
||
| 36 | 'contentful_id', |
||
| 37 | 'locale', |
||
| 38 | 'country', |
||
| 39 | 'title', |
||
| 40 | 'description', |
||
| 41 | 'url', |
||
| 42 | 'file_name', |
||
| 43 | 'content_type', |
||
| 44 | 'size', |
||
| 45 | 'width', |
||
| 46 | 'height', |
||
| 47 | ]; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritdoc} |
||
| 51 | */ |
||
| 52 | protected $casts = [ |
||
| 53 | 'size' => 'integer', |
||
| 54 | 'width' => 'integer', |
||
| 55 | 'height' => 'integer', |
||
| 56 | ]; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Return asset URL. |
||
| 60 | * |
||
| 61 | * @return string|null |
||
| 62 | */ |
||
| 63 | public function getUrl(): ?string |
||
| 68 |