ide-helper.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Filename & Format
  6. |--------------------------------------------------------------------------
  7. |
  8. | The default filename (without extension) and the format (php or json)
  9. |
  10. */
  11. 'filename' => '_ide_helper',
  12. 'format' => 'php',
  13. /*
  14. |--------------------------------------------------------------------------
  15. | Where to write the PhpStorm specific meta file
  16. |--------------------------------------------------------------------------
  17. |
  18. | PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary
  19. | files in it, should you need additional files for your project; e.g.
  20. | `.phpstorm.meta.php/laravel_ide_Helper.php'.
  21. |
  22. */
  23. 'meta_filename' => '.phpstorm.meta.php',
  24. /*
  25. |--------------------------------------------------------------------------
  26. | Fluent helpers
  27. |--------------------------------------------------------------------------
  28. |
  29. | Set to true to generate commonly used Fluent methods
  30. |
  31. */
  32. 'include_fluent' => false,
  33. /*
  34. |--------------------------------------------------------------------------
  35. | Factory Builders
  36. |--------------------------------------------------------------------------
  37. |
  38. | Set to true to generate factory generators for better factory()
  39. | method auto-completion.
  40. |
  41. */
  42. 'include_factory_builders' => false,
  43. /*
  44. |--------------------------------------------------------------------------
  45. | Write Model Magic methods
  46. |--------------------------------------------------------------------------
  47. |
  48. | Set to false to disable write magic methods of model
  49. |
  50. */
  51. 'write_model_magic_where' => true,
  52. /*
  53. |--------------------------------------------------------------------------
  54. | Write Model relation count properties
  55. |--------------------------------------------------------------------------
  56. |
  57. | Set to false to disable writing of relation count properties to model DocBlocks.
  58. |
  59. */
  60. 'write_model_relation_count_properties' => true,
  61. /*
  62. |--------------------------------------------------------------------------
  63. | Write Eloquent Model Mixins
  64. |--------------------------------------------------------------------------
  65. |
  66. | This will add the necessary DocBlock mixins to the model class
  67. | contained in the Laravel Framework. This helps the IDE with
  68. | auto-completion.
  69. |
  70. | Please be aware that this setting changes a file within the /vendor directory.
  71. |
  72. */
  73. 'write_eloquent_model_mixins' => false,
  74. /*
  75. |--------------------------------------------------------------------------
  76. | Helper files to include
  77. |--------------------------------------------------------------------------
  78. |
  79. | Include helper files. By default not included, but can be toggled with the
  80. | -- helpers (-H) option. Extra helper files can be included.
  81. |
  82. */
  83. 'include_helpers' => false,
  84. 'helper_files' => [
  85. base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
  86. ],
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Model locations to include
  90. |--------------------------------------------------------------------------
  91. |
  92. | Define in which directories the ide-helper:models command should look
  93. | for models.
  94. |
  95. | glob patterns are supported to easier reach models in sub-directories,
  96. | e.g. `app/Services/* /Models` (without the space)
  97. |
  98. */
  99. 'model_locations' => [
  100. 'app',
  101. ],
  102. /*
  103. |--------------------------------------------------------------------------
  104. | Models to ignore
  105. |--------------------------------------------------------------------------
  106. |
  107. | Define which models should be ignored.
  108. |
  109. */
  110. 'ignored_models' => [
  111. ],
  112. /*
  113. |--------------------------------------------------------------------------
  114. | Extra classes
  115. |--------------------------------------------------------------------------
  116. |
  117. | These implementations are not really extended, but called with magic functions
  118. |
  119. */
  120. 'extra' => [
  121. 'Eloquent' => [
  122. 'Illuminate\Database\Eloquent\Builder',
  123. 'Illuminate\Database\Query\Builder',
  124. ],
  125. 'Session' => ['Illuminate\Session\Store'],
  126. ],
  127. 'magic' => [],
  128. /*
  129. |--------------------------------------------------------------------------
  130. | Interface implementations
  131. |--------------------------------------------------------------------------
  132. |
  133. | These interfaces will be replaced with the implementing class. Some interfaces
  134. | are detected by the helpers, others can be listed below.
  135. |
  136. */
  137. 'interfaces' => [
  138. ],
  139. /*
  140. |--------------------------------------------------------------------------
  141. | Support for custom DB types
  142. |--------------------------------------------------------------------------
  143. |
  144. | This setting allow you to map any custom database type (that you may have
  145. | created using CREATE TYPE statement or imported using database plugin
  146. | / extension to a Doctrine type.
  147. |
  148. | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
  149. | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
  150. |
  151. | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
  152. |
  153. | The value of the array is an array of type mappings. Key is the name of the custom type,
  154. | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
  155. | our case it is 'json_array'. Doctrine types are listed here:
  156. | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  157. |
  158. | So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
  159. |
  160. | "postgresql" => array(
  161. | "jsonb" => "json_array",
  162. | ),
  163. |
  164. */
  165. 'custom_db_types' => [
  166. 'mysql' => [
  167. 'bit' => 'boolean',
  168. ],
  169. ],
  170. /*
  171. |--------------------------------------------------------------------------
  172. | Support for camel cased models
  173. |--------------------------------------------------------------------------
  174. |
  175. | There are some Laravel packages (such as Eloquence) that allow for accessing
  176. | Eloquent model properties via camel case, instead of snake case.
  177. |
  178. | Enabling this option will support these packages by saving all model
  179. | properties as camel case, instead of snake case.
  180. |
  181. | For example, normally you would see this:
  182. |
  183. | * @property \Illuminate\Support\Carbon $created_at
  184. | * @property \Illuminate\Support\Carbon $updated_at
  185. |
  186. | With this enabled, the properties will be this:
  187. |
  188. | * @property \Illuminate\Support\Carbon $createdAt
  189. | * @property \Illuminate\Support\Carbon $updatedAt
  190. |
  191. | Note, it is currently an all-or-nothing option.
  192. |
  193. */
  194. 'model_camel_case_properties' => false,
  195. /*
  196. |--------------------------------------------------------------------------
  197. | Property Casts
  198. |--------------------------------------------------------------------------
  199. |
  200. | Cast the given "real type" to the given "type".
  201. |
  202. */
  203. 'type_overrides' => [
  204. 'integer' => 'int',
  205. 'boolean' => 'bool',
  206. ],
  207. /*
  208. |--------------------------------------------------------------------------
  209. | Include DocBlocks from classes
  210. |--------------------------------------------------------------------------
  211. |
  212. | Include DocBlocks from classes to allow additional code inspection for
  213. | magic methods and properties.
  214. |
  215. */
  216. 'include_class_docblocks' => false,
  217. ];