Created
August 30, 2016 16:06
-
-
Save ahungry/ebed3156a3d9438aca0caf618b375253 to your computer and use it in GitHub Desktop.
Etter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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