This commit is contained in:
2023-10-02 23:10:49 +03:00
commit c6cb488379
255 changed files with 18731 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Lucent\Schema;
final class Nullable
{
public function __construct(
public bool $nullable,
public mixed $value,
public mixed $default,
)
{
}
public function value(): mixed
{
if (!empty($this->value)) {
return $this->value;
}
if ($this->nullable) {
return null;
}
return $this->default;
}
}