wol-soft/php-json-schema-model-generator

View on GitHub
src/SchemaProcessor/PostProcessor/Templates/AdditionalProperties/GetAdditionalProperty.phptpl

Summary

Maintainability
Test Coverage
/**
 * Get the value of an additional property. If the requested additional property doesn't exists null will be returned
 *
 * @param string $property The key of the additional property
 *
 * {% if validationProperty %}{% if viewHelper.getTypeHintAnnotation(validationProperty, true) %}@return {{ viewHelper.getTypeHintAnnotation(validationProperty, true) }}{% endif %}{% else %}@return mixed{% endif %}
 */
public function getAdditionalProperty(string $property){% if validationProperty %}{% if validationProperty.getType(true) %}: {{ viewHelper.getType(validationProperty, true) }}{% endif %}{% endif %}
{
    return $this->_additionalProperties[$property] ?? null;
}