Evaluate::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 4
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 4
b 0
f 0
nc 1
nop 0
dl 0
loc 12
ccs 0
cts 10
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Bonfim\Tpl\Tag;
4
5
class Evaluate extends Tag
6
{
7
    public function __construct()
8
    {
9
        self::match('/{{\s*--.*--\s*}}/', function () {
0 ignored issues
show
Bug Best Practice introduced by
The method Bonfim\Tpl\Tag\Tag::match() is not static, but was called statically. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

9
        self::/** @scrutinizer ignore-call */ 
10
              match('/{{\s*--.*--\s*}}/', function () {
Loading history...
10
            self::replace("");
0 ignored issues
show
Bug Best Practice introduced by
The method Bonfim\Tpl\Tag\Tag::replace() is not static, but was called statically. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

10
            self::/** @scrutinizer ignore-call */ 
11
                  replace("");
Loading history...
11
        });
12
13
        self::match('/([^@]){{(.*?)}}/', function ($scape, $cond) {
14
            self::replace("$scape<?= $cond ?>");
0 ignored issues
show
Bug Best Practice introduced by
The method Bonfim\Tpl\Tag\Tag::replace() is not static, but was called statically. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
            self::/** @scrutinizer ignore-call */ 
15
                  replace("$scape<?= $cond ?>");
Loading history...
15
        });
16
17
        self::match('/@{{/', function () {
18
            self::replace("{{");
0 ignored issues
show
Bug Best Practice introduced by
The method Bonfim\Tpl\Tag\Tag::replace() is not static, but was called statically. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
            self::/** @scrutinizer ignore-call */ 
19
                  replace("{{");
Loading history...
19
        });
20
    }
21
}
22