ConstantBuilder::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace gossi\codegen\generator\builder;
5
6
use gossi\codegen\generator\builder\parts\ValueBuilderPart;
7
use gossi\codegen\model\AbstractModel;
8
9
class ConstantBuilder extends AbstractBuilder {
10
11
	use ValueBuilderPart;
12
13 3
	public function build(AbstractModel $model): void {
14 3
		$this->buildDocblock($model);
15 3
		$this->writer->write('const ' . $model->getName() . ' = ');
16 3
		$this->writeValue($model);
17 3
		$this->writer->writeln(';');
18 3
	}
19
20
}
21