Mapper default null
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Incoviba\Common\Implement\Repository;
|
namespace Incoviba\Common\Implement\Repository;
|
||||||
|
|
||||||
|
use Error;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Incoviba\Common\Define;
|
use Incoviba\Common\Define;
|
||||||
|
|
||||||
@ -46,7 +47,11 @@ class Mapper implements Define\Repository\Mapper
|
|||||||
}
|
}
|
||||||
public function hasDefault(): bool
|
public function hasDefault(): bool
|
||||||
{
|
{
|
||||||
return isset($this->default);
|
try {
|
||||||
|
return isset($this->default) or $this->default === null;
|
||||||
|
} catch (Error) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parse(Define\Model &$model, string $column, ?array $data): bool
|
public function parse(Define\Model &$model, string $column, ?array $data): bool
|
||||||
|
Reference in New Issue
Block a user