Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/config/ide-helper.php
10264 views
1
<?php
2
3
return [
4
5
/*
6
|--------------------------------------------------------------------------
7
| Filename
8
|--------------------------------------------------------------------------
9
|
10
| The default filename.
11
|
12
*/
13
14
'filename' => '_ide_helper.php',
15
16
/*
17
|--------------------------------------------------------------------------
18
| Models filename
19
|--------------------------------------------------------------------------
20
|
21
| The default filename for the models helper file.
22
|
23
*/
24
25
'models_filename' => '_ide_helper_models.php',
26
27
/*
28
|--------------------------------------------------------------------------
29
| PhpStorm meta filename
30
|--------------------------------------------------------------------------
31
|
32
| PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary
33
| files in it, should you need additional files for your project; e.g.
34
| `.phpstorm.meta.php/laravel_ide_Helper.php'.
35
|
36
*/
37
'meta_filename' => '.phpstorm.meta.php',
38
39
/*
40
|--------------------------------------------------------------------------
41
| Fluent helpers
42
|--------------------------------------------------------------------------
43
|
44
| Set to true to generate commonly used Fluent methods.
45
|
46
*/
47
48
'include_fluent' => false,
49
50
/*
51
|--------------------------------------------------------------------------
52
| Factory builders
53
|--------------------------------------------------------------------------
54
|
55
| Set to true to generate factory generators for better factory()
56
| method auto-completion.
57
|
58
| Deprecated for Laravel 8 or latest.
59
|
60
*/
61
62
'include_factory_builders' => false,
63
64
/*
65
|--------------------------------------------------------------------------
66
| Write model magic methods
67
|--------------------------------------------------------------------------
68
|
69
| Set to false to disable write magic methods of model.
70
|
71
*/
72
73
'write_model_magic_where' => false,
74
75
/*
76
|--------------------------------------------------------------------------
77
| Write model external Eloquent builder methods
78
|--------------------------------------------------------------------------
79
|
80
| Set to false to disable write external Eloquent builder methods.
81
|
82
*/
83
84
'write_model_external_builder_methods' => true,
85
86
/*
87
|--------------------------------------------------------------------------
88
| Write model relation count and exists properties
89
|--------------------------------------------------------------------------
90
|
91
| Set to false to disable writing of relation count and exists properties
92
| to model DocBlocks.
93
|
94
*/
95
96
'write_model_relation_count_properties' => false,
97
'write_model_relation_exists_properties' => false,
98
99
/*
100
|--------------------------------------------------------------------------
101
| Write Eloquent model mixins
102
|--------------------------------------------------------------------------
103
|
104
| This will add the necessary DocBlock mixins to the model class
105
| contained in the Laravel framework. This helps the IDE with
106
| auto-completion.
107
|
108
| Please be aware that this setting changes a file within the /vendor directory.
109
|
110
*/
111
112
'write_eloquent_model_mixins' => false,
113
114
/*
115
|--------------------------------------------------------------------------
116
| Helper files to include
117
|--------------------------------------------------------------------------
118
|
119
| Include helper files. By default not included, but can be toggled with the
120
| -- helpers (-H) option. Extra helper files can be included.
121
|
122
*/
123
124
'include_helpers' => false,
125
126
'helper_files' => [
127
base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
128
base_path() . '/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php',
129
],
130
131
/*
132
|--------------------------------------------------------------------------
133
| Model locations to include
134
|--------------------------------------------------------------------------
135
|
136
| Define in which directories the ide-helper:models command should look
137
| for models.
138
|
139
| glob patterns are supported to easier reach models in sub-directories,
140
| e.g. `app/Services/* /Models` (without the space).
141
|
142
*/
143
144
'model_locations' => [
145
'app/Models',
146
],
147
148
/*
149
|--------------------------------------------------------------------------
150
| Models to ignore
151
|--------------------------------------------------------------------------
152
|
153
| Define which models should be ignored.
154
|
155
*/
156
157
'ignored_models' => [
158
// App\MyModel::class,
159
],
160
161
/*
162
|--------------------------------------------------------------------------
163
| Models hooks
164
|--------------------------------------------------------------------------
165
|
166
| Define which hook classes you want to run for models to add custom information.
167
|
168
| Hooks should implement Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface.
169
|
170
*/
171
172
'model_hooks' => [
173
// App\Support\IdeHelper\MyModelHook::class
174
],
175
176
/*
177
|--------------------------------------------------------------------------
178
| Extra classes
179
|--------------------------------------------------------------------------
180
|
181
| These implementations are not really extended, but called with magic functions.
182
|
183
*/
184
185
'extra' => [
186
'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
187
'Session' => ['Illuminate\Session\Store'],
188
],
189
190
'magic' => [],
191
192
/*
193
|--------------------------------------------------------------------------
194
| Interface implementations
195
|--------------------------------------------------------------------------
196
|
197
| These interfaces will be replaced with the implementing class. Some interfaces
198
| are detected by the helpers, others can be listed below.
199
|
200
*/
201
202
'interfaces' => [
203
// App\MyInterface::class => App\MyImplementation::class,
204
],
205
206
/*
207
|--------------------------------------------------------------------------
208
| Support for camel cased models
209
|--------------------------------------------------------------------------
210
|
211
| There are some Laravel packages (such as Eloquence) that allow for accessing
212
| Eloquent model properties via camel case, instead of snake case.
213
|
214
| Enabling this option will support these packages by saving all model
215
| properties as camel case, instead of snake case.
216
|
217
| For example, normally you would see this:
218
|
219
| * @property \Illuminate\Support\Carbon $created_at
220
| * @property \Illuminate\Support\Carbon $updated_at
221
|
222
| With this enabled, the properties will be this:
223
|
224
| * @property \Illuminate\Support\Carbon $createdAt
225
| * @property \Illuminate\Support\Carbon $updatedAt
226
|
227
| Note, it is currently an all-or-nothing option.
228
|
229
*/
230
'model_camel_case_properties' => false,
231
232
/*
233
|--------------------------------------------------------------------------
234
| Property casts
235
|--------------------------------------------------------------------------
236
|
237
| Cast the given "real type" to the given "type".
238
|
239
*/
240
'type_overrides' => [
241
'integer' => 'int',
242
'boolean' => 'bool',
243
],
244
245
/*
246
|--------------------------------------------------------------------------
247
| Include DocBlocks from classes
248
|--------------------------------------------------------------------------
249
|
250
| Include DocBlocks from classes to allow additional code inspection for
251
| magic methods and properties.
252
|
253
*/
254
'include_class_docblocks' => false,
255
256
/*
257
|--------------------------------------------------------------------------
258
| Force FQN usage
259
|--------------------------------------------------------------------------
260
|
261
| Use the fully qualified (class) name in DocBlocks,
262
| even if the class exists in the same namespace
263
| or there is an import (use className) of the class.
264
|
265
*/
266
'force_fqn' => true,
267
268
/*
269
|--------------------------------------------------------------------------
270
| Use generics syntax
271
|--------------------------------------------------------------------------
272
|
273
| Use generics syntax within DocBlocks,
274
| e.g. `Collection<User>` instead of `Collection|User[]`.
275
|
276
*/
277
'use_generics_annotations' => true,
278
279
/*
280
|--------------------------------------------------------------------------
281
| Default return types for macros
282
|--------------------------------------------------------------------------
283
|
284
| Define default return types for macros without explicit return types.
285
| e.g. `\Illuminate\Database\Query\Builder::class => 'static'`,
286
| `\Illuminate\Support\Str::class => 'string'`
287
|
288
*/
289
'macro_default_return_types' => [
290
Illuminate\Http\Client\Factory::class => Illuminate\Http\Client\PendingRequest::class,
291
],
292
293
/*
294
|--------------------------------------------------------------------------
295
| Additional relation types
296
|--------------------------------------------------------------------------
297
|
298
| Sometimes it's needed to create custom relation types. The key of the array
299
| is the relationship method name. The value of the array is the fully-qualified
300
| class name of the relationship, e.g. `'relationName' => RelationShipClass::class`.
301
|
302
*/
303
'additional_relation_types' => [],
304
305
/*
306
|--------------------------------------------------------------------------
307
| Additional relation return types
308
|--------------------------------------------------------------------------
309
|
310
| When using custom relation types its possible for the class name to not contain
311
| the proper return type of the relation. The key of the array is the relationship
312
| method name. The value of the array is the return type of the relation ('many'
313
| or 'morphTo').
314
| e.g. `'relationName' => 'many'`.
315
|
316
*/
317
'additional_relation_return_types' => [],
318
319
/*
320
|--------------------------------------------------------------------------
321
| Enforce nullable Eloquent relationships on not null columns
322
|--------------------------------------------------------------------------
323
|
324
| When set to true (default), this option enforces nullable Eloquent relationships.
325
| However, in cases where the application logic ensures the presence of related
326
| records it may be desirable to set this option to false to avoid unwanted null warnings.
327
|
328
| Default: true
329
| A not null column with no foreign key constraint will have a "nullable" relationship.
330
| * @property int $not_null_column_with_no_foreign_key_constraint
331
| * @property-read BelongsToVariation|null $notNullColumnWithNoForeignKeyConstraint
332
|
333
| Option: false
334
| A not null column with no foreign key constraint will have a "not nullable" relationship.
335
| * @property int $not_null_column_with_no_foreign_key_constraint
336
| * @property-read BelongsToVariation $notNullColumnWithNoForeignKeyConstraint
337
|
338
*/
339
340
'enforce_nullable_relationships' => true,
341
342
/*
343
|--------------------------------------------------------------------------
344
| Run artisan commands after migrations to generate model helpers
345
|--------------------------------------------------------------------------
346
|
347
| The specified commands should run after migrations are finished running.
348
|
349
*/
350
'post_migrate' => [
351
// 'ide-helper:models --nowrite',
352
],
353
354
];
355
356