for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LAG\AdminBundle\Utils;
class FieldTypeGuesser
{
public function getTypeAndOptions($doctrineType)
$fieldOptions = [];
if ($doctrineType == 'string') {
$fieldOptions = [
'type' => 'string',
'options' => [
'length' => 100
]
];
} else if ($doctrineType == 'boolean') {
'type' => 'boolean',
'options' => []
} else if ($doctrineType == 'datetime') {
'type' => 'date',
}
return $fieldOptions;