Skip to content

Commit

Permalink
Add missing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksamson committed Dec 31, 2018
1 parent 31b6e4b commit 663c198
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 29 deletions.
8 changes: 8 additions & 0 deletions snippets/Helper/Helper-array-head.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
head(${1:\$array});
]]></content>
<tabTrigger>Helper::array_head</tabTrigger>
<scope>source.php</scope>
<description>Returns the first element in the given array.</description>
</snippet>
6 changes: 2 additions & 4 deletions snippets/Helper/Helper-array-last.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<snippet>
<content><![CDATA[
array_last(${1:\$array}, function (${2:\$key}, ${3:\$value}) {
return ${4:\$value >= 150;}
});
last(${1:\$array});
]]></content>
<tabTrigger>Helper::array_last</tabTrigger>
<scope>source.php</scope>
<description>Return the last element in an array passing a given truth test.</description>
<description>Returns the last element in the given array.</description>
</snippet>
8 changes: 8 additions & 0 deletions snippets/Helper/Helper-array-wrap.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
array_wrap(${1:\$array});
]]></content>
<tabTrigger>Helper::array_wrap</tabTrigger>
<scope>source.php</scope>
<description>Wraps the given value in an array. If the given value is already an array it will not be changed.</description>
</snippet>
8 changes: 8 additions & 0 deletions snippets/Helper/Helper-data-fill.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
data_fill(${1:\$data}, ${2:'products.desk.price'}, ${3:100});
]]></content>
<tabTrigger>Helper::data_fill</tabTrigger>
<scope>source.php</scope>
<description>Sets a missing value within a nested array or object using "dot" notation.</description>
</snippet>
8 changes: 8 additions & 0 deletions snippets/Helper/Helper-data-get.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
data_get(${1:\$data}, ${2:'products.desk.price'}, ${3:'default'});
]]></content>
<tabTrigger>Helper::data_get</tabTrigger>
<scope>source.php</scope>
<description>Retrieve a value from a nested array or object using "dot" notation.</description>
</snippet>
8 changes: 8 additions & 0 deletions snippets/Helper/Helper-data-set.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
data_set(${1:\$data}, ${2:'products.desk.price'}, ${3:100});
]]></content>
<tabTrigger>Helper::data_set</tabTrigger>
<scope>source.php</scope>
<description>Sets a value within a nested array or object using "dot" notation.</description>
</snippet>
8 changes: 0 additions & 8 deletions snippets/Helper/Helper-misc-cache_set.sublime-snippet

This file was deleted.

8 changes: 0 additions & 8 deletions snippets/Helper/Helper-misc-object_get.sublime-snippet

This file was deleted.

8 changes: 0 additions & 8 deletions snippets/Helper/Helper-strings_plural.sublime-snippet

This file was deleted.

2 changes: 1 addition & 1 deletion snippets/Schema/Schema-table-update.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
Schema::table('${1:users}', function(\$table) {
Schema::table('${1:users}', function(Blueprint \$table) {
${3://}
});
]]></content>
Expand Down

0 comments on commit 663c198

Please sign in to comment.