Completed
Push — master ( 069124...27e495 )
by Edson
02:00
created

Statement   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 9
ccs 2
cts 3
cp 0.6667
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace Sketch\Tpl\Tag;
4
5
class Statement extends Tag
6
{
7 2
    public function __construct()
8
    {
9 2
        $search = "/{(\s?)+([\$\w]+)(\s?)+([<>!=\+\-\*\/]+)(\s?)+(.*?)(\s?)+}/is";
10
11
        Tag::match($search, function($left, $op, $right) {
12
13
            Tag::replace("<?php $$left $op $right ?>");
14 2
        });
15 2
    }
16
}
17