mirror of
https://github.com/rafamadriz/friendly-snippets
synced 2024-09-16 22:14:02 +02:00
Construct php 8 (#468)
This commit is contained in:
parent
04cb5c749f
commit
682157939e
1 changed files with 19 additions and 3 deletions
|
@ -25,10 +25,26 @@
|
|||
"function __construct": {
|
||||
"prefix": "con",
|
||||
"body": [
|
||||
"${1:public} function __construct(${2:${3:Type} \\$${4:var}${5: = ${6:null}}}) {",
|
||||
"\t\\$this->${4:var} = \\$${4:var};$0",
|
||||
"public function __construct(${1: priarg}) {",
|
||||
"}"
|
||||
]
|
||||
],
|
||||
"description": "Create __construct method using the last php syntax."
|
||||
},
|
||||
"Private argument": {
|
||||
"prefix": "priarg",
|
||||
"body": [
|
||||
"${1:private} ${2:${3:Type} \\$${4:var}${5: = ${6:null}}}"
|
||||
],
|
||||
"description": "Private argument to use on __construct method."
|
||||
},
|
||||
"function __construct (php 7 or lower)": {
|
||||
"prefix": "con7",
|
||||
"body": [
|
||||
"public function __construct(${1:${2:Type} \\$${3:var}${4: = ${5:null}}}) {",
|
||||
"\t\\$this->${3:var} = \\$${3:var};$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a __construct method using syntax <= 7.4."
|
||||
},
|
||||
"PHPDoc property": {
|
||||
"prefix": "doc_v",
|
||||
|
|
Loading…
Reference in a new issue