TestCollectionObject   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSortOptions() 0 6 1
1
<?php
2
3
namespace Dynamic\Collection\Test\TestOnly;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\ORM\DataObject;
7
8
class TestCollectionObject extends DataObject implements TestOnly
9
{
10
    /**
11
     * @var array
12
     */
13
    private static $db = [
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
14
        'Title' => 'Varchar(255)',
15
    ];
16
17
    /**
18
     * @return array
19
     */
20
    public function getSortOptions()
21
    {
22
        return array(
23
            'Created' => 'Date',
24
            'Title' => 'Name A-Z',
25
            'Title DESC' => 'Name Z-A',
26
        );
27
    }
28
}
29