Skip to content

Commit

Permalink
proper default value for meta boolean properties
Browse files Browse the repository at this point in the history
  • Loading branch information
oliwierptak committed Feb 22, 2022
1 parent f8dade6 commit 6ae9dd9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Popo/Plugin/ClassPlugin/MetadataClassPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ protected function generateMetadataProperties(BuilderPluginInterface $builder):
}

if ($builder->getSchemaInspector()->isDateTimeProperty($property->getType())) {
$metadata[$property->getName()][PopoDefinesInterface::SCHEMA_PROPERTY_DEFAULT] = $property->getDefault(
);
$metadata[$property->getName()][PopoDefinesInterface::SCHEMA_PROPERTY_DEFAULT] = $property->getDefault();
continue;
}

if ($builder->getSchemaInspector()->isBool($property->getType())) {
$metadata[$property->getName()][PopoDefinesInterface::SCHEMA_PROPERTY_DEFAULT] = (bool) $property->getDefault();
continue;
}

Expand Down

0 comments on commit 6ae9dd9

Please sign in to comment.