Skip to content

Commit

Permalink
get class name from constant
Browse files Browse the repository at this point in the history
  • Loading branch information
smhg committed Dec 10, 2024
1 parent ed0a54d commit 531713a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function preUpdate(AbstractOMBuilder $builder): string
if ($this->withUpdatedAt()) {
$updateColumn = $this->getTable()->getColumn($this->getParameter('update_column'));

$dateTimeClass = 'DateTime';
$dateTimeClass = DateTime::class;

Check failure on line 107 in src/Propel/Generator/Behavior/Timestampable/TimestampableBehavior.php

View workflow job for this annotation

GitHub Actions / code-style-and-static-analysis

Class Propel\Generator\Behavior\Timestampable\DateTime not found.

if ($builder instanceof ObjectBuilder) {
$dateTimeClass = $builder->getDateTimeClass($updateColumn);
Expand Down Expand Up @@ -137,7 +137,7 @@ public function preInsert(AbstractOMBuilder $builder): string
if ($this->withCreatedAt()) {
$createColumn = $this->getTable()->getColumn($this->getParameter('create_column'));

$dateTimeClass = 'DateTime';
$dateTimeClass = DateTime::class;

Check failure on line 140 in src/Propel/Generator/Behavior/Timestampable/TimestampableBehavior.php

View workflow job for this annotation

GitHub Actions / code-style-and-static-analysis

Class Propel\Generator\Behavior\Timestampable\DateTime not found.

if ($builder instanceof ObjectBuilder) {
$dateTimeClass = $builder->getDateTimeClass($createColumn);
Expand All @@ -158,7 +158,7 @@ public function preInsert(AbstractOMBuilder $builder): string
if ($this->withUpdatedAt()) {
$updateColumn = $this->getTable()->getColumn($this->getParameter('update_column'));

$dateTimeClass = 'DateTime';
$dateTimeClass = DateTime::class;

Check failure on line 161 in src/Propel/Generator/Behavior/Timestampable/TimestampableBehavior.php

View workflow job for this annotation

GitHub Actions / code-style-and-static-analysis

Class Propel\Generator\Behavior\Timestampable\DateTime not found.

if ($builder instanceof ObjectBuilder) {
$dateTimeClass = $builder->getDateTimeClass($updateColumn);
Expand Down

0 comments on commit 531713a

Please sign in to comment.