Completed
Pull Request — master (#5)
by Jason
02:53
created

TestCollectionObject   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSortOptions() 0 8 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 = [
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
}