private function convertTypesToPHPValues(ProviderInterface $provider, $result)
{
if (!is_array($result)) {
return $result;
}
$fields = $provider->getDefinition()->getFields();
foreach ($result as $index => $items) {
foreach ($items as $key => $value) {
$defaultType = Type::getType(is_numeric($value) ? Type::INTEGER : Type::STRING);
$type = array_key_exists($key, $fields) ? $fields[$key]->getType() : $defaultType;
$result[$index][$key] = $type->convertToPHPValue($value, $this->getConnection()->getDatabasePlatform());
}
}
return $result;
}