| Conditions | 5 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 30 | public static function render($t,$v=null){ |
||
| 31 | if (empty($v)) return preg_replace('/{{[^}]+}}/','',$t); |
||
| 32 | for( // Init |
||
| 33 | $r = $ox = $x = false; |
||
| 34 | // While |
||
| 35 | false !== ($x = $y = strpos($t,'{{',$x)); |
||
| 36 | // Do |
||
| 37 | $r .= substr($t, $ox, $x-$ox), |
||
| 38 | $c = substr($t, $x += 2, $l = ( $y = strpos($t,'}}', $x) ) - $x), |
||
| 39 | $ox = $x += $l + 2, |
||
| 40 | $r .= Object::fetch(trim($c),$v)?:'' |
||
| 41 | ); |
||
| 42 | return $r===false ? $t : $r.substr($t,$ox); |
||
| 43 | } |
||
| 44 | |||
| 46 |
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.