Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
15 | 11 | public function build(AbstractModel $model): void { |
|
16 | 11 | $type = $this->getType($model, $this->config->getGenerateScalarTypeHints(), $this->config->getGenerateNullableTypes()); |
|
17 | 11 | if ($type !== null) { |
|
18 | 4 | $this->writer->write($type . ' '); |
|
19 | } |
||
20 | |||
21 | 11 | if ($model->isPassedByReference()) { |
|
22 | 2 | $this->writer->write('&'); |
|
23 | } |
||
24 | |||
25 | 11 | $this->writer->write('$' . $model->getName()); |
|
26 | |||
27 | 11 | if ($model->hasValue()) { |
|
28 | 3 | $this->writer->write(' = '); |
|
29 | |||
30 | 3 | $this->writeValue($model); |
|
31 | } |
||
32 | 11 | } |
|
33 | |||
35 |