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

conedevelopment / root / 15084089635

17 May 2025 10:00AM UTC coverage: 77.93% (+0.04%) from 77.891%
15084089635

push

github

web-flow
Modernize back-end.yml (#240)

3291 of 4223 relevant lines covered (77.93%)

36.04 hits per line

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

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

3
namespace Cone\Root\Models;
4

5
use Cone\Root\Casts\MetaValue;
6
use Cone\Root\Database\Factories\MetaFactory;
7
use Cone\Root\Interfaces\Models\Meta as Contract;
8
use Cone\Root\Traits\InteractsWithProxy;
9
use Illuminate\Database\Eloquent\Factories\HasFactory;
10
use Illuminate\Database\Eloquent\Model;
11
use Illuminate\Database\Eloquent\Relations\MorphTo;
12

13
class Meta extends Model implements Contract
14
{
15
    use HasFactory;
16
    use InteractsWithProxy;
17

18
    /**
19
     * The attributes that should be cast to native types.
20
     *
21
     * @var array<string, string>
22
     */
23
    protected $casts = [
24
        'value' => MetaValue::class,
25
    ];
26

27
    /**
28
     * The attributes that are mass assignable.
29
     *
30
     * @var list<string>
31
     */
32
    protected $fillable = [
33
        'key',
34
        'value',
35
    ];
36

37
    /**
38
     * The table associated with the model.
39
     *
40
     * @var string
41
     */
42
    protected $table = 'root_meta_data';
43

44
    /**
45
     * Get the proxied interface.
46
     */
47
    public static function getProxiedInterface(): string
1✔
48
    {
49
        return Contract::class;
1✔
50
    }
51

52
    /**
53
     * Create a new factory instance for the model.
54
     */
55
    protected static function newFactory(): MetaFactory
2✔
56
    {
57
        return MetaFactory::new();
2✔
58
    }
59

60
    /**
61
     * {@inheritdoc}
62
     */
63
    public function getMorphClass(): string
×
64
    {
65
        return static::getProxiedClass();
×
66
    }
67

68
    /**
69
     * Get the metable model.
70
     */
71
    public function metable(): MorphTo
1✔
72
    {
73
        return $this->morphTo();
1✔
74
    }
75
}
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

© 2025 Coveralls, Inc