| Total Complexity | 7 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | abstract class AttributeBuilderImpl implements AttributeBuilderInterface, ModelBuildOperationInterface |
||
| 14 | { |
||
| 15 | private $attribute; |
||
| 16 | private $modelType; |
||
| 17 | |||
| 18 | public function __construct(string $attributeName, ModelElementTypeImpl $modelType, AttributeImpl $attribute) |
||
| 19 | { |
||
| 20 | $this->modelType = $modelType; |
||
| 21 | $this->attribute = $attribute; |
||
| 22 | $this->attribute->setAttributeName($attributeName); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function namespace(string $namespaceUri): AttributeBuilderInterface |
||
| 29 | } |
||
| 30 | |||
| 31 | public function idAttribute(): AttributeBuilderInterface |
||
| 32 | { |
||
| 33 | $this->attribute->setId(); |
||
| 34 | return $this; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param mixed $defaultValue |
||
| 39 | */ |
||
| 40 | public function defaultValue($defaultValue): AttributeBuilderInterface |
||
| 41 | { |
||
| 42 | $this->attribute->setDefaultValue($defaultValue); |
||
| 43 | return $this; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function required(): AttributeBuilderInterface |
||
| 50 | } |
||
| 51 | |||
| 52 | public function build(): AttributeInterface |
||
| 56 | } |
||
| 57 | |||
| 58 | public function performModelBuild(ModelInterface $model): void |
||
| 60 | //do nothing |
||
| 61 | } |
||
| 63 |