Passed
Push — bufferfix ( 3c155e...496672 )
by Simon
08:00
created

SearchSynonym   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCMSFields() 0 7 1
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Models;
5
6
use SilverStripe\Forms\FieldList;
7
use SilverStripe\Forms\TextareaField;
8
use SilverStripe\ORM\DataObject;
9
10
class SearchSynonym extends DataObject
11
{
12
    private static $table_name = 'SearchSynonym';
13
14
    private static $singular_name = 'Search synonym';
1 ignored issue
show
introduced by
The private property $singular_name is not used, and could be removed.
Loading history...
15
16
    private static $plural_name = 'Search synonyms';
1 ignored issue
show
introduced by
The private property $plural_name is not used, and could be removed.
Loading history...
17
18
    private static $db = [
19
        'Keyword' => 'Varchar(255)',
20
        'Synonym' => 'Text'
21
    ];
22
23
    private static $summary_fields = [
1 ignored issue
show
introduced by
The private property $summary_fields is not used, and could be removed.
Loading history...
24
        'Keyword',
25
        'Synonym'
26
    ];
27
28
    public function getCMSFields()
29
    {
30
        $fields = parent::getCMSFields();
31
32
        $fields->dataFieldByName('Synonym')->setDescription(_t(__CLASS__ . '.SYNONYM', 'Create synonyms for a given keyword, add as many synonyms comma separated.'));
33
34
        return $fields;
35
    }
36
}
37