DoBlock   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 15
c 0
b 0
f 0
ccs 8
cts 8
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 12 3
1
<?php
2
namespace Desmond\functions\special;
3
use Desmond\functions\DesmondSpecialFunction;
4
use Desmond\data_types\NilType;
5
6
class DoBlock extends DesmondSpecialFunction
7
{
8 45
    public function run(array $args)
9
    {
10 45
        if (empty($args)) {
11 1
            return new NilType();
12
        }
13 44
        $last = end($args);
14 44
        array_pop($args);
15 44
        foreach($args as $arg) {
16 40
            $this->eval->getReturn($arg);
17
        }
18 44
        return $this->eval->getReturn($last);
19
    }
20
}
21