IntegerType.php 322 B

1234567891011121314151617
  1. <?php
  2. namespace PhpDevCommunity\PaperORM\Types;
  3. final class IntegerType extends Type
  4. {
  5. public function convertToDatabase($value): ?int
  6. {
  7. return $value === null ? null : (int)$value;
  8. }
  9. public function convertToPHP($value): ?int
  10. {
  11. return $value === null ? null : (int)$value;
  12. }
  13. }