Merge pull request #195 from MichaelThessel/master
Improved PHP snippets
This commit is contained in:
commit
40479af955
@ -28,9 +28,9 @@ snippet use
|
||||
use ${1:Foo\Bar\Baz};
|
||||
${2}
|
||||
snippet c
|
||||
${1:abstract }class ${2:`Filename()`}
|
||||
class ${1:`Filename()`}
|
||||
{
|
||||
${3}
|
||||
${2}
|
||||
}
|
||||
snippet i
|
||||
interface ${1:`Filename()`}
|
||||
@ -46,9 +46,9 @@ snippet f
|
||||
}
|
||||
# method
|
||||
snippet m
|
||||
${1:abstract }${2:protected}${3: static} function ${4:foo}(${5:array }${6:$bar})
|
||||
${1:protected} function ${2:foo}()
|
||||
{
|
||||
${7}
|
||||
${3}
|
||||
}
|
||||
# setter method
|
||||
snippet sm
|
||||
@ -394,3 +394,12 @@ snippet rett
|
||||
return true;
|
||||
snippet retf
|
||||
return false;
|
||||
snippet am
|
||||
$${1:foo} = array_map(function($${2:v}) {
|
||||
${3}
|
||||
return $$2;
|
||||
}, $$1);
|
||||
snippet aw
|
||||
array_walk($${1:foo}, function(&$${2:v}, $${3:k}) {
|
||||
$$2 = ${4};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user