From 41f9d7dc5aaa875b4ad47e888ead692c03c9c343 Mon Sep 17 00:00:00 2001 From: BlackEagle Date: Tue, 23 Sep 2014 09:50:51 +0200 Subject: [PATCH 1/2] php extend class snippet so you can easily add abstract or final Signed-off-by: BlackEagle --- UltiSnips/php.snippets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index bf450ff..4fccbd3 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -223,14 +223,14 @@ endsnippet snippet class "Class declaration template" b /** - * Class ${1:`!p snip.rv=snip.fn.split('.')[0]`} - * @author ${2:`!v g:snips_author`} + * Class ${2:`!p snip.rv=snip.fn.split('.')[0]`} + * @author ${3:`!v g:snips_author`} */ -class $1 +$1class $2 { - public function ${3:__construct}(${4:$options}) + public function ${4:__construct}(${5:$options}) { - ${5:// code} + ${6:// code} } } $0 From dca6268c24c788b4766aa779aa5590fe6b3c81aa Mon Sep 17 00:00:00 2001 From: BlackEagle Date: Tue, 23 Sep 2014 09:51:44 +0200 Subject: [PATCH 2/2] php add interface snippet similar to class snippet Signed-off-by: BlackEagle --- UltiSnips/php.snippets | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 4fccbd3..8d5555e 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -236,6 +236,21 @@ $1class $2 $0 endsnippet +snippet interface "interface declaration template" b +/** + * Interface ${1:`!p snip.rv=snip.fn.split('.')[0]`} + * @author ${2:`!v g:snips_author`} + */ +interface $1 +{ + public function ${3:__construct}(${4:$options}) + { + ${5:// code} + } +} +$0 +endsnippet + snippet construct "__construct()" b /** * @param $2mixed ${1/, /\n * \@param mixed /g}