Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
23 | 2 | public function generateCode(): string |
|
24 | { |
||
25 | 2 | $code = $this->visibility; |
|
26 | |||
27 | 2 | if ($this->isStatic()) { |
|
28 | 1 | $code .= ' static'; |
|
29 | } |
||
30 | |||
31 | 2 | $code .= ' $' . $this->name; |
|
32 | |||
33 | 2 | if ($this->hasDefaultValue()) { |
|
34 | $code .= ' = ' . var_export($this->defaultValue, true); |
||
35 | } |
||
36 | |||
37 | 2 | return $code . ';'; |
|
38 | } |
||
39 | } |
||
40 |