Conditions | 6 |
Paths | 16 |
Total Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
14 | 12 | public function build(AbstractModel $model): void { |
|
15 | 12 | $this->buildDocblock($model); |
|
16 | |||
17 | 12 | if ($model->isFinal()) { |
|
18 | 1 | $this->writer->write('final '); |
|
19 | } |
||
20 | |||
21 | 12 | if ($model->isAbstract()) { |
|
22 | 2 | $this->writer->write('abstract '); |
|
23 | } |
||
24 | |||
25 | 12 | $this->writer->write($model->getVisibility() . ' '); |
|
26 | |||
27 | 12 | if ($model->isStatic()) { |
|
28 | 2 | $this->writer->write('static '); |
|
29 | } |
||
30 | |||
31 | 12 | $this->writeFunctionStatement($model); |
|
32 | |||
33 | 12 | if ($model->isAbstract() || $model->getParent() instanceof PhpInterface) { |
|
34 | 2 | $this->writer->writeln(';'); |
|
35 | |||
36 | 2 | return; |
|
37 | } |
||
38 | |||
39 | 11 | $this->writeBody($model); |
|
40 | 11 | } |
|
41 | |||
43 |