mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
fix: setType should accept null as type (#309)
This commit is contained in:
@@ -501,9 +501,9 @@ class Result implements IDataSource
|
||||
|
||||
/**
|
||||
* Define column type.
|
||||
* @param string $type use constant Type::*
|
||||
* @param string|null $type use constant Type::*
|
||||
*/
|
||||
final public function setType(string $column, string $type): self
|
||||
final public function setType(string $column, ?string $type): self
|
||||
{
|
||||
$this->types[$column] = $type;
|
||||
return $this;
|
||||
@@ -513,7 +513,7 @@ class Result implements IDataSource
|
||||
/**
|
||||
* Returns column type.
|
||||
*/
|
||||
final public function getType(string $column): string
|
||||
final public function getType(string $column): ?string
|
||||
{
|
||||
return $this->types[$column] ?? null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user