Add typehint to isInteger(), fix tests
This commit is contained in:
parent
a26a6904d8
commit
86ab4b345a
@ -347,8 +347,8 @@ class ModelChoiceList extends ObjectChoiceList
|
|||||||
* be persisted or added to the idmodel map before. Otherwise an
|
* be persisted or added to the idmodel map before. Otherwise an
|
||||||
* exception is thrown.
|
* exception is thrown.
|
||||||
*
|
*
|
||||||
* @param object $model The model for which to get the identifier
|
* @param object $model The model for which to get the identifier
|
||||||
* @throws FormException If the model does not exist
|
* @throws FormException If the model does not exist
|
||||||
*/
|
*/
|
||||||
private function getIdentifierValues($model)
|
private function getIdentifierValues($model)
|
||||||
{
|
{
|
||||||
@ -367,10 +367,12 @@ class ModelChoiceList extends ObjectChoiceList
|
|||||||
/**
|
/**
|
||||||
* Whether this column in an integer
|
* Whether this column in an integer
|
||||||
*
|
*
|
||||||
|
* @param ColumnMap $column
|
||||||
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
private function isInteger($col)
|
private function isInteger(\ColumnMap $column)
|
||||||
{
|
{
|
||||||
return $col->getPdoType() === \PDO::PARAM_INT;
|
return $column->getPdoType() === \PDO::PARAM_INT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class ItemQuery
|
|||||||
|
|
||||||
public function getPrimaryKeys()
|
public function getPrimaryKeys()
|
||||||
{
|
{
|
||||||
$cm = new ColumnMap('id', $this);
|
$cm = new \ColumnMap('id', new \TableMap());
|
||||||
$cm->setType('INTEGER');
|
$cm->setType('INTEGER');
|
||||||
|
|
||||||
return array('id' => $cm);
|
return array('id' => $cm);
|
||||||
|
@ -22,7 +22,7 @@ class ReadOnlyItemQuery
|
|||||||
|
|
||||||
public function getPrimaryKeys()
|
public function getPrimaryKeys()
|
||||||
{
|
{
|
||||||
$cm = new ColumnMap('id', $this);
|
$cm = new \ColumnMap('id', new \TableMap());
|
||||||
$cm->setType('INTEGER');
|
$cm->setType('INTEGER');
|
||||||
|
|
||||||
return array('id' => $cm);
|
return array('id' => $cm);
|
||||||
|
Reference in New Issue
Block a user