1
0
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:
Jan Kuchař
2018-08-22 15:43:11 +02:00
committed by David Grudl
parent 0ad2dd70bc
commit e7539102cb

View File

@@ -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;
}