Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class PhpFunctionParameter extends PhpVariable implements TypeHintedElementInterface |
||
8 | { |
||
9 | use TypeHintedElementTrait; |
||
10 | |||
11 | 76 | public function __construct(string $name, $value = null, $type = null) |
|
12 | { |
||
13 | 76 | parent::__construct($name, $value); |
|
14 | 76 | $this->setType($type); |
|
15 | 76 | } |
|
16 | |||
17 | 70 | public function getPhpDeclaration(): string |
|
18 | { |
||
19 | 70 | return sprintf('%s%s', $this->getPhpType(), parent::getPhpDeclaration()); |
|
20 | } |
||
21 | |||
22 | 70 | public function endsWithSemicolon(): bool |
|
23 | { |
||
24 | 70 | return false; |
|
25 | } |
||
26 | |||
27 | 46 | protected function getAnyValue($value): string |
|
34 | } |
||
35 | } |
||
36 |