Completed
Pull Request — master (#229)
by Enrico
06:28
created

ElseIfSt   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 17
ccs 6
cts 6
cp 1
rs 10
c 1
b 0
f 0
wmc 2
lcom 0
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A compile() 0 8 2
1
<?php
2
3
namespace PHPSA\Compiler\Statement;
4
5
use PHPSA\Context;
6
7
class ElseIfSt extends AbstractCompiler
8
{
9
    protected $name = '\PhpParser\Node\Stmt\ElseIf_';
10
11
    /**
12
     * @param \PhpParser\Node\Stmt\ElseIf_ $elseIfStatement
13
     * @param Context $context
14
     */
15 4
    public function compile($elseIfStatement, Context $context)
16
    {
17 4
        $context->getExpressionCompiler()->compile($elseIfStatement->cond);
18
19 4
        foreach ($elseIfStatement->stmts as $stmt) {
20 4
            \PHPSA\nodeVisitorFactory($stmt, $context);
21 4
        }
22 4
    }
23
}
24