Is there a possibility to use the description of a property that's already set for the getter as well?
What I want to do is:
/**
* User the network environment is assigned to
*
* @var User $user
*/
protected $user;
to become:
/**
* Get the user the network environment is assigned to
*
* @return User
*/
public function getUser() : User
{
return $this->user;
}
I think about a template getter.js file like:
// prettier-ignore
module.exports = (property) => `
/**
*
* Get the ${property.getterExistingDescription()}
*
* @return ${property.getType() ? property.getType() : "mixed"}
*/
public function ${property.getterName()}() : ${property.getType() ? property.getType() : "mixed"}
{
return $this->${property.getName()};
}
`;
Is this already possible with a template, did I overlook something?
Is there a possibility to use the description of a property that's already set for the getter as well?
What I want to do is:
to become:
I think about a template getter.js file like:
Is this already possible with a template, did I overlook something?