Completed
Push — master ( 7c9586...c8ce39 )
by Oscar
01:44
created

Decimal::format()   A

Complexity

Conditions 2
Paths 2

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 2
nc 2
nop 1
1
<?php
2
3
namespace SimpleCrud\Fields;
4
5
final class Decimal extends Field
6
{
7
    public function format($number): ?float
8
    {
9
        return strlen($number) ? (float) $number : null;
10
    }
11
}
12