Skip to content

Commit

Permalink
removing useless "always have values on primitives" check...
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed May 1, 2024
1 parent 4035ed1 commit 77a363b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
3 changes: 0 additions & 3 deletions src/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public function buildDefinition(): void
$log->info('Finding property types');
TypePropertyDecorator::findPropertyTypes($this->config, $this->types);

$log->info('Ensuring primitive type children have "value" property');
TypeDecorator::ensureValueOnPrimitiveChildTypes($this->config, $this->types);

$log->info('Finding overloaded properties in child types');
TypePropertyDecorator::findOverloadedProperties($this->config, $this->types);

Expand Down
26 changes: 0 additions & 26 deletions src/Definition/TypeDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,32 +204,6 @@ public static function determinePrimitiveTypes(VersionConfig $config, Types $typ
}
}

/**
* @param \DCarbone\PHPFHIR\Config\VersionConfig $config
* @param \DCarbone\PHPFHIR\Definition\Types $types
*/
public static function ensureValueOnPrimitiveChildTypes(VersionConfig $config, Types $types): void
{
// $logger = $config->getLogger();
// foreach ($types->getIterator() as $type) {
// if (!$type->hasPrimitiveParent() ||
// null !== $type->getLocalProperties()->getProperty(PHPFHIR_VALUE_PROPERTY_NAME)) {
// continue;
// }
// $logger->warning(
// sprintf(
// 'Type "%s" extends primitive "%s" but is missing "%s" property. Adding...',
// $type->getFHIRName(),
// $type->getParentType()->getFHIRName(),
// PHPFHIR_VALUE_PROPERTY_NAME
// )
// );
// $property = new Property($type, $type->getSourceSXE(), $type->getSourceFilename());
// $property->setName(PHPFHIR_VALUE_PROPERTY_NAME);
// $type->getLocalProperties()->addProperty($property);
// }
}

/**
* @param \DCarbone\PHPFHIR\Config\VersionConfig $config
* @param \DCarbone\PHPFHIR\Definition\Types $types
Expand Down

0 comments on commit 77a363b

Please sign in to comment.