Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alle/bd2cd3b13284ff918a286e0236c40bc7 to your computer and use it in GitHub Desktop.
Save alle/bd2cd3b13284ff918a286e0236c40bc7 to your computer and use it in GitHub Desktop.
PHPStorm code template for getters without `get` prefix and first letter decapitalized
#if (${TYPE_HINT} == "mixed")
/**
* @return ${TYPE_HINT}
*/
#end
public ${STATIC} function ${FIELD_NAME}()#if(${RETURN_TYPE}): ${RETURN_TYPE}#end
{
#if (${STATIC} == "static")
return self::$${FIELD_NAME};
#else
return $this->${FIELD_NAME};
#end
}
@alle
Copy link
Author

alle commented Apr 17, 2023

After this long time (a gist from 5 years ago), thank you for the insight!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment