| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace LaravelUi5\OData\Edm\Type; |
| 6: | |
| 7: | use LaravelUi5\OData\Edm\Contracts\Type\TypeFacetsInterface; |
| 8: | |
| 9: | final readonly class TypeFacets implements TypeFacetsInterface |
| 10: | { |
| 11: | public function __construct( |
| 12: | private bool $nullable = true, |
| 13: | private ?int $maxLength = null, |
| 14: | private ?int $precision = null, |
| 15: | private ?int $scale = null, |
| 16: | private ?bool $unicode = null, |
| 17: | private ?int $srid = null, |
| 18: | ) {} |
| 19: | |
| 20: | public function isNullable(): bool |
| 21: | { |
| 22: | return $this->nullable; |
| 23: | } |
| 24: | |
| 25: | public function getMaxLength(): ?int |
| 26: | { |
| 27: | return $this->maxLength; |
| 28: | } |
| 29: | |
| 30: | public function getPrecision(): ?int |
| 31: | { |
| 32: | return $this->precision; |
| 33: | } |
| 34: | |
| 35: | public function getScale(): ?int |
| 36: | { |
| 37: | return $this->scale; |
| 38: | } |
| 39: | |
| 40: | public function isUnicode(): ?bool |
| 41: | { |
| 42: | return $this->unicode; |
| 43: | } |
| 44: | |
| 45: | public function getSrid(): ?int |
| 46: | { |
| 47: | return $this->srid; |
| 48: | } |
| 49: | } |
| 50: | |