Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6821579

Browse files
authored
Construct php 8 (rafamadriz#468)
1 parent04cb5c7 commit6821579

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

‎snippets/php/php.json‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,26 @@
2525
"function __construct": {
2626
"prefix":"con",
2727
"body": [
28-
"${1:public} function __construct(${2:${3:Type}\\$${4:var}${5: = ${6:null}}}) {",
29-
"\t\\$this->${4:var} =\\$${4:var};$0",
28+
"public function __construct(${1: priarg}) {",
3029
"}"
31-
]
30+
],
31+
"description":"Create __construct method using the last php syntax."
32+
},
33+
"Private argument": {
34+
"prefix":"priarg",
35+
"body": [
36+
"${1:private} ${2:${3:Type}\\$${4:var}${5: = ${6:null}}}"
37+
],
38+
"description":"Private argument to use on __construct method."
39+
},
40+
"function __construct (php 7 or lower)": {
41+
"prefix":"con7",
42+
"body": [
43+
"public function __construct(${1:${2:Type}\\$${3:var}${4: = ${5:null}}}) {",
44+
"\t\\$this->${3:var} =\\$${3:var};$0",
45+
"}"
46+
],
47+
"description":"Create a __construct method using syntax <= 7.4."
3248
},
3349
"PHPDoc property": {
3450
"prefix":"doc_v",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp