Completed
Push — master ( fef923...c0df34 )
by Rafael
03:03
created

FloatParserTest::buildParser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * LICENSE: This file is subject to the terms and conditions defined in
5
 * file 'LICENSE', which is part of this source code package.
6
 *
7
 * @copyright 2016 Copyright(c) - All rights reserved.
8
 */
9
10
namespace Rafrsr\LibArray2Object\Tests\Parser;
11
12
use Rafrsr\LibArray2Object\Parser\FloatParser;
13
use Rafrsr\LibArray2Object\Parser\IntegerParser;
14
15
class FloatParserTest extends ParserTester
16
{
17
    public function buildParser()
18
    {
19
        return new FloatParser();
20
    }
21
22
    public function getTypes()
23
    {
24
        return ['float', 'double'];
25
    }
26
27
    public function getParseValueMap()
28
    {
29
        return [
30
            '1' => 1,
31
            '12 apples' => 12,
32
            '12.2' => 12.2
33
        ];
34
    }
35
}
36