• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

conedevelopment / bazar / 20694116184

04 Jan 2026 02:08PM UTC coverage: 68.615% (+4.5%) from 64.117%
20694116184

push

github

iamgergo
version

1679 of 2447 relevant lines covered (68.61%)

25.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/Models/Property.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Cone\Bazar\Models;
6

7
use Cone\Bazar\Database\Factories\PropertyFactory;
8
use Cone\Bazar\Interfaces\Models\Property as Contract;
9
use Cone\Root\Traits\HasMedia;
10
use Cone\Root\Traits\InteractsWithProxy;
11
use Illuminate\Database\Eloquent\Factories\HasFactory;
12
use Illuminate\Database\Eloquent\Model;
13
use Illuminate\Database\Eloquent\Relations\HasMany;
14

15
class Property extends Model implements Contract
16
{
17
    use HasFactory;
18
    use HasMedia;
19
    use InteractsWithProxy;
20

21
    /**
22
     * The attributes that are mass assignable.
23
     *
24
     * @var list<string>
25
     */
26
    protected $fillable = [
27
        'name',
28
        'slug',
29
        'description',
30
    ];
31

32
    /**
33
     * The table associated with the model.
34
     *
35
     * @var string
36
     */
37
    protected $table = 'bazar_properties';
38

39
    /**
40
     * The "booted" method of the model.
41
     */
42
    protected static function booted(): void
23✔
43
    {
44
        static::deleting(static function (self $property): void {
23✔
45
            $property->values()->delete();
×
46
        });
23✔
47
    }
48

49
    /**
50
     * Get the proxied interface.
51
     */
52
    public static function getProxiedInterface(): string
1✔
53
    {
54
        return Contract::class;
1✔
55
    }
56

57
    /**
58
     * Create a new factory instance for the model.
59
     */
60
    protected static function newFactory(): PropertyFactory
23✔
61
    {
62
        return PropertyFactory::new();
23✔
63
    }
64

65
    /**
66
     * {@inheritdoc}
67
     */
68
    public function getMorphClass(): string
×
69
    {
70
        return static::getProxiedClass();
×
71
    }
72

73
    /**
74
     * Get the values for the property.
75
     */
76
    public function values(): HasMany
23✔
77
    {
78
        return $this->hasMany(PropertyValue::getProxiedClass());
23✔
79
    }
80
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc