Skip to content

Commit

Permalink
only overwrite base class
Browse files Browse the repository at this point in the history
  • Loading branch information
markusramsak committed Oct 20, 2023
1 parent 3d305fe commit a4e34e7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/View/Helper/DocBlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ public function columnTypeToHintType(string $type): ?string
$dbType = TypeFactory::build($type);
if (method_exists($dbType, 'getDateClassName')) {
return '\\' . $dbType->getDateClassName();
} elseif (method_exists($dbType, 'getDateTimeClassName')) {
return '\\' . $dbType->getDateTimeClassName();
}

return '\Cake\I18n\Date';
Expand All @@ -216,9 +214,7 @@ public function columnTypeToHintType(string $type): ?string
case 'timestampfractional':
case 'timestamptimezone':
$dbType = TypeFactory::build($type);
if (method_exists($dbType, 'getDateClassName')) {
return '\\' . $dbType->getDateClassName();
} elseif (method_exists($dbType, 'getDateTimeClassName')) {
if (method_exists($dbType, 'getDateTimeClassName')) {
return '\\' . $dbType->getDateTimeClassName();
}

Expand Down

0 comments on commit a4e34e7

Please sign in to comment.