TestCollectionObject::getSortOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
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