Completed
Push — master ( 68be21...073c54 )
by Kévin
02:41
created

EvalEvaluator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A evaluate() 0 4 1
1
<?php
2
3
namespace RulerZ\Compiler;
4
5
class EvalEvaluator implements Evaluator
6
{
7
    public function evaluate($ruleIdentifier, callable $compiler)
8
    {
9
        eval($compiler());
0 ignored issues
show
Coding Style introduced by
It is generally not recommended to use eval unless absolutely required.

On one hand, eval might be exploited by malicious users if they somehow manage to inject dynamic content. On the other hand, with the emergence of faster PHP runtimes like the HHVM, eval prevents some optimization that they perform.

Loading history...
10
    }
11
}
12