Forked from kunicmarko20/gist:9b21253ea86a49c94e3fba4b1de5fb54
Created
December 25, 2018 20:48
-
-
Save alle/bd2cd3b13284ff918a286e0236c40bc7 to your computer and use it in GitHub Desktop.
PHPStorm code template for getters without `get` prefix and first letter decapitalized
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
} |
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
If you want to also keep the
is
prefix, this would work: