1
0
mirror of synced 2024-12-13 14:56:01 +03:00

add bool detection when inferring type

This commit is contained in:
Klein Florian 2012-10-10 11:20:41 +02:00
parent 65fabc20c9
commit 7f8af83b5b

View File

@ -25,7 +25,7 @@ use Doctrine\DBAL\Types\Type;
/**
* Provides an enclosed support for parameter infering.
*
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
@ -50,6 +50,10 @@ class ParameterTypeInferer
return Type::INTEGER;
}
if (is_bool($value)) {
return Type::BOOLEAN;
}
if ($value instanceof \DateTime) {
return Type::DATETIME;
}
@ -62,4 +66,4 @@ class ParameterTypeInferer
return \PDO::PARAM_STR;
}
}
}