ide-helper.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. 'meta_filename' => '.phpstorm.meta.php',
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Fluent helpers
  17. |--------------------------------------------------------------------------
  18. |
  19. | Set to true to generate commonly used Fluent methods
  20. |
  21. */
  22. 'include_fluent' => FALSE,
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Write Model Magic methods
  26. |--------------------------------------------------------------------------
  27. |
  28. | Set to false to disable write magic methods of model
  29. |
  30. */
  31. 'write_model_magic_where' => TRUE,
  32. /*
  33. |--------------------------------------------------------------------------
  34. | Write Eloquent Model Mixins
  35. |--------------------------------------------------------------------------
  36. |
  37. | This will add the necessary DocBlock mixins to the model class
  38. | contained in the Laravel Framework. This helps the IDE with
  39. | auto-completion.
  40. |
  41. | Please be aware that this setting changes a file within the /vendor directory.
  42. |
  43. */
  44. 'write_eloquent_model_mixins' => FALSE,
  45. /*
  46. |--------------------------------------------------------------------------
  47. | Helper files to include
  48. |--------------------------------------------------------------------------
  49. |
  50. | Include helper files. By default not included, but can be toggled with the
  51. | -- helpers (-H) option. Extra helper files can be included.
  52. |
  53. */
  54. 'include_helpers' => FALSE,
  55. 'helper_files' => [
  56. base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
  57. ],
  58. /*
  59. |--------------------------------------------------------------------------
  60. | Model locations to include
  61. |--------------------------------------------------------------------------
  62. |
  63. | Define in which directories the ide-helper:models command should look
  64. | for models.
  65. |
  66. */
  67. 'model_locations' => [
  68. 'app',
  69. ],
  70. /*
  71. |--------------------------------------------------------------------------
  72. | Extra classes
  73. |--------------------------------------------------------------------------
  74. |
  75. | These implementations are not really extended, but called with magic functions
  76. |
  77. */
  78. 'extra' => [
  79. 'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
  80. 'Session' => ['Illuminate\Session\Store'],
  81. ],
  82. 'magic' => [
  83. 'Log' => [
  84. 'debug' => 'Monolog\Logger::addDebug',
  85. 'info' => 'Monolog\Logger::addInfo',
  86. 'notice' => 'Monolog\Logger::addNotice',
  87. 'warning' => 'Monolog\Logger::addWarning',
  88. 'error' => 'Monolog\Logger::addError',
  89. 'critical' => 'Monolog\Logger::addCritical',
  90. 'alert' => 'Monolog\Logger::addAlert',
  91. 'emergency' => 'Monolog\Logger::addEmergency',
  92. ]
  93. ],
  94. /*
  95. |--------------------------------------------------------------------------
  96. | Interface implementations
  97. |--------------------------------------------------------------------------
  98. |
  99. | These interfaces will be replaced with the implementing class. Some interfaces
  100. | are detected by the helpers, others can be listed below.
  101. |
  102. */
  103. 'interfaces' => [
  104. ],
  105. /*
  106. |--------------------------------------------------------------------------
  107. | Support for custom DB types
  108. |--------------------------------------------------------------------------
  109. |
  110. | This setting allow you to map any custom database type (that you may have
  111. | created using CREATE TYPE statement or imported using database plugin
  112. | / extension to a Doctrine type.
  113. |
  114. | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
  115. | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
  116. |
  117. | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
  118. |
  119. | The value of the array is an array of type mappings. Key is the name of the custom type,
  120. | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
  121. | our case it is 'json_array'. Doctrine types are listed here:
  122. | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  123. |
  124. | So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
  125. |
  126. | "postgresql" => array(
  127. | "jsonb" => "json_array",
  128. | ),
  129. |
  130. */
  131. 'custom_db_types' => [
  132. 'mysql' => [
  133. 'bit' => 'boolean'
  134. ]
  135. ],
  136. /*
  137. |--------------------------------------------------------------------------
  138. | Support for camel cased models
  139. |--------------------------------------------------------------------------
  140. |
  141. | There are some Laravel packages (such as Eloquence) that allow for accessing
  142. | Eloquent model properties via camel case, instead of snake case.
  143. |
  144. | Enabling this option will support these packages by saving all model
  145. | properties as camel case, instead of snake case.
  146. |
  147. | For example, normally you would see this:
  148. |
  149. | * @property \Illuminate\Support\Carbon $created_at
  150. | * @property \Illuminate\Support\Carbon $updated_at
  151. |
  152. | With this enabled, the properties will be this:
  153. |
  154. | * @property \Illuminate\Support\Carbon $createdAt
  155. | * @property \Illuminate\Support\Carbon $updatedAt
  156. |
  157. | Note, it is currently an all-or-nothing option.
  158. |
  159. */
  160. 'model_camel_case_properties' => FALSE,
  161. /*
  162. |--------------------------------------------------------------------------
  163. | Property Casts
  164. |--------------------------------------------------------------------------
  165. |
  166. | Cast the given "real type" to the given "type".
  167. |
  168. */
  169. 'type_overrides' => [
  170. 'integer' => 'int',
  171. 'boolean' => 'bool',
  172. ],
  173. ];