Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
19 | 6 | public function run($command) |
|
20 | { |
||
21 | 6 | if (empty($command)) { |
|
22 | 1 | return ''; |
|
23 | } |
||
24 | try { |
||
25 | 5 | $ast = $this->lexer->readString($command); |
|
26 | 4 | $value = $this->eval->getReturn($ast); |
|
27 | 1 | } catch (\Exception $exception) { |
|
28 | 1 | return $exception->getMessage(); |
|
29 | } |
||
30 | 4 | return $value; |
|
31 | } |
||
32 | |||
43 |