Passed
Push — feature/Logging ( 0ade54 )
by Simon
04:18
created

SolrLog   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 13
c 1
b 0
f 0
dl 0
loc 27
ccs 0
cts 4
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A canEdit() 0 3 1
A canCreate() 0 3 1
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Models;
5
6
7
use SilverStripe\ORM\DataObject;
8
9
/**
10
 * Class \Firesphere\SolrSearch\Models\SolrError
11
 *
12
 * @property string $Message
13
 * @property string $Index
14
 */
15
class SolrLog extends DataObject
16
{
17
18
    private static $table_name = 'SolrLog';
19
20
    private static $db = [
21
        'Message' => 'Text',
22
        'Index' => 'Varchar(255)',
23
        'Type' => 'Enum("Config,Index,Query")'
24
    ];
25
26
    private static $summary_fields = [
1 ignored issue
show
introduced by
The private property $summary_fields is not used, and could be removed.
Loading history...
27
        'Created',
28
        'Index',
29
        'Type'
30
    ];
31
32
    private static $sort = 'Created DESC';
1 ignored issue
show
introduced by
The private property $sort is not used, and could be removed.
Loading history...
33
34
    public function canCreate($member = null, $context = [])
35
    {
36
        return false;
37
    }
38
39
    public function canEdit($member = null)
40
    {
41
        return false;
42
    }
43
}
44