Add code templates
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
6c1553891e
commit
f7a21144b8
15 changed files with 4574 additions and 0 deletions
61
system/.config/phpstorm/config/templates/PHP.xml
Normal file
61
system/.config/phpstorm/config/templates/PHP.xml
Normal file
|
@ -0,0 +1,61 @@
|
|||
<templateSet group="PHP">
|
||||
<template name="fore" value="foreach ($ITERABLE$ as $VAR_VALUE$) { $END$ }" description="foreach(iterable_expr as $value) {...}" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="ITERABLE" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="VAR_VALUE" expression="phpSuggestVariableName()" defaultValue=""$item"" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="forek" value="foreach ($ITERABLE$ as $VAR_KEY$ => $VAR_VALUE$) { $END$ }" description="foreach(iterable_expr as $key => $value) {...}" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="ITERABLE" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="VAR_KEY" expression="phpSuggestVariableName()" defaultValue=""$index"" alwaysStopAt="true" />
|
||||
<variable name="VAR_VALUE" expression="phpSuggestVariableName()" defaultValue=""$item"" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="thr" value="throw new $END$" description="throw new" toReformat="true" toShortenFQNames="true">
|
||||
<context />
|
||||
</template>
|
||||
<template name="eco" value="echo "$END$";" description="'echo' statement" toReformat="true" toShortenFQNames="true">
|
||||
<context />
|
||||
</template>
|
||||
<template name="rqr" value="require "$END$";" description="'require' statement" toReformat="true" toShortenFQNames="true">
|
||||
<context />
|
||||
</template>
|
||||
<template name="rqro" value="require_once "$END$";" description="'require_once' statement" toReformat="true" toShortenFQNames="true">
|
||||
<context />
|
||||
</template>
|
||||
<template name="inc" value="include "$END$";" description="'include' statement" toReformat="true" toShortenFQNames="true">
|
||||
<context />
|
||||
</template>
|
||||
<template name="inco" value="include_once "$END$";" description="'include_once' statement" toReformat="true" toShortenFQNames="true">
|
||||
<context />
|
||||
</template>
|
||||
<template name="pubf" value="public function $NAME$($PARAMETERS$){ $END$ }" description="public function" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="PARAMETERS" expression="phpVar" defaultValue="" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="pubsf" value="public static function $NAME$($PARAMETERS$){ $END$ }" description="public static function" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="PARAMETERS" expression="phpVar" defaultValue="" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="prof" value="protected function $NAME$($PARAMETERS$){ $END$ }" description="protected function" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="PARAMETERS" expression="phpVar" defaultValue="" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="prosf" value="protected static function $NAME$($PARAMETERS$){ $END$ }" description="protected static function" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="PARAMETERS" expression="phpVar" defaultValue="" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="prif" value="private function $NAME$($PARAMETERS$){ $END$ }" description="private function" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="PARAMETERS" expression="phpVar" defaultValue="" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
<template name="prisf" value="private static function $NAME$($PARAMETERS$){ $END$ }" description="private static function" toReformat="true" toShortenFQNames="true">
|
||||
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="PARAMETERS" expression="phpVar" defaultValue="" alwaysStopAt="true" />
|
||||
<context />
|
||||
</template>
|
||||
</templateSet>
|
Loading…
Add table
Add a link
Reference in a new issue