TestManyManyDataObject   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCMSFields() 0 5 1
1
<?php
2
3
namespace Bummzack\SortableFile\Tests\Model;
4
5
use Bummzack\SortableFile\Forms\SortableUploadField;
6
use SilverStripe\Assets\File;
7
use SilverStripe\Dev\TestOnly;
8
use SilverStripe\Forms\FieldList;
9
use SilverStripe\ORM\DataObject;
10
11
class TestManyManyDataObject extends DataObject implements TestOnly
12
{
13
    private static $many_many = [
0 ignored issues
show
introduced by
The private property $many_many is not used, and could be removed.
Loading history...
14
        'Files' => File::class,
15
        'OtherFiles' => File::class
16
    ];
17
18
    private static $many_many_extraFields = [
0 ignored issues
show
introduced by
The private property $many_many_extraFields is not used, and could be removed.
Loading history...
19
        'Files' => [ 'SortOrder' => 'Int' ],
20
        'OtherFiles' => [ 'Sort' => 'Int' ]
21
    ];
22
23
    private static $table_name = 'Bummzack_TestManyManyDataObject';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
24
25
    public function getCMSFields()
26
    {
27
        return FieldList::create(
28
            SortableUploadField::create('Files'),
29
            SortableUploadField::create('OtherFiles')->setSortColumn('Sort')
30
        );
31
    }
32
}
33