• 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

77.78
/src/Models/Setting.php
1
<?php
2

3
namespace Cone\Root\Models;
4

5
use Cone\Root\Database\Factories\SettingFactory;
6
use Cone\Root\Interfaces\Models\Setting as Contract;
7
use Cone\Root\Traits\InteractsWithProxy;
8
use Illuminate\Database\Eloquent\Factories\HasFactory;
9
use Illuminate\Database\Eloquent\Model;
10

11
class Setting extends Model implements Contract
12
{
13
    use HasFactory;
14
    use InteractsWithProxy;
15

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

26
    /**
27
     * The table associated with the model.
28
     *
29
     * @var string
30
     */
31
    protected $table = 'root_settings';
32

33
    /**
34
     * Get the proxied interface.
35
     */
36
    public static function getProxiedInterface(): string
1✔
37
    {
38
        return Contract::class;
1✔
39
    }
40

41
    /**
42
     * Create a new factory instance for the model.
43
     */
44
    protected static function newFactory(): SettingFactory
×
45
    {
46
        return SettingFactory::new();
×
47
    }
48

49
    /**
50
     * Cast the value attribute to the given type.
51
     */
52
    public function castValue(?string $type = null): static
3✔
53
    {
54
        if (! is_null($type)) {
3✔
55
            $this->casts['value'] = $type;
1✔
56
        } else {
57
            unset($this->casts['value']);
2✔
58
        }
59

60
        return $this;
3✔
61
    }
62
}
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