OSMPointOfInterestExtension::updateCMSFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
class OSMPointOfInterestExtension extends DataExtension
4
{
5
    private static $db = array(
6
        // No Big Int support yet so use big decimal
7
        'OpenStreetMapID' => 'Decimal(20,0)',
8
    );
9
10
    // given millions of possible POIs an index is handy
11
    private static $indexes = array(
0 ignored issues
show
Unused Code introduced by
The property $indexes is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
12
        'OpenStreetMapID' => true,
13
   );
0 ignored issues
show
Coding Style introduced by
It seems like the identation of this line is off (expected at least 4 spaces, but found 3).
Loading history...
14
15
    /* The openstreetmap id is only for scripting purposes */
16 1
    public function updateCMSFields(FieldList $fields)
17
    {
18 1
        $fields->removeByName('OpenStreetMapID');
19 1
    }
20
}
21