Skip to content

Instantly share code, notes, and snippets.

@SelrahcD
Created June 13, 2022 08:32
Show Gist options
  • Save SelrahcD/64f666b14ba6594ec00e406934aca75e to your computer and use it in GitHub Desktop.
Save SelrahcD/64f666b14ba6594ec00e406934aca75e to your computer and use it in GitHub Desktop.
Phpstorm Wither live template
<template name="with" value="public function with$NAME$($PARAMETER_TYPE$ $$$PARAMETER_NAME$): self&#10;{&#10;&#9;$clone = clone $this;&#10;&#9;&#10;&#9;$clone-&gt;$PARAMETER_NAME$$END$ = $$$PARAMETER_NAME$;&#10;&#9;&#10;&#9;return $clone;&#10;}" description="Create a wither" toReformat="false" toShortenFQNames="true">
<variable name="PARAMETER_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PARAMETER_NAME" expression="complete()" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="" defaultValue="capitalize(PARAMETER_NAME)" alwaysStopAt="false" />
<context>
<option name="PHP Class Member" value="true" />
</context>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment