Completed
Push — master ( 2ca6bd...4a9d6a )
by Дмитрий
02:52
created

Parameter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSymbolType() 0 4 1
A __construct() 0 6 1
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 1
    public function __construct($name, $defaultValue = null, $type = CompiledExpression::UNKNOWN, $referenced = false)
20
    {
21 1
        parent::__construct($name, $defaultValue, $type);
22
23 1
        $this->referenced = $referenced;
24 1
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getSymbolType()
30
    {
31
        return 'parameter';
32
    }
33
}
34