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

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Dynamic\Elements\Flexslider\ORM;
4
5
use Dynamic\Elements\Flexslider\Elements\ElementSlideshow;
6
use SilverStripe\Forms\FieldList;
7
use SilverStripe\ORM\DataExtension;
8
9
class ElementSlideshowSlideDataExtension extends DataExtension
10
{
11
    /**
12
     * @var array
13
     */
14
    private static $has_one = array(
0 ignored issues
show
introduced by
The private property $has_one is not used, and could be removed.
Loading history...
15
        'SlideshowElement' => ElementSlideshow::class,
16
    );
17
18
    /**
19
     * @param FieldList $fields
20
     */
21 1
    public function updateCMSFields(FieldList $fields)
22
    {
23 1
        $fields->removeByName(array(
24 1
            'SlideshowElementID',
25
        ));
26
    }
27
}
28