update snippets

This commit is contained in:
Simon Vieille 2022-05-03 21:25:33 +02:00
parent 0281a6a11e
commit a81b5bce7d
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -41,26 +41,14 @@ $1
endsnippet
snippet gs "Getter and setter"
/**
* Set the value of "$1".
*
* @param $2 \$$1
*
* @return $3
*/
public function set${1/\w+\s*/\u$0/g}(\$$1)
public function set${1/\w+\s*/\u$0/g}($2 \$$1): $3
{
$this->$1 = \$$1;
return \$this;
}
/**
* Get the value of "$1".
*
* @return $2
*/
public function get${1/\w+\s*/\u$0/g}()
public function get${1/\w+\s*/\u$0/g}(): $2
{
return \$this->$1;
}