Passed
Pull Request — master (#774)
by
unknown
05:46
created

TestContent::getType()   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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace DNADesign\Elemental\Tests\TopPage;
4
5
use DNADesign\Elemental\Models\BaseElement;
6
use SilverStripe\Dev\TestOnly;
7
8
/**
9
 * Class TestContent
10
 *
11
 * @property int $ChildPageID
12
 * @method TestChildPage ChildPage()
13
 * @package DNADesign\Elemental\Tests\TopPage
14
 */
15
class TestContent extends BaseElement implements TestOnly
16
{
17
    /**
18
     * @var string
19
     */
20
    private static $table_name = 'TestContent';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
21
22
    /**
23
     * @var array
24
     */
25
    private static $db = [
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
26
        'Content' => 'Varchar',
27
    ];
28
29
    private static $has_one = [
0 ignored issues
show
introduced by
The private property $has_one is not used, and could be removed.
Loading history...
30
        'ChildPage' => TestChildPage::class,
31
    ];
32
33
    private static $cascade_duplicates = [
0 ignored issues
show
introduced by
The private property $cascade_duplicates is not used, and could be removed.
Loading history...
34
        'ChildPage',
35
    ];
36
37
    private static $cascade_deletes = [
0 ignored issues
show
introduced by
The private property $cascade_deletes is not used, and could be removed.
Loading history...
38
        'ChildPage',
39
    ];
40
41
    public function getType(): string
42
    {
43
        return 'Test element with content';
44
    }
45
}
46