@enjoys/context-engine 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/data/commands/adb.json +322 -0
  2. package/data/commands/alembic.json +301 -0
  3. package/data/commands/artisan.json +277 -0
  4. package/data/commands/atlas.json +426 -0
  5. package/data/commands/auth0.json +648 -0
  6. package/data/commands/bat.json +84 -0
  7. package/data/commands/bundle.json +321 -0
  8. package/data/commands/composer.json +507 -0
  9. package/data/commands/dart.json +216 -0
  10. package/data/commands/dbmate.json +257 -0
  11. package/data/commands/docker-compose.json +384 -0
  12. package/data/commands/drizzle-kit.json +217 -0
  13. package/data/commands/expo.json +65 -0
  14. package/data/commands/fastlane.json +243 -0
  15. package/data/commands/fd.json +86 -0
  16. package/data/commands/flutter.json +298 -0
  17. package/data/commands/flyway.json +261 -0
  18. package/data/commands/fzf.json +103 -0
  19. package/data/commands/gem.json +267 -0
  20. package/data/commands/jq.json +100 -0
  21. package/data/commands/k9s.json +62 -0
  22. package/data/commands/liquibase.json +399 -0
  23. package/data/commands/manifest.json +619 -0
  24. package/data/commands/minikube.json +60 -0
  25. package/data/commands/ng.json +64 -0
  26. package/data/commands/nuxt.json +60 -0
  27. package/data/commands/php.json +157 -0
  28. package/data/commands/pm2.json +259 -0
  29. package/data/commands/pod.json +175 -0
  30. package/data/commands/prisma.json +257 -0
  31. package/data/commands/rails.json +372 -0
  32. package/data/commands/rake.json +360 -0
  33. package/data/commands/react-native.json +57 -0
  34. package/data/commands/rg.json +103 -0
  35. package/data/commands/rspec.json +257 -0
  36. package/data/commands/ruby.json +108 -0
  37. package/data/commands/sequelize.json +342 -0
  38. package/data/commands/snyk.json +442 -0
  39. package/data/commands/sonar-scanner.json +219 -0
  40. package/data/commands/stripe.json +314 -0
  41. package/data/commands/symfony.json +449 -0
  42. package/data/commands/tmux.json +197 -0
  43. package/data/commands/trivy.json +367 -0
  44. package/data/commands/twilio.json +382 -0
  45. package/data/commands/typeorm.json +262 -0
  46. package/data/commands/vue.json +60 -0
  47. package/data/commands/wp.json +857 -0
  48. package/data/commands/xcodebuild.json +141 -0
  49. package/data/commands/yq.json +57 -0
  50. package/data/completion/bash.json +1184 -0
  51. package/data/completion/c.json +1067 -0
  52. package/data/completion/cpp.json +824 -0
  53. package/data/completion/csharp.json +860 -0
  54. package/data/completion/dockerfile.json +536 -0
  55. package/data/completion/go.json +1346 -0
  56. package/data/completion/html.json +806 -0
  57. package/data/completion/java.json +1112 -0
  58. package/data/completion/javascript.json +914 -0
  59. package/data/completion/lua.json +968 -0
  60. package/data/completion/php.json +1535 -0
  61. package/data/completion/python.json +1427 -0
  62. package/data/completion/ruby.json +1531 -0
  63. package/data/completion/rust.json +698 -0
  64. package/data/completion/sql.json +887 -0
  65. package/data/completion/toml.json +428 -0
  66. package/data/completion/typescript.json +338 -0
  67. package/data/completion/yaml.json +563 -0
  68. package/data/defination/bash.json +565 -0
  69. package/data/defination/c.json +865 -0
  70. package/data/defination/cpp.json +348 -0
  71. package/data/defination/csharp.json +144 -0
  72. package/data/defination/dockerfile.json +113 -0
  73. package/data/defination/go.json +561 -0
  74. package/data/defination/html.json +559 -0
  75. package/data/defination/java.json +184 -0
  76. package/data/defination/javascript.json +265 -0
  77. package/data/defination/lua.json +181 -0
  78. package/data/defination/php.json +726 -0
  79. package/data/defination/python.json +717 -0
  80. package/data/defination/ruby.json +670 -0
  81. package/data/defination/rust.json +207 -0
  82. package/data/defination/sql.json +473 -0
  83. package/data/defination/toml.json +251 -0
  84. package/data/defination/typescript.json +29 -0
  85. package/data/defination/yaml.json +197 -0
  86. package/data/hover/bash.json +245 -0
  87. package/data/hover/c.json +265 -0
  88. package/data/hover/cpp.json +210 -0
  89. package/data/hover/csharp.json +290 -0
  90. package/data/hover/dockerfile.json +145 -0
  91. package/data/hover/go.json +580 -0
  92. package/data/hover/html.json +250 -0
  93. package/data/hover/java.json +395 -0
  94. package/data/hover/javascript.json +330 -0
  95. package/data/hover/lua.json +265 -0
  96. package/data/hover/php.json +300 -0
  97. package/data/hover/python.json +380 -0
  98. package/data/hover/ruby.json +265 -0
  99. package/data/hover/rust.json +275 -0
  100. package/data/hover/sql.json +230 -0
  101. package/data/hover/toml.json +145 -0
  102. package/data/hover/typescript.json +120 -0
  103. package/data/hover/yaml.json +165 -0
  104. package/data/manifest.json +242 -0
  105. package/package.json +1 -1
