diff --git a/files/constants.php b/files/constants.php index a6fb0587..0a7a5c5d 100644 --- a/files/constants.php +++ b/files/constants.php @@ -98,9 +98,6 @@ const PHPFHIR_TRAIT_SOURCE_XMLNS = 'SourceXMLNamespaceTrait'; // Core enums -const PHPFHIR_ENUM_FACTORY_VERSION_CONFIG_KEY = 'FactoryVersionConfigKey'; -const PHPFHIR_ENUM_FACTORY_CONFIG_KEY = 'FactoryConfigKeyEnum'; -const PHPFHIR_ENUM_VERSION_CONFIG_KEY = 'VersionConfigKeyEnum'; const PHPFHIR_ENUM_VERSION = 'VersionEnum'; // Core exceptions @@ -111,12 +108,10 @@ // Core encoding entities const PHPFHIR_ENCODING_CLASSNAME_XML_WRITER = 'XMLWriter'; const PHPFHIR_ENCODING_ENUM_XML_LOCATION = 'XMLLocationEnum'; -const PHPFHIR_ENCODING_ENUM_SERIALIZE_CONFIG_KEY = 'SerializeConfigKeyEnum'; +const PHPFHIR_ENCODING_TRAIT_XML_LOCATION = 'XMLLocationTrait'; const PHPFHIR_ENCODING_CLASSNAME_SERIALIZE_CONFIG = 'SerializeConfig'; -const PHPFHIR_ENCODING_ENUM_UNSERIALIZE_CONFIG_KEY = 'UnserializeConfigKeyEnum'; const PHPFHIR_ENCODING_CLASSNAME_UNSERIALIZE_CONFIG = 'UnserializeConfig'; - // Core client entities const PHPFHIR_CLIENT_INTERFACE_CLIENT = 'ClientInterface'; const PHPFHIR_CLIENT_CLASSNAME_CLIENT = 'Client'; diff --git a/src/Utilities/ImportUtils.php b/src/Utilities/ImportUtils.php index 83ce7655..32a00287 100644 --- a/src/Utilities/ImportUtils.php +++ b/src/Utilities/ImportUtils.php @@ -50,7 +50,6 @@ public static function buildVersionTypeImports(Type $type): void if (!$type->isAbstract()) { $imports->addCoreFileImportsByName( PHPFHIR_ENCODING_CLASSNAME_XML_WRITER, - PHPFHIR_ENCODING_ENUM_XML_LOCATION, ); } @@ -98,6 +97,16 @@ public static function buildVersionTypeImports(Type $type): void ); } + if ($type->isValueContainer() + || $type->hasValueContainerParent() + || $type->hasPrimitiveContainerParent() + || $typeKind->isOneOf(TypeKindEnum::PRIMITIVE, TypeKindEnum::LIST, TypeKindEnum::PRIMITIVE_CONTAINER)) { + $imports->addCoreFileImportsByName(PHPFHIR_ENCODING_ENUM_XML_LOCATION); + if (!$type->hasValueContainerParent() && !$type->hasPrimitiveContainerParent()) { + $imports->addCoreFileImportsByName(PHPFHIR_ENCODING_TRAIT_XML_LOCATION); + } + } + if ($restrictionBaseType = $type->getRestrictionBaseFHIRType()) { $imports->addImport( $restrictionBaseType->getFullyQualifiedNamespace(false), diff --git a/src/Utilities/TypeHintUtils.php b/src/Utilities/TypeHintUtils.php index 9210ff3b..54a605ea 100644 --- a/src/Utilities/TypeHintUtils.php +++ b/src/Utilities/TypeHintUtils.php @@ -38,9 +38,11 @@ public static function primitivePHPValueTypeHint(Version $version, bool $nullable, bool $stringable = false): string { - return ($nullable ? 'null|' : '') - . ($stringable ? 'string|' : '') - . $primitiveType->getPHPReturnValueTypeHint(); + $base = $primitiveType->getPHPReturnValueTypeHint(); + if ($stringable && !str_contains($base, 'string')) { + $base = "string|{$base}"; + } + return $nullable ? "null|{$base}" : $base; } /** @@ -349,6 +351,6 @@ public static function buildSetterParameterHint(Version $version, array_unshift($hintTypes, 'null'); } - return implode('|', $hintTypes); + return implode('|', array_unique($hintTypes)); } } \ No newline at end of file diff --git a/src/Version/Definition/Type.php b/src/Version/Definition/Type.php index 45d2cadb..7ae155ee 100644 --- a/src/Version/Definition/Type.php +++ b/src/Version/Definition/Type.php @@ -380,11 +380,9 @@ public function hasPropertiesWithValidations(): bool public function getAllPropertiesIndexedIterator(): iterable { $p = []; - foreach ($this->getParentTypes() as $parentType) { + foreach ($this->getRootFirstParentTypes() as $parentType) { foreach ($parentType->getProperties()->getGenerator() as $property) { - if (!isset($p[$property->getName()])) { - $p[$property->getName()] = $property; - } + $p[$property->getName()] = $property; } } foreach ($this->getProperties()->getGenerator() as $property) { @@ -403,8 +401,9 @@ public function getAllPropertiesIndexedIterator(): iterable public function getParentPropertiesIterator(): iterable { $p = []; - foreach ($this->getParentTypes() as $parentType) { + foreach ($this->getRootFirstParentTypes() as $parentType) { foreach ($parentType->getProperties()->getGenerator() as $property) { + // do not include properties that are overloaded by this type if (!$this->_properties->hasProperty($property->getName()) && !isset($p[$property->getName()])) { $p[$property->getName()] = $property; } @@ -427,6 +426,14 @@ public function getParentTypes(): array return $parents; } + /** + * @return \DCarbone\PHPFHIR\Version\Definition\Type[] + */ + public function getRootFirstParentTypes(): array + { + return array_reverse($this->getParentTypes()); + } + /** * @return bool */ @@ -852,6 +859,14 @@ public function getDirectlyUsedTraits(): array ->getFullyQualifiedNamespace(false); } + if (($this->isValueContainer() + || $this->getKind()->isOneOf(TypeKindEnum::LIST, TypeKindEnum::PRIMITIVE, TypeKindEnum::PRIMITIVE_CONTAINER)) + && !($this->hasValueContainerParent() || $this->hasPrimitiveContainerParent() || $this->hasPrimitiveParent())) { + $traits[PHPFHIR_ENCODING_TRAIT_XML_LOCATION] = $coreFiles + ->getCoreFileByEntityName(PHPFHIR_ENCODING_TRAIT_XML_LOCATION) + ->getFullyQualifiedNamespace(false); + } + return $traits; } diff --git a/template/core/class_factory_config.php b/template/core/class_factory_config.php index 026f6106..71d810cc 100644 --- a/template/core/class_factory_config.php +++ b/template/core/class_factory_config.php @@ -48,12 +48,10 @@ final class * Constructor * @param array $config */ - public function __construct(array $config = []) + public function __construct(null|iterable $versions = null) { - foreach(::cases() as $k) { - if (isset($config[$k->value]) || array_key_exists($k->value, $config)) { - $this->{"set{$k->value}"}($config[$k->value]); - } + if (null !== $versions) { + $this->setVersions(...$versions); } } @@ -111,10 +109,10 @@ public function getVersion(string $name): null|getFullyQualifiedName(true); ?>[] $versions Array of version configurations. + * @param array|getFullyQualifiedName(true); ?> ...$versions Array of version configurations. * @return self */ - public function setVersions(array $versions): self + public function setVersions(array| ...$versions): self { $this->_versions = []; foreach($versions as $config) { @@ -124,15 +122,23 @@ public function setVersions(array $versions): self } /** - * Return iterator containing all registered versions. + * Returns iterator containing all registered versions. * * @return \ArrayIterator<getFullyQualifiedName(true); ?>> */ public function getVersionsIterator(): iterable { + if ([] === $this->_versions) { + return new \EmptyIterator(); + } return new \ArrayIterator($this->_versions); } + /** + * Produces generator over all registered versions. + * + * @return \GeneratorgetFullyQualifiedName(true); ?>> + */ public function getVersionsGenerator(): \Generator { foreach($this->_versions as $version) { diff --git a/template/core/class_version_config.php b/template/core/class_version_config.php index caa05b74..4fe2e583 100644 --- a/template/core/class_version_config.php +++ b/template/core/class_version_config.php @@ -57,27 +57,27 @@ class implements getFullyQualifiedName(true); ?> */ - private $unserializeConfig; + private $_unserializeConfig; /** @var getFullyQualifiedName(true); ?> */ - private $serializeConfig; + private $_serializeConfig; /** * constructor. - * @param array $config + * @param null|array|getFullyQualifiedName(true); ?> $serializeConfig + * @param null|array|getFullyQualifiedName(true); ?> $unserializeConfig */ - public function __construct(array $config = []) + public function __construct(null|array|getEntityName(); ?> $unserializeConfig = null, + null|array|getEntityName(); ?> $serializeConfig = null) { - foreach(::cases() as $k) { - if (isset($config[$k->value]) || array_key_exists($k->value, $config)) { - $this->{"set{$k->value}"}($config[$k->value]); - } - } - - if (!isset($this->_unserializeConfig)) { + if (null !== $unserializeConfig) { + $this->setUnserializeConfig($unserializeConfig); + } else { $this->setUnserializeConfig(self::_DEFAULT_UNSERIALIZE_CONFIG); } - if (!isset($this->_serializeConfig)) { + if (null !== $serializeConfig) { + $this->setSerializeConfig($serializeConfig); + } else { $this->setSerializeConfig(self::_DEFAULT_SERIALIZE_CONFIG); } } @@ -89,9 +89,12 @@ public function __construct(array $config = []) public function setUnserializeConfig(array| $config): self { if (is_array($config)) { - $config = new ($config); + $config = new ( + libxmlOpts: $config['libxmlOpts'] ?? null, + jsonDecodeMaxDepth: $config['jsonDecodeMaxDepth'] ?? null, + ); } - $this->unserializeConfig = $config; + $this->_unserializeConfig = $config; return $this; } @@ -102,7 +105,7 @@ public function setUnserializeConfig(array| { - return $this->unserializeConfig; + return $this->_unserializeConfig; } /** @@ -112,9 +115,13 @@ public function getUnserializeConfig(): $config): self { if (is_array($config)) { - $config = new ($config); + $config = new ( + overrideSourceXMLNS: $config['overrideSourceXMLNS'] ?? null, + rootXMLNS: $config['rootXMLNS'] ?? null, + libxmlOpts: $config['libxmlOpts'] ?? null, + ); } - $this->serializeConfig = $config; + $this->_serializeConfig = $config; return $this; } @@ -125,7 +132,7 @@ public function setSerializeConfig(array| { - return $this->serializeConfig; + return $this->_serializeConfig; } } /** @var string */ public string $at; - /** @var getFullyQualifiedName(true); ?> */ - public $format; + /** + * The serialization type to request from the server. Typically this is 'json' or 'xml'. + * + * @var string + */ + public string $format; - /** @var getFullyQualifiedName(true); ?> */ - public $sort; + /** @var string */ + public string $sort; /** * Extra query parameters. @@ -81,5 +85,44 @@ class * @var array */ public array $options; + + public function __construct(string| $method, + string $path, + null|int $count = null, + null|string $since = null, + null|string $at = null, + null|string| $format = null, + null|string| $sort = null, + null|array $queryParams = null, + null|bool $parseResponseHeaders = null, + null|array $options = null) + { + $this->method = (string)$method; + $this->path = $path; + if (null !== $count) { + $this->count = $count; + } + if (null !== $since) { + $this->since = $since; + } + if (null !== $at) { + $this->at = $at; + } + if (null !== $format) { + $this->format = (string)$format; + } + if (null !== $sort) { + $this->sort = (string)$sort; + } + if (null !== $queryParams) { + $this->queryParams = $queryParams; + } + if (null !== $parseResponseHeaders) { + $this->parseResponseHeaders = $parseResponseHeaders; + } + if (null !== $options) { + $this->options = $options; + } + } } /** @var int */ private int $_xhtmlLibxmlOpts; - public function __construct(array $config) + public function __construct(null|bool $overrideSourceXMLNS = null, + null|string $rootXMLNS = null, + null|int $xhtmlLibxmlOpts = null) { - foreach(::cases() as $k) { - if (isset($config[$k->value]) || array_key_exists($k->value, $config)) { - $this->{"set{$k->value}"}($config[$k->value]); - } + if (null !== $overrideSourceXMLNS) { + $this->setOverrideSourceXMLNS($overrideSourceXMLNS); + } + if (null !== $rootXMLNS) { + $this->setRootXMLNS($rootXMLNS); + } + if (null !== $xhtmlLibxmlOpts) { + $this->setXHTMLLibxmlOpts($xhtmlLibxmlOpts); } } diff --git a/template/core/encoding/class_unserialize_config.php b/template/core/encoding/class_unserialize_config.php index b01b09f4..c27790b7 100644 --- a/template/core/encoding/class_unserialize_config.php +++ b/template/core/encoding/class_unserialize_config.php @@ -35,12 +35,14 @@ class /** @var int */ private int $_jsonDecodeMaxDepth; - public function __construct(array $config) + public function __construct(null|int $libxmlOpts = null, + null|int $jsonDecodeMaxDepth = null) { - foreach(::cases() as $k) { - if (isset($config[$k->value]) || array_key_exists($k->value, $config)) { - $this->{"set{$k->value}"}($config[$k->value]); - } + if (null !== $libxmlOpts) { + $this->setLibxmlOpts($libxmlOpts); + } + if (null !== $jsonDecodeMaxDepth) { + $this->setJsonDecodeMaxDepth($jsonDecodeMaxDepth); } } diff --git a/template/core/encoding/enum_serialize_config_key.php b/template/core/encoding/enum_serialize_config_key.php deleted file mode 100644 index e0602767..00000000 --- a/template/core/encoding/enum_serialize_config_key.php +++ /dev/null @@ -1,36 +0,0 @@ -declare(strict_types=1); - -namespace getFullyQualifiedNamespace(false); ?>; - -getBasePHPFHIRCopyrightComment(false); ?> - - -enum : string -{ - case OVERRIDE_SOURCE_XMLNS = 'overrideSourceXMLNS'; - case ROOT_XMLNS = 'rootXMLNS'; - case XHTML_LIBXML_OPTS = 'xhtmlLibxmlOpts'; -} -declare(strict_types=1); - -namespace getFullyQualifiedNamespace(false); ?>; - -getBasePHPFHIRCopyrightComment(false); ?> - - -enum : string -{ - case LIBXML_OPTS = 'libxmlOpts'; - case JSON_DECODE_MAX_DEPTH = 'jsonDecodeMaxDepth'; -} -getCoreFiles(); + +$xmlLocationEnum = $coreFiles->getCoreFileByEntityName(PHPFHIR_ENCODING_ENUM_XML_LOCATION); + ob_start(); + echo 'declare(strict_types=1); namespace getFullyQualifiedNamespace(false); ?>; @@ -27,9 +33,29 @@ getBasePHPFHIRCopyrightComment(false); ?> -enum : string +trait + { - case VERSIONS = 'versions'; + private $_xmlLocation; + + /** + * Set the XML location of this element's value when serializing + * + * @param getFullyQualifiedName(true); ?> $xmlLocation + */ + public function setXMLLocation( $xmlLocation): void + { + $this->_xmlLocation = $xmlLocation; + } + + /** + * @return null|getFullyQualifiedName(true); ?> + + */ + public function getXMLLocation(): null| + + { + return $this->_xmlLocation ?? null; + } } - -declare(strict_types=1); - -namespace getFullyQualifiedNamespace(false); ?>; - -getBasePHPFHIRCopyrightComment(false); ?> - - -enum : string -{ - case UNSERIALIZE_CONFIG = 'unserializeConfig'; - case SERIALIZE_CONFIG = 'serializeConfig'; -} - { /** - * Arbitrary comments of a hopefully useful nature - * @return array + * Return any / all comments set on this type. + * + * @return string[] */ public function _getFHIRComments(): array; /** * Set internal fhir_comments list, overwriting any previous value(s) + * * @param array $fhirComments */ public function _setFHIRComments(array $fhirComments): void; /** * Append comment string to internal fhir_comments list + * * @param string $fhirComment */ public function _addFHIRComment(string $fhirComment): void; } - extends extends extends \JsonSerializable { /** * Returns the FHIR name represented by this Type + * * @return string */ public function _getFHIRTypeName(): string; @@ -64,6 +65,7 @@ public function _getSourceXMLNS(): null|string; /** * Must return an associative array in structure ["field" => ["rule" => {constraint}]] to be used during validation + * * @return array */ public function _getValidationRules(): array; @@ -71,6 +73,7 @@ public function _getValidationRules(): array; /** * Must return associative array where, if there are validation errors, the keys are the names of fields within the * type that failed validation. The value must be a string message describing the manner of error + * * @return array */ public function _getValidationErrors(): array; @@ -81,7 +84,7 @@ public function _getValidationErrors(): array; * @param null|getFullyQualifiedName(true); ?> $config * @return null|static */ - public static function xmlUnserialize(null|string|\SimpleXMLElement $element, null| $type = null, null| $config = null): null|self; + public static function xmlUnserialize(string|\SimpleXMLElement $element, null| $type = null, null| $config = null): null|self; /** * @param null|getFullyQualifiedName(true); ?> $xw @@ -89,7 +92,7 @@ public static function xmlUnserialize(null|string|\SimpleXMLElement $element, nu * @return getFullyQualifiedName(true); ?> */ - public function xmlSerialize(null| $xw = null, null| $config = null): ; + public function xmlSerialize( $xw = null, null| $config = null): ; /** * @return string diff --git a/template/core/interface_version.php b/template/core/interface_version.php index b66cc9ca..fe77c041 100644 --- a/template/core/interface_version.php +++ b/template/core/interface_version.php @@ -48,24 +48,28 @@ interface { /** * Must return the "name" of this version, e.g. DSTU1, STU3, R5, etc. + * * @return string */ public function getName(): string; /** * Must return source's reported version of FHIR + * * @return string */ public function getSourceVersion(): string; /** * Must return the date this FHIR version's source was generated + * * @return string */ public function getSourceGenerationDate(): string; /** * Must return config for this version + * * @return getFullyQualifiedName(true); ?> */ @@ -73,6 +77,7 @@ public function getConfig(): ; /** * Must return the type map class for this version + * * @return getFullyQualifiedName(true); ?> */ diff --git a/template/core/interface_version_config.php b/template/core/interface_version_config.php index 0c4eafd6..236fdf03 100644 --- a/template/core/interface_version_config.php +++ b/template/core/interface_version_config.php @@ -47,6 +47,7 @@ interface { /** * Must return the unserialization config to use for this version + * * @return getFullyQualifiedName(true); ?> */ @@ -54,6 +55,7 @@ public function getUnserializeConfig(): getFullyQualifiedName(true); ?> */ public function getSerializeConfig(): ; diff --git a/template/core/interface_version_type_map.php b/template/core/interface_version_type_map.php index 24476954..0a76e5a3 100644 --- a/template/core/interface_version_type_map.php +++ b/template/core/interface_version_type_map.php @@ -35,7 +35,8 @@ interface { /** - * Must return the fully qualified class name for FHIR Type name. Must return null if type not found + * Must return the fully qualified class name for FHIR Type name. Must return null if type not found. + * * @param string $typeName * @return string|null */ @@ -43,12 +44,14 @@ public static function getTypeClassName(string $typeName): null|string; /** * Must return the full internal class map + * * @return array */ public static function getMap(): array; /** * Must return the full list of containable resource types + * * @return array */ public static function getContainableTypes(): array; @@ -61,6 +64,7 @@ public static function getContainedTypeClassName(string $typeName): null|string; /** * Must attempt to determine if the provided value is or describes a containable resource type + * * @param string|array|\SimpleXMLElement|getFullyQualifiedName(true); ?> $type * @return bool * @throws \InvalidArgumentException diff --git a/template/core/trait_comment_container.php b/template/core/trait_comment_container.php index 6beec158..d67bc866 100644 --- a/template/core/trait_comment_container.php +++ b/template/core/trait_comment_container.php @@ -34,8 +34,9 @@ trait private array $_fhirComments = []; /** - * Arbitrary comments of a hopefully useful nature - * @return array + * Return any / all comments set on this type. + * + * @return string[] */ public function _getFHIRComments(): array { @@ -44,6 +45,7 @@ public function _getFHIRComments(): array /** * Set internal fhir_comments list, overwriting any previous value(s) + * * @param array $fhirComments */ public function _setFHIRComments(array $fhirComments): void @@ -53,6 +55,7 @@ public function _setFHIRComments(array $fhirComments): void /** * Append comment string to internal fhir_comments list + * * @param string $fhirComment */ public function _addFHIRComment(string $fhirComment): void @@ -61,4 +64,4 @@ public function _addFHIRComment(string $fhirComment): void } } -hasLocalProperties()) : ?> - /** @var array */ - private array $_xmlLocations = []; - - $version, diff --git a/template/versions/types/methods/constructor.php b/template/versions/types/methods/constructor.php index 0cf68f51..427259a0 100644 --- a/template/versions/types/methods/constructor.php +++ b/template/versions/types/methods/constructor.php @@ -22,6 +22,9 @@ /** @var \DCarbone\PHPFHIR\Version $version */ /** @var \DCarbone\PHPFHIR\Version\Definition\Type $type */ +$coreFiles = $version->getConfig()->getCoreFiles(); +$xmlLocationEnum = $coreFiles->getCoreFileByEntityName(PHPFHIR_ENCODING_ENUM_XML_LOCATION); + $typeKind = $type->getKind(); $typeClassName = $type->getClassName(); $typeImports = $type->getImports(); @@ -47,10 +50,13 @@ /** * Constructor * @param $value + * @param getFullyQualifiedName(true); ?> $xmlLocation */ - public function __construct( $value = null) + public function __construct( $value = null, + getEntityName(); ?> $xmlLocation = getEntityName(); ?>::ATTRIBUTE) { - $this->setValue($value); + $this->setValue(value: $value); + $this->setXMLLocation($xmlLocation); } Constructor -isValueContainer()) : ?> - * @param $value - getAllPropertiesIndexedIterator() as $property) : - $pt = $property->getValueFHIRType(); - if ($type->isValueContainer() && $property->isValueProperty()) { - continue; - } - ?> + $pt = $property->getValueFHIRType(); ?> * @param $getName(); ?> hasCommentContainerParent() || $type->isCommentContainer()) : ?> * @param null|iterable $fhirComments +isValueContainer() || $type->hasValueContainerParent() || $type->hasPrimitiveContainerParent() || $typeKind === TypeKindEnum::PRIMITIVE_CONTAINER) : ?> + * @param getFullyQualifiedName(true); ?> $xmlLocation */ - public function __construct(isValueContainer()) : echo TypeHintUtils::buildSetterParameterHint($version, $valueProperty, true);?> $value = nullgetAllPropertiesIndexedIterator() as $i => $property) : - if ($type->isValueContainer() && $property->isValueProperty()) { - continue; - } - if ($type->isValueContainer() || $i > 0) : ?>, + public function __construct(getAllPropertiesIndexedIterator() as $i => $property) : if ($i > 0) : ?>, $getName(); ?> = nullhasCommentContainerParent() || $type->isCommentContainer()) : if ($totalPropertyCount > 0) : ?>, - null|iterable $fhirComments = null) + null|iterable $fhirComments = nullisValueContainer() || $type->hasValueContainerParent() || $type->hasPrimitiveContainerParent() || $typeKind === TypeKindEnum::PRIMITIVE_CONTAINER) : ?>, + getEntityName(); ?> $xmlLocation = getEntityName(); ?>::isValueContainer()) : ?>ELEMENTATTRIBUTE) { parent::__construct(getParentPropertiesIterator() as $i => $property) : if ($i > 0) : ?>, - getName(); ?>: $getName(); ?>hasCommentContainerParent()) : + getName(); ?>: $getName(); ?>hasCommentContainerParent()) : if ($parentPropertyCount > 0) : ?>, - fhirComments: $fhirComments); -hasCommentContainerParent() && $type->isCommentContainer()) : ?> + fhirComments: $fhirCommentshasValueContainerParent() || $type->hasPrimitiveContainerParent()) : + if ($parentPropertyCount > 0) : ?>, + getEntityName(); ?>: $xmlLocation); +hasCommentContainerParent() && $type->isCommentContainer()) : ?> if (null !== $fhirComments && [] !== $fhirComments) { $this->_setFHIRComments($fhirComments); - } + }isValueContainer() || $typeKind === TypeKindEnum::PRIMITIVE_CONTAINER) && !($type->hasPrimitiveContainerParent() || $type->hasValueContainerParent())) : ?> + $this->setXMLLocation($xmlLocation); +getGenerator() as $property) : +foreach($properties->getGenerator() as $property) : if ($property->getOverloadedProperty()) { continue; } diff --git a/template/versions/types/methods/constructors/default_property_setter_call.php b/template/versions/types/methods/constructors/default_property_setter_call.php index 948623fd..35d68a35 100644 --- a/template/versions/types/methods/constructors/default_property_setter_call.php +++ b/template/versions/types/methods/constructors/default_property_setter_call.php @@ -23,7 +23,7 @@ ob_start(); ?> if (null !== $getName(); ?>) { isCollection()) : ?> - $this->setgetName(); ?>(...$getName(); ?>); + $this->setgetName()); ?>(...$getName(); ?>); $this->getSetterName(); ?>($getName(); ?>);