| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class DefaultAttributeFactory implements AttributeFactory |
||
| 11 | { |
||
| 12 | /** @inheritDoc */ |
||
| 13 | 3 | public function create(array $data): Attribute |
|
| 14 | { |
||
| 15 | 3 | return new DefaultAttribute( |
|
| 16 | 3 | trim($data['name']), |
|
| 17 | 3 | $data['data_type'], |
|
| 18 | 3 | (string) $data['max_length'], |
|
| 19 | 3 | ); |
|
| 20 | } |
||
| 21 | |||
| 22 | /** @inheritDoc */ |
||
| 23 | 3 | public function createCollection(string $carrier, array $data): AttributeCollection |
|
| 28 | 3 | ); |
|
| 29 | } |
||
| 31 |