Files
nvim/lua/snippets/php.json
2025-05-02 20:58:31 +01:00

79 lines
2.0 KiB
JSON

{
"Dump function": {
"prefix": "du",
"body": [
"dump($0);"
],
"description": "Dump variable"
},
"Type dump function": {
"prefix": "dt",
"body": [
"\\PhpStan\\dumpType($0);"
],
"description": "Dump PHPStan type"
},
"Test case": {
"prefix": "test",
"body": [
"test($1, function () {",
" $0",
"});"
],
"description": "Test case"
},
"Create doc block": {
"prefix": "/**",
"body": [
"/**",
" * $0",
" */"
]
},
"DocBlock property": {
"prefix": "@p",
"body": "@property $1 $$0",
"description": "DocBlock property"
},
"DocBlock boolean property": {
"prefix": "@pb",
"body": "@property bool $$0",
"description": "DocBlock boolean property"
},
"DocBlock string property": {
"prefix": "@ps",
"body": "@property string $$0",
"description": "DocBlock string property"
},
"DocBlock int property": {
"prefix": "@pi",
"body": "@property int $$0",
"description": "DocBlock int property"
},
"DocBlock Collection property": {
"prefix": "@pc",
"body": "@property \\Illuminate\\Support\\Collection<int, $1> $$0",
"description": "DocBlock int property"
},
"DocBlock date property": {
"prefix": "@pd",
"body": "@property \\Illuminate\\Support\\Carbon $$0",
"description": "DocBlock date property"
},
"DocBlock model properties": {
"prefix": "@pp",
"body": [
"/**",
" * @property int $$id",
" * $1",
" * @property \\Illuminate\\Support\\Carbon $$created_at",
" * @property \\Illuminate\\Support\\Carbon $$updated_at",
" *",
" * Relationships",
" * $2",
" */"
],
"description": "DocBlock model properties"
}
}