mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
Restore preexisting php snippets (#182929)
That shouldn't have been deleted in #174889 And also bring back one constructor snippet
This commit is contained in:
parent
33164f0d85
commit
047b9cd0f5
|
@ -68,6 +68,14 @@
|
|||
],
|
||||
"description": "Class definition"
|
||||
},
|
||||
"class __construct": {
|
||||
"prefix": "construct",
|
||||
"body": [
|
||||
"${1|public,private,protected|} function __construct(${2:${3:Type} $${4:var}${5: = ${6:null}}}$7) {",
|
||||
"\t\\$this->${4:var} = $${4:var};$0",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"class function …": {
|
||||
"prefix": "class_fun",
|
||||
"body": [
|
||||
|
@ -108,6 +116,24 @@
|
|||
],
|
||||
"description": "Do-While loop"
|
||||
},
|
||||
"else …": {
|
||||
"prefix": "else",
|
||||
"body": [
|
||||
"else {",
|
||||
"\t${0:# code...}",
|
||||
"}"
|
||||
],
|
||||
"description": "Else block"
|
||||
},
|
||||
"elseif …": {
|
||||
"prefix": "elseif",
|
||||
"body": [
|
||||
"elseif (${1:condition}) {",
|
||||
"\t${0:# code...}",
|
||||
"}"
|
||||
],
|
||||
"description": "Elseif block"
|
||||
},
|
||||
"for …": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
|
@ -276,6 +302,19 @@
|
|||
],
|
||||
"description": "Switch block"
|
||||
},
|
||||
"$this->…": {
|
||||
"prefix": "this",
|
||||
"body": "\\$this->$0;",
|
||||
"description": "$this->..."
|
||||
},
|
||||
"Throw Exception": {
|
||||
"prefix": "throw",
|
||||
"body": [
|
||||
"throw new $1Exception(${2:\"${3:Error Processing Request}\"}${4:, ${5:1}});",
|
||||
"$0"
|
||||
],
|
||||
"description": "Throw exception"
|
||||
},
|
||||
"trait …": {
|
||||
"prefix": "trait",
|
||||
"body": [
|
||||
|
|
Loading…
Reference in a new issue