Passed
Push — main ( 0b6967...cc8184 )
by Dylan
02:05
created

Page::model()   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
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Lifeboat\Models;
4
5
use Lifeboat\Interfaces\CustomFieldSupport;
6
use Lifeboat\Services\Pages;
7
8
/**
9
 * Class Page
10
 * @package Lifeboat\Models
11
 *
12
 * @property string $Title
13
 * @property string $URLSegment
14
 * @property string $Path
15
 * @property string $FullURL
16
 * @property string|null $MetaTitle
17
 * @property string|null $MetaDescription
18
 * @property string|null $ExtraMeta
19
 * @property bool $ExcludeFromSiteMap
20
 * @property array $CustomFields
21
 */
22
class Page extends Model implements CustomFieldSupport {
23
24
    protected static array $casting = [
25
        'ExcludeFromSiteMap' => 'boolval'
26
    ];
27
28
    /**
29
     * @return string
30
     */
31
    public function model(): string
32
    {
33
        return 'Page';
34
    }
35
36
    /**
37
     * @return Pages
38
     */
39
    public function getService(): Pages
40
    {
41
        return new Pages($this->getClient());
42
    }
43
}
44