FixPointNumberRouterType::parserRegExp()   A
last analyzed

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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Mezon\Router\Types;
3
4
/**
5
 * Fix point number type for router
6
 *
7
 * @author gdever
8
 */
9
class FixPointNumberRouterType
10
{
11
12
    /**
13
     * Method returns regexp for searching
14
     *
15
     * @return string regexp for searching
16
     */
17
    public static function searchRegExp(): string
18
    {
19
        return '(\[fp:'.BaseType::PARAMETER_NAME_REGEXP.'+\])';
20
    }
21
22
    /**
23
     * Method returns regexp for parsing
24
     *
25
     * @return string regexp for parsing
26
     */
27
    public static function parserRegExp(): string
28
    {
29
        return '[-+]{0,1}[0-9]+.[0-9]+';
30
    }
31
}
32