Created
December 18, 2019 14:15
-
-
Save miseeger/58726e0794d8b8b421d548801d16b710 to your computer and use it in GitHub Desktop.
PHP Property Snippet for VSCode
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
| "Property": { | |
| "prefix": "p.prop", | |
| "body": [ | |
| "private ${1:Type} \\$${2:propName};", | |
| "", | |
| "public function get${2/([\\w\\-]+)/${1:/capitalize}/}(): $1 ", | |
| "{", | |
| " return \\$this->$2;", | |
| "}", | |
| "", | |
| "public function set${2/([\\w\\-]+)/${1:/capitalize}/}($1 \\$value): void ", | |
| "{", | |
| " \\$this->$2 = \\$value;", | |
| "}" | |
| ], | |
| "description": "Property" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment