| Total Complexity | 5 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class TableValueFactory extends ScalarValueFactory |
||
| 12 | { |
||
| 13 | public function createByCheckingData( |
||
| 14 | Attribute $attribute, |
||
| 15 | ?string $channelCode, |
||
| 16 | ?string $localeCode, |
||
| 17 | $data |
||
| 18 | ): ValueInterface { |
||
| 19 | if (!is_scalar($data) || (is_string($data) && '' === trim($data))) { |
||
| 20 | throw InvalidPropertyTypeException::stringExpected( |
||
| 21 | $attribute->code(), |
||
| 22 | static::class, |
||
| 23 | $data |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | return parent::createWithoutCheckingData($attribute, $channelCode, $localeCode, $data); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function supportedAttributeType(): string |
||
| 33 | } |
||
| 34 | } |
||
| 35 |