aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/snips/ft/php.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/alpha/snips/ft/php.lua')
-rw-r--r--lua/alpha/snips/ft/php.lua32
1 files changed, 26 insertions, 6 deletions
diff --git a/lua/alpha/snips/ft/php.lua b/lua/alpha/snips/ft/php.lua
index 4e2506f..6de8114 100644
--- a/lua/alpha/snips/ft/php.lua
+++ b/lua/alpha/snips/ft/php.lua
@@ -98,18 +98,18 @@ local M = {
declare(strict_types=1);
-namespace [];
+namespace {};
-class []
-{
- []
-}
+class {}
+{{
+ {}
+}}
]],
{
f(namespace),
f(class_name),
i(0),
- }, { delimiters = "[]"}),
+ }),
_c = {
d(1, visibility, {}, "public"),
@@ -127,6 +127,26 @@ class []
t {"", ") {", "}"},
},
+ fn = {
+ d(1, visibility, {}, "public"),
+ t(" function "),
+ i(2, "name"),
+ t("("),
+ i(3, "$arg"),
+ t(")"),
+ c(4, {
+ t(""),
+ snippet_from_nodes(nil, {
+ t(': '),
+ i(1, "void"),
+ }),
+ }),
+ newline "{",
+ newline "\t",
+ i(0, ""),
+ newline "}",
+ },
+
pro = {
d(1, visibility, {}, "private"),
t " ",