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

conedevelopment / root / 18585608047

17 Oct 2025 07:22AM UTC coverage: 76.113% (+0.1%) from 75.974%
18585608047

push

github

iamgergo
wip

3384 of 4446 relevant lines covered (76.11%)

34.08 hits per line

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

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

3
declare(strict_types=1);
4

5
namespace Cone\Root\Models;
6

7
use Cone\Root\Casts\MetaValue;
8
use Cone\Root\Database\Factories\MetaFactory;
9
use Cone\Root\Interfaces\Models\Meta as Contract;
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\MorphTo;
14

15
class Meta extends Model implements Contract
16
{
17
    use HasFactory;
18
    use InteractsWithProxy;
19

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

30
    /**
31
     * The table associated with the model.
32
     *
33
     * @var string
34
     */
35
    protected $table = 'root_meta_data';
36

37
    /**
38
     * Get the proxied interface.
39
     */
40
    public static function getProxiedInterface(): string
1✔
41
    {
42
        return Contract::class;
1✔
43
    }
44

45
    /**
46
     * Create a new factory instance for the model.
47
     */
48
    protected static function newFactory(): MetaFactory
2✔
49
    {
50
        return MetaFactory::new();
2✔
51
    }
52

53
    /**
54
     * Get the attributes that should be cast.
55
     *
56
     * @return array{'value':'\Cone\Root\Casts\MetaValue'}
57
     */
58
    protected function casts(): array
5✔
59
    {
60
        return [
5✔
61
            'value' => MetaValue::class,
5✔
62
        ];
5✔
63
    }
64

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

73
    /**
74
     * Get the metable model.
75
     */
76
    public function metable(): MorphTo
1✔
77
    {
78
        return $this->morphTo();
1✔
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

© 2025 Coveralls, Inc