@@ -0,0 +1,300 @@
1
+ {
2
+ "language": "php",
3
+ "hovers": {
4
+ "echo": {
5
+ "contents": [
6
+ { "value": "```php\necho(string ...$expressions): void\n```\nOutputs one or more expressions. `echo` is not a function but a language construct, so parentheses are not required. It has no return value." }
7
+ ]
8
+ },
9
+ "print": {
10
+ "contents": [
11
+ { "value": "```php\nprint(string $expression): int\n```\nOutputs a string. `print` is a language construct that accepts a single argument and always returns `1`. Slightly slower than `echo`." }
12
+ ]
13
+ },
14
+ "var_dump": {
15
+ "contents": [
16
+ { "value": "```php\nvar_dump(mixed $value, mixed ...$values): void\n```\nDisplays structured information about one or more expressions including its type and value. Arrays and objects are explored recursively with values indented to show structure." }
17
+ ]
18
+ },
19
+ "print_r": {
20
+ "contents": [
21
+ { "value": "```php\nprint_r(mixed $value, bool $return = false): string|bool\n```\nPrints human-readable information about a variable. If `$return` is `true`, returns the output as a string instead of printing it." }
22
+ ]
23
+ },
24
+ "var_export": {
25
+ "contents": [
26
+ { "value": "```php\nvar_export(mixed $value, bool $return = false): ?string\n```\nOutputs or returns a parsable string representation of a variable. Differs from `var_dump()` in that the returned representation is valid PHP code." }
27
+ ]
28
+ },
29
+ "printf": {
30
+ "contents": [
31
+ { "value": "```php\nprintf(string $format, mixed ...$values): int\n```\nOutputs a formatted string. The format string may contain conversion specifications starting with `%` (e.g. `%s`, `%d`, `%f`). Returns the length of the outputted string." }
32
+ ]
33
+ },
34
+ "sprintf": {
35
+ "contents": [
36
+ { "value": "```php\nsprintf(string $format, mixed ...$values): string\n```\nReturns a string produced according to the formatting string `$format`. Uses the same format specifiers as `printf()`." }
37
+ ]
38
+ },
39
+ "strlen": {
40
+ "contents": [
41
+ { "value": "```php\nstrlen(string $string): int\n```\nReturns the length of the given string in bytes. For multi-byte characters, use `mb_strlen()` instead." }
42
+ ]
43
+ },
44
+ "strpos": {
45
+ "contents": [
46
+ { "value": "```php\nstrpos(string $haystack, string $needle, int $offset = 0): int|false\n```\nFinds the numeric position of the first occurrence of `$needle` in `$haystack`. Returns `false` if not found. Use `!== false` for comparison." }
47
+ ]
48
+ },
49
+ "strrpos": {
50
+ "contents": [
51
+ { "value": "```php\nstrrpos(string $haystack, string $needle, int $offset = 0): int|false\n```\nFinds the numeric position of the last occurrence of `$needle` in `$haystack`. Returns `false` if not found." }
52
+ ]
53
+ },
54
+ "substr": {
55
+ "contents": [
56
+ { "value": "```php\nsubstr(string $string, int $offset, ?int $length = null): string\n```\nReturns the portion of `$string` specified by the `$offset` and `$length` parameters. Negative offset counts from the end of the string." }
57
+ ]
58
+ },
59
+ "str_replace": {
60
+ "contents": [
61
+ { "value": "```php\nstr_replace(\n array|string $search,\n array|string $replace,\n string|array $subject,\n int &$count = null\n): string|array\n```\nReplaces all occurrences of `$search` with `$replace` in `$subject`. If `$search` and `$replace` are arrays, a mapping is applied." }
62
+ ]
63
+ },
64
+ "str_contains": {
65
+ "contents": [
66
+ { "value": "```php\nstr_contains(string $haystack, string $needle): bool\n```\n(PHP 8.0+) Performs a case-sensitive check to determine if `$haystack` contains `$needle`. Returns `true` if found, `false` otherwise." }
67
+ ]
68
+ },
69
+ "str_starts_with": {
70
+ "contents": [
71
+ { "value": "```php\nstr_starts_with(string $haystack, string $needle): bool\n```\n(PHP 8.0+) Performs a case-sensitive check to determine if `$haystack` begins with `$needle`." }
72
+ ]
73
+ },
74
+ "str_ends_with": {
75
+ "contents": [
76
+ { "value": "```php\nstr_ends_with(string $haystack, string $needle): bool\n```\n(PHP 8.0+) Performs a case-sensitive check to determine if `$haystack` ends with `$needle`." }
77
+ ]
78
+ },
79
+ "strtolower": {
80
+ "contents": [
81
+ { "value": "```php\nstrtolower(string $string): string\n```\nReturns a string with all ASCII alphabetic characters converted to lowercase. For Unicode, use `mb_strtolower()`." }
82
+ ]
83
+ },
84
+ "strtoupper": {
85
+ "contents": [
86
+ { "value": "```php\nstrtoupper(string $string): string\n```\nReturns a string with all ASCII alphabetic characters converted to uppercase. For Unicode, use `mb_strtoupper()`." }
87
+ ]
88
+ },
89
+ "trim": {
90
+ "contents": [
91
+ { "value": "```php\ntrim(string $string, string $characters = \" \\n\\r\\t\\v\\0\"): string\n```\nStrips whitespace (or other characters) from the beginning and end of a string. Without the second parameter, trims common whitespace characters." }
92
+ ]
93
+ },
94
+ "ltrim": {
95
+ "contents": [
96
+ { "value": "```php\nltrim(string $string, string $characters = \" \\n\\r\\t\\v\\0\"): string\n```\nStrips whitespace (or other characters) from the beginning of a string." }
97
+ ]
98
+ },
99
+ "rtrim": {
100
+ "contents": [
101
+ { "value": "```php\nrtrim(string $string, string $characters = \" \\n\\r\\t\\v\\0\"): string\n```\nStrips whitespace (or other characters) from the end of a string. `chop()` is an alias of this function." }
102
+ ]
103
+ },
104
+ "explode": {
105
+ "contents": [
106
+ { "value": "```php\nexplode(string $separator, string $string, int $limit = PHP_INT_MAX): array\n```\nReturns an array of strings split by `$separator`. If `$limit` is set, the returned array will contain a maximum of `$limit` elements." }
107
+ ]
108
+ },
109
+ "implode": {
110
+ "contents": [
111
+ { "value": "```php\nimplode(string $separator, array $array): string\n```\nJoins array elements with the `$separator` string and returns the resulting string. `join()` is an alias." }
112
+ ]
113
+ },
114
+ "htmlspecialchars": {
115
+ "contents": [
116
+ { "value": "```php\nhtmlspecialchars(\n string $string,\n int $flags = ENT_QUOTES | ENT_SUBSTITUTE,\n ?string $encoding = null,\n bool $double_encode = true\n): string\n```\nConverts special characters (`&`, `\"`, `'`, `<`, `>`) to HTML entities. Essential for preventing XSS attacks when outputting user data." }
117
+ ]
118
+ },
119
+ "urlencode": {
120
+ "contents": [
121
+ { "value": "```php\nurlencode(string $string): string\n```\nReturns a string in which all non-alphanumeric characters except `-_.` have been replaced with a percent sign followed by two hex digits, and spaces are encoded as `+`." }
122
+ ]
123
+ },
124
+ "base64_encode": {
125
+ "contents": [
126
+ { "value": "```php\nbase64_encode(string $string): string\n```\nEncodes the given data with Base64. This encoding is designed to make binary data survive transport through non-binary-safe channels." }
127
+ ]
128
+ },
129
+ "base64_decode": {
130
+ "contents": [
131
+ { "value": "```php\nbase64_decode(string $string, bool $strict = false): string|false\n```\nDecodes a Base64-encoded string. If `$strict` is `true`, returns `false` if input contains characters outside the Base64 alphabet." }
132
+ ]
133
+ },
134
+ "md5": {
135
+ "contents": [
136
+ { "value": "```php\nmd5(string $string, bool $binary = false): string\n```\nCalculates the MD5 hash of a string. Returns a 32-character hexadecimal number. **Not suitable for cryptographic purposes** — use `password_hash()` for passwords." }
137
+ ]
138
+ },
139
+ "number_format": {
140
+ "contents": [
141
+ { "value": "```php\nnumber_format(\n float $num,\n int $decimals = 0,\n ?string $decimal_separator = '.',\n ?string $thousands_separator = ','\n): string\n```\nFormats a number with grouped thousands and optional decimal places." }
142
+ ]
143
+ },
144
+ "array_push": {
145
+ "contents": [
146
+ { "value": "```php\narray_push(array &$array, mixed ...$values): int\n```\nPushes one or more elements onto the end of an array. Returns the new number of elements. Equivalent to `$array[] = $value` for a single value." }
147
+ ]
148
+ },
149
+ "array_pop": {
150
+ "contents": [
151
+ { "value": "```php\narray_pop(array &$array): mixed\n```\nPops and returns the last element of the array, shortening it by one element. Returns `null` if the array is empty." }
152
+ ]
153
+ },
154
+ "array_shift": {
155
+ "contents": [
156
+ { "value": "```php\narray_shift(array &$array): mixed\n```\nShifts the first value of the array off and returns it, shortening the array by one element and re-indexing numeric keys." }
157
+ ]
158
+ },
159
+ "array_unshift": {
160
+ "contents": [
161
+ { "value": "```php\narray_unshift(array &$array, mixed ...$values): int\n```\nPrepends one or more elements to the beginning of an array. Returns the new number of elements. All numerical keys are re-indexed starting from zero." }
162
+ ]
163
+ },
164
+ "array_merge": {
165
+ "contents": [
166
+ { "value": "```php\narray_merge(array ...$arrays): array\n```\nMerges one or more arrays. Values with numeric keys are appended and re-indexed; values with string keys are overwritten by later arrays." }
167
+ ]
168
+ },
169
+ "array_map": {
170
+ "contents": [
171
+ { "value": "```php\narray_map(?callable $callback, array $array, array ...$arrays): array\n```\nApplies the `$callback` to the elements of the given arrays and returns a new array containing the results. If `$callback` is `null`, creates an array of arrays." }
172
+ ]
173
+ },
174
+ "array_filter": {
175
+ "contents": [
176
+ { "value": "```php\narray_filter(array $array, ?callable $callback = null, int $mode = 0): array\n```\nFilters elements of an array using a callback function. If no callback is supplied, all falsy entries are removed. Keys are preserved." }
177
+ ]
178
+ },
179
+ "array_reduce": {
180
+ "contents": [
181
+ { "value": "```php\narray_reduce(array $array, callable $callback, mixed $initial = null): mixed\n```\nIteratively reduces the array to a single value using a callback. The callback receives `($carry, $item)` where `$carry` is the return value of the previous iteration." }
182
+ ]
183
+ },
184
+ "array_keys": {
185
+ "contents": [
186
+ { "value": "```php\narray_keys(array $array, mixed $filter_value = null, bool $strict = false): array\n```\nReturns all the keys or a subset of the keys of an array. If `$filter_value` is specified, only keys containing that value are returned." }
187
+ ]
188
+ },
189
+ "array_values": {
190
+ "contents": [
191
+ { "value": "```php\narray_values(array $array): array\n```\nReturns all the values from the array and indexes the array numerically. Useful for re-indexing after `array_filter()`." }
192
+ ]
193
+ },
194
+ "array_unique": {
195
+ "contents": [
196
+ { "value": "```php\narray_unique(array $array, int $flags = SORT_STRING): array\n```\nRemoves duplicate values from an array. The first occurrence of each value is kept and keys are preserved." }
197
+ ]
198
+ },
199
+ "array_key_exists": {
200
+ "contents": [
201
+ { "value": "```php\narray_key_exists(string|int $key, array $array): bool\n```\nReturns `true` if the given key/index exists in the array. Unlike `isset()`, returns `true` even if the value is `null`." }
202
+ ]
203
+ },
204
+ "in_array": {
205
+ "contents": [
206
+ { "value": "```php\nin_array(mixed $needle, array $haystack, bool $strict = false): bool\n```\nSearches for `$needle` in `$haystack`. If `$strict` is `true`, uses identity comparison (`===`). Returns `true` if found." }
207
+ ]
208
+ },
209
+ "count": {
210
+ "contents": [
211
+ { "value": "```php\ncount(Countable|array $value, int $mode = COUNT_NORMAL): int\n```\nCounts all elements in an array or a `Countable` object. If `$mode` is `COUNT_RECURSIVE`, counts elements of multidimensional arrays recursively." }
212
+ ]
213
+ },
214
+ "sort": {
215
+ "contents": [
216
+ { "value": "```php\nsort(array &$array, int $flags = SORT_REGULAR): true\n```\nSorts an array in ascending order by value. Existing keys are discarded and the array is re-indexed. Modifies the array in place." }
217
+ ]
218
+ },
219
+ "usort": {
220
+ "contents": [
221
+ { "value": "```php\nusort(array &$array, callable $callback): true\n```\nSorts an array by values using a user-defined comparison function. The callback must return an integer less than, equal to, or greater than zero." }
222
+ ]
223
+ },
224
+ "array_search": {
225
+ "contents": [
226
+ { "value": "```php\narray_search(mixed $needle, array $haystack, bool $strict = false): int|string|false\n```\nSearches the array for `$needle` and returns the corresponding key if found, `false` otherwise. Use `$strict = true` for type-safe comparison." }
227
+ ]
228
+ },
229
+ "array_column": {
230
+ "contents": [
231
+ { "value": "```php\narray_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array\n```\nReturns the values from a single column of the input array. Optionally, an `$index_key` may be provided to index the returned array by that column." }
232
+ ]
233
+ },
234
+ "array_chunk": {
235
+ "contents": [
236
+ { "value": "```php\narray_chunk(array $array, int $length, bool $preserve_keys = false): array\n```\nSplits an array into chunks of `$length` size. The last chunk may contain fewer elements." }
237
+ ]
238
+ },
239
+ "compact": {
240
+ "contents": [
241
+ { "value": "```php\ncompact(array|string $var_name, array|string ...$var_names): array\n```\nCreates an array containing variables and their values. The variable names are passed as strings." }
242
+ ]
243
+ },
244
+ "range": {
245
+ "contents": [
246
+ { "value": "```php\nrange(string|int|float $start, string|int|float $end, int|float $step = 1): array\n```\nCreates an array containing a range of elements. Works with integers, floats, and single characters." }
247
+ ]
248
+ },
249
+ "json_encode": {
250
+ "contents": [
251
+ { "value": "```php\njson_encode(mixed $value, int $flags = 0, int $depth = 512): string|false\n```\nReturns the JSON representation of a value. Common flags: `JSON_PRETTY_PRINT`, `JSON_UNESCAPED_UNICODE`, `JSON_THROW_ON_ERROR`." }
252
+ ]
253
+ },
254
+ "json_decode": {
255
+ "contents": [
256
+ { "value": "```php\njson_decode(\n string $json,\n ?bool $associative = null,\n int $depth = 512,\n int $flags = 0\n): mixed\n```\nDecodes a JSON string. When `$associative` is `true`, JSON objects are returned as associative arrays instead of `stdClass` objects." }
257
+ ]
258
+ },
259
+ "file_get_contents": {
260
+ "contents": [
261
+ { "value": "```php\nfile_get_contents(\n string $filename,\n bool $use_include_path = false,\n ?resource $context = null,\n int $offset = 0,\n ?int $length = null\n): string|false\n```\nReads entire file into a string. Preferred way to read file contents. Also supports HTTP/HTTPS URLs when `allow_url_fopen` is enabled." }
262
+ ]
263
+ },
264
+ "file_put_contents": {
265
+ "contents": [
266
+ { "value": "```php\nfile_put_contents(\n string $filename,\n mixed $data,\n int $flags = 0,\n ?resource $context = null\n): int|false\n```\nWrites data to a file. Equivalent to calling `fopen()`, `fwrite()`, and `fclose()`. Use `FILE_APPEND` flag to append instead of overwrite." }
267
+ ]
268
+ },
269
+ "isset": {
270
+ "contents": [
271
+ { "value": "```php\nisset(mixed $var, mixed ...$vars): bool\n```\nDetermines if a variable is declared and is different than `null`. If multiple parameters are supplied, returns `true` only if all of them are set. Does not generate a warning if the variable doesn't exist." }
272
+ ]
273
+ },
274
+ "empty": {
275
+ "contents": [
276
+ { "value": "```php\nempty(mixed $var): bool\n```\nDetermines whether a variable is considered empty. The following are empty: `\"\"`, `0`, `0.0`, `\"0\"`, `null`, `false`, `[]`, and unset variables." }
277
+ ]
278
+ },
279
+ "header": {
280
+ "contents": [
281
+ { "value": "```php\nheader(string $header, bool $replace = true, int $response_code = 0): void\n```\nSends a raw HTTP header. Must be called before any actual output is sent. Use `$replace = false` to send multiple headers of the same type." }
282
+ ]
283
+ },
284
+ "die": {
285
+ "contents": [
286
+ { "value": "```php\ndie(string|int $message = \"\"): never\n```\nEquivalent to `exit()`. Outputs a message and terminates the current script. If `$message` is an integer, it will be used as the exit status." }
287
+ ]
288
+ },
289
+ "date": {
290
+ "contents": [
291
+ { "value": "```php\ndate(string $format, ?int $timestamp = null): string\n```\nReturns a string formatted according to the given format using the given timestamp or the current time if no timestamp is given. Common format chars: `Y` (year), `m` (month), `d` (day), `H` (hour), `i` (minutes), `s` (seconds)." }
292
+ ]
293
+ },
294
+ "strtotime": {
295
+ "contents": [
296
+ { "value": "```php\nstrtotime(string $datetime, ?int $baseTimestamp = null): int|false\n```\nParses an English textual datetime description into a Unix timestamp. Supports relative formats like `'+1 day'`, `'next Monday'`, `'last month'`." }
297
+ ]
298
+ }
299
+ }
300
+ }