Passed
Push — 4 ( 02c973...b5c3b6 )
by Steve
06:49 queued 12s
created

Team_Extension::augmentHydrateFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace SilverStripe\ORM\Tests\DataObjectTest;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\ORM\DataExtension;
7
8
class Team_Extension extends DataExtension implements TestOnly
9
{
10
    private static $summary_fields = [
0 ignored issues
show
introduced by
The private property $summary_fields is not used, and could be removed.
Loading history...
11
        'Title' => 'Custom Title', // override non-associative 'Title'
12
    ];
13
14
    private static $db = [
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
15
        'ExtendedDatabaseField' => 'Varchar'
16
    ];
17
18
    private static $has_one = [
0 ignored issues
show
introduced by
The private property $has_one is not used, and could be removed.
Loading history...
19
        'ExtendedHasOneRelationship' => Player::class
20
    ];
21
22
    public function getExtendedDynamicField()
23
    {
24
        return "extended dynamic field";
25
    }
26
27
    public function augmentHydrateFields()
28
    {
29
        return [
30
            'CustomHydratedField' => true,
31
        ];
32
    }
33
}
34