Completed
Push — develop ( aae47e...e01b9a )
by Tino
08:22
created

DoubleColumnType::doUnescape()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Copyright (c) by the ACP3 Developers.
5
 * See the LICENSE file at the top-level module directory for licensing details.
6
 */
7
8
namespace ACP3\Core\Model\DataProcessor\ColumnType;
9
10
class DoubleColumnType implements ColumnTypeStrategyInterface
11
{
12
    /**
13
     * @param mixed $value
14
     *
15
     * @return float
16
     */
17
    public function doEscape($value)
18
    {
19
        return (float) $value;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function doUnescape($value)
26
    {
27
        return $value;
28
    }
29
30
    /**
31
     * @return string|int
32
     */
33
    public function getDefaultValue()
34
    {
35
        return 0;
36
    }
37
}
38