Completed
Push — master ( 8bad52...c13fe7 )
by Дмитрий
03:41
created

Parameter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 4
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
1
<?php
2
/**
3
 * @author Patsura Dmitry https://github.com/ovr <[email protected]>
4
 */
5
6
namespace PHPSA\Compiler;
7
8
use PHPSA\CompiledExpression;
9
use PHPSA\Variable;
10
11
class Parameter extends Variable
12
{
13
    /**
14
     * @param string $name
15
     * @param null $defaultValue
16
     * @param int $type
17
     * @param bool|false $referenced
18
     */
19 7
    public function __construct($name, $defaultValue = null, $type = CompiledExpression::UNKNOWN, $referenced = false)
20
    {
21 7
        parent::__construct($name, $defaultValue, $type);
22
23 7
        $this->referenced = $referenced;
24 7
    }
25
26
    /**
27
     * @return string
28
     */
29 1
    public function getSymbolType()
30
    {
31 1
        return 'parameter';
32
    }
33
}
34