| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 5 |
| Lines | 18 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | View Code Duplication | 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 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.