Passed
Push — main ( 09bb15...4e48df )
by Richard
05:57
created

HouseAd::stat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Furic\HouseAds\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class HouseAd extends Model
8
{
9
10
    protected $guarded = [];
11
12
    protected $hidden = ['image_portrait', 'image_landscape', 'confirmed_count', 'cancelled_count', 'created_at', 'updated_at'];
13
14
    protected $appends = ['url_image_portrait', 'url_image_landscape'];
15
16
    public function getUrlImagePortraitAttribute()
17
    {
18
        return public_path().'/images/'.$this->image_portrait;
19
    }
20
21
    public function getUrlImageLandscapeAttribute()
22
    {
23
        return public_path().'/images/'.$this->image_landscape;
24
    }
25
26
    public function stat()
27
    {
28
        return $this->hasOne(HouseAdsStat::class);
0 ignored issues
show
Bug introduced by
The type Furic\HouseAds\Models\HouseAdsStat was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
    }
30
31
}
32