Last active
February 23, 2018 17:19
-
-
Save brockriemenschneider/53482ffeadb9cee80eab1265443ba081 to your computer and use it in GitHub Desktop.
PHPStorm File and Code Templates
This file contains hidden or 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
/** | |
* Constructor | |
#if (${PARAM_DOC} != "") * | |
#else#end | |
${PARAM_DOC} | |
*/ | |
public function __construct(${PARAM_LIST}) {${BODY}} |
This file contains hidden or 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
/** | |
* Set ${FIELD_NAME} | |
* | |
* @param ${TYPE_HINT} $${PARAM_NAME} | |
* | |
* @return self | |
*/ | |
public function set${NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME})#if(${RETURN_TYPE}): self#else#end | |
{ | |
$this->${FIELD_NAME} = $${PARAM_NAME}; | |
return $this; | |
} |
This file contains hidden or 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
/** | |
* Get ${FIELD_NAME} | |
* | |
* @return ${TYPE_HINT} | |
*/ | |
public ${STATIC} function ${GET_OR_IS}${NAME}()#if(${RETURN_TYPE}): ${RETURN_TYPE}#else#end | |
{ | |
#if (${STATIC} == "static") | |
return self::$${FIELD_NAME}; | |
#else | |
return $this->${FIELD_NAME}; | |
#end | |
} |
This file contains hidden or 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
/** | |
* Set ${FIELD_NAME} | |
* | |
* @param ${TYPE_HINT} $${PARAM_NAME} | |
*/ | |
public ${STATIC} function set${NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME}) | |
{ | |
#if (${STATIC} == "static") | |
self::$${FIELD_NAME} = $${PARAM_NAME}; | |
#else | |
$this->${FIELD_NAME} = $${PARAM_NAME}; | |
#end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment