SegmentFieldTestModifier::getPreview()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace SilverStripe\Forms\Tests;
4
5
use SilverStripe\Forms\SegmentFieldModifier\AbstractSegmentFieldModifier;
6
7
class SegmentFieldTestModifier extends AbstractSegmentFieldModifier
8
{
9
    /**
10
     * @inheritdoc
11
     *
12
     * @param string $value
13
     *
14
     * @return string
15
     */
16
    public function getSuggestion($value)
17
    {
18
        return strtoupper($value);
19
    }
20
21
    /**
22
     * @inheritdoc
23
     *
24
     * @param string $value
25
     *
26
     * @return string
27
     */
28
    public function getPreview($value)
29
    {
30
        return strtolower($value);
31
    }
32
}
33