Skip to content

Commit

Permalink
Merge 967c623 into af16259
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Mar 20, 2018
2 parents af16259 + 967c623 commit 04d1584
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Guesser/FilterTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ public function guessType($class, $property, ModelManagerInterface $modelManager

return new TypeGuess('doctrine_orm_boolean', $options, Guess::HIGH_CONFIDENCE);
case 'datetime':
case 'datetime_immutable':
case 'vardatetime':
case 'datetimetz':
case 'datetimetz_immutable':
return new TypeGuess('doctrine_orm_datetime', $options, Guess::HIGH_CONFIDENCE);
case 'date':
case 'date_immutable':
return new TypeGuess('doctrine_orm_date', $options, Guess::HIGH_CONFIDENCE);
case 'decimal':
case 'float':
Expand All @@ -93,6 +96,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager

return new TypeGuess('doctrine_orm_string', $options, Guess::MEDIUM_CONFIDENCE);
case 'time':
case 'time_immutable':
return new TypeGuess('doctrine_orm_time', $options, Guess::HIGH_CONFIDENCE);
default:
return new TypeGuess('doctrine_orm_string', $options, Guess::LOW_CONFIDENCE);
Expand Down
4 changes: 4 additions & 0 deletions src/Guesser/TypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
case 'boolean':
return new TypeGuess('boolean', [], Guess::HIGH_CONFIDENCE);
case 'datetime':
case 'datetime_immutable':
case 'vardatetime':
case 'datetimetz':
case 'datetimetz_immutable':
return new TypeGuess('datetime', [], Guess::HIGH_CONFIDENCE);
case 'date':
case 'date_immutable':
return new TypeGuess('date', [], Guess::HIGH_CONFIDENCE);
case 'decimal':
case 'float':
Expand All @@ -68,6 +71,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
case 'text':
return new TypeGuess('textarea', [], Guess::MEDIUM_CONFIDENCE);
case 'time':
case 'time_immutable':
return new TypeGuess('time', [], Guess::HIGH_CONFIDENCE);
default:
return new TypeGuess('text', [], Guess::LOW_CONFIDENCE);
Expand Down

0 comments on commit 04d1584

Please sign in to comment.