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

Page   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A model() 0 3 1
A getService() 0 3 1
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