EvalBlock::run()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
crap 2
1
<?php
2
namespace Desmond\functions\special;
3
use Desmond\functions\DesmondSpecialFunction;
4
use Desmond\data_types\NilType;
5
6
class EvalBlock extends DesmondSpecialFunction
7
{
8 4
    public function run(array $args)
9
    {
10 4
        if (empty($args)) {
11 1
            return new NilType();
12
        }
13 3
        $return = $this->eval->getReturn($args[0]);
14 3
        return $this->eval->getReturn($return);
15
    }
16
}
17