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

JumpIf::getSubBlocks()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * @author Patsura Dmitry https://github.com/ovr <[email protected]>
4
 */
5
6
namespace PHPSA\ControlFlow\Node;
7
8
class JumpIf extends AbstractNode
9
{
10
    protected $if;
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $if. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
11
12
    protected $else;
13
14
    /**
15
     * @param mixed $if
16
     */
17
    public function setIf($if)
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $if. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
18
    {
19
        $this->if = $if;
20
    }
21
22
    /**
23
     * @param mixed $else
24
     */
25
    public function setElse($else)
26
    {
27
        $this->else = $else;
28
    }
29
30
    public function getSubBlocks()
31
    {
32
        return [
33
            'if' => $this->if,
34
            'else' => $this->else,
35
        ];
36
    }
37
}
38