Skip to content

Instantly share code, notes, and snippets.

@ahungry
Created August 30, 2016 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahungry/ebed3156a3d9438aca0caf618b375253 to your computer and use it in GitHub Desktop.
Save ahungry/ebed3156a3d9438aca0caf618b375253 to your computer and use it in GitHub Desktop.
Etter
# -*- mode: snippet -*-
# name: typed getter/setter/property of class
# key: tetter
# --
/** @var $2 */
private $$1;
/**
* @return $2 Return the set value
*/
public function get${1:$(upcase-initials yas-text)}(): $2
{
return $this->$1;
}
/**
* @param $2 $$1 Set the value
* @return $this
*/
public function set${1:$(upcase-initials yas-text)}($2 $$1)
{
$this->$1 = $$1;
return $this;
}
# -*- mode: snippet -*-
# name: getter/setter/property of class
# key: etter
# --
/** @var $2 */
private $$1;
/**
* @return $2 Return the set value
*/
public function get${1:$(upcase-initials yas-text)}()
{
return $this->$1;
}
/**
* @param $2 $$1 Set the value
* @return $this
*/
public function set${1:$(upcase-initials yas-text)}($$1)
{
$this->$1 = $$1;
return $this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment