aboutsummaryrefslogtreecommitdiffstats
path: root/oni-php/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'oni-php/snippets')
-rw-r--r--oni-php/snippets/php-mode/arrow-function4
-rw-r--r--oni-php/snippets/php-mode/function-expression7
-rw-r--r--oni-php/snippets/php-mode/function-statement10
-rw-r--r--oni-php/snippets/php-mode/if-statement7
4 files changed, 26 insertions, 2 deletions
diff --git a/oni-php/snippets/php-mode/arrow-function b/oni-php/snippets/php-mode/arrow-function
index 43bad1e..53e0525 100644
--- a/oni-php/snippets/php-mode/arrow-function
+++ b/oni-php/snippets/php-mode/arrow-function
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name: arrow-function
-# key: fn
+# key: f
# --
-fn($1) => $0 \ No newline at end of file
+fn($1): $2 => $3 \ No newline at end of file
diff --git a/oni-php/snippets/php-mode/function-expression b/oni-php/snippets/php-mode/function-expression
new file mode 100644
index 0000000..5628e8e
--- /dev/null
+++ b/oni-php/snippets/php-mode/function-expression
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: function expression
+# key: f
+# --
+function ($1) ${2:use ($3)} {
+ $0
+} \ No newline at end of file
diff --git a/oni-php/snippets/php-mode/function-statement b/oni-php/snippets/php-mode/function-statement
new file mode 100644
index 0000000..6a1cbe6
--- /dev/null
+++ b/oni-php/snippets/php-mode/function-statement
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# name: function statement
+# key: f
+# --
+/**
+ * $5
+ */
+${1:private} function $2($3): ${4:void} {
+ $0
+} \ No newline at end of file
diff --git a/oni-php/snippets/php-mode/if-statement b/oni-php/snippets/php-mode/if-statement
new file mode 100644
index 0000000..6033e3a
--- /dev/null
+++ b/oni-php/snippets/php-mode/if-statement
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: if statement
+# key: ?
+# --
+if ($1) {
+ $2
+} \ No newline at end of file