Completed
Pull Request — master (#335)
by Дмитрий
02:26
created

ThrowSt::compile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @author Patsura Dmitry https://github.com/ovr <[email protected]>
4
 */
5
6
namespace PHPSA\Compiler\Statement;
7
8
use PHPSA\CompiledExpression;
9
use PHPSA\Context;
10
11
class ThrowSt extends AbstractCompiler
12
{
13
    protected $name = \PhpParser\Node\Stmt\Throw_::class;
14
15
    /**
16
     * @param \PhpParser\Node\Stmt\Throw_ $stmt
17
     * @param Context $context
18
     * @return CompiledExpression
19
     */
20
    public function compile($stmt, Context $context)
21
    {
22
        $context->getExpressionCompiler()->compile($stmt->expr);
23
    }
24
}
25