Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
38 | 109 | public function parse(Source $source) |
|
39 | { |
||
40 | 109 | $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 | 51 | $tag = $matches[0]; |
|
53 | 51 | $args = isset($matches[1]) ? $matches[1] : null; |
|
54 | 51 | return $this->handlers[$tag]->handle($source, $args); |
|
55 | } |
||
57 |