Skip to content

Instantly share code, notes, and snippets.

@AlexVanderbist
Created July 22, 2020 13:58
Show Gist options
  • Save AlexVanderbist/cc5a6e0cf25b1404f8f12ca7caf7ba4b to your computer and use it in GitHub Desktop.
Save AlexVanderbist/cc5a6e0cf25b1404f8f12ca7caf7ba4b to your computer and use it in GitHub Desktop.
PhpStorm arrow function live template
<template name="fn" value="fn ($TYPE$ $INSTANCE$) =&gt; $INSTANCE$$END$" description="Arrow function" toReformat="false" toShortenFQNames="true">
<variable name="TYPE" expression="completeSmart()" defaultValue="" alwaysStopAt="true" />
<variable name="INSTANCE" expression="concat(&quot;$&quot;, camelCase(TYPE))" defaultValue="" alwaysStopAt="false" />
<context>
<option name="PHP Expression" value="true" />
<option name="PHP Statement" value="true" />
</context>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment