Code Duplication    Length = 18-18 lines in 2 locations

generated/src/xKerman_Restricted_ExpressionParser.php 1 location

@@ 24-41 (lines=18) @@
21
     * @return array
22
     * @throws UnserializeFailedException
23
     */
24
    public function parse(xKerman_Restricted_Source $source)
25
    {
26
        $matches = $source->match('/\\G(?|
27
            (s):([0-9]+):"
28
            |(i):([+-]?[0-9]+);
29
            |(a):([0-9]+):{
30
            |(d):((?:
31
                [+-]?(?:[0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)(?:[eE][+-]?[0-9]+)?)
32
                |-?INF
33
                |NAN);
34
            |(b):([01]);
35
            |(N);
36
            |(S):([0-9]+):"
37
        )/x');
38
        $tag = $matches[0];
39
        $args = isset($matches[1]) ? $matches[1] : null;
40
        return $this->handlers[$tag]->handle($source, $args);
41
    }
42
}

src/ExpressionParser.php 1 location

@@ 38-55 (lines=18) @@
35
     * @return array
36
     * @throws UnserializeFailedException
37
     */
38
    public function parse(Source $source)
39
    {
40
        $matches = $source->match('/\G(?|
41
            (s):([0-9]+):"
42
            |(i):([+-]?[0-9]+);
43
            |(a):([0-9]+):{
44
            |(d):((?:
45
                [+-]?(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+|[0-9]+)(?:[eE][+-]?[0-9]+)?)
46
                |-?INF
47
                |NAN);
48
            |(b):([01]);
49
            |(N);
50
            |(S):([0-9]+):"
51
        )/x');
52
        $tag = $matches[0];
53
        $args = isset($matches[1]) ? $matches[1] : null;
54
        return $this->handlers[$tag]->handle($source, $args);
55
    }
56
}
57