ide-helper.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <?php
  2. return array(
  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' => true,
  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' => array(
  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' => array(
  100. 'app',
  101. ),
  102. /*
  103. |--------------------------------------------------------------------------
  104. | Models to ignore
  105. |--------------------------------------------------------------------------
  106. |
  107. | Define which models should be ignored.
  108. |
  109. */
  110. 'ignored_models' => array(
  111. ),
  112. /*
  113. |--------------------------------------------------------------------------
  114. | Extra classes
  115. |--------------------------------------------------------------------------
  116. |
  117. | These implementations are not really extended, but called with magic functions
  118. |
  119. */
  120. 'extra' => array(
  121. 'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
  122. 'Session' => array('Illuminate\Session\Store'),
  123. ),
  124. 'magic' => array(),
  125. /*
  126. |--------------------------------------------------------------------------
  127. | Interface implementations
  128. |--------------------------------------------------------------------------
  129. |
  130. | These interfaces will be replaced with the implementing class. Some interfaces
  131. | are detected by the helpers, others can be listed below.
  132. |
  133. */
  134. 'interfaces' => array(
  135. ),
  136. /*
  137. |--------------------------------------------------------------------------
  138. | Support for custom DB types
  139. |--------------------------------------------------------------------------
  140. |
  141. | This setting allow you to map any custom database type (that you may have
  142. | created using CREATE TYPE statement or imported using database plugin
  143. | / extension to a Doctrine type.
  144. |
  145. | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
  146. | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
  147. |
  148. | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
  149. |
  150. | The value of the array is an array of type mappings. Key is the name of the custom type,
  151. | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
  152. | our case it is 'json_array'. Doctrine types are listed here:
  153. | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  154. |
  155. | So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
  156. |
  157. | "postgresql" => array(
  158. | "jsonb" => "json_array",
  159. | ),
  160. |
  161. */
  162. 'custom_db_types' => array(
  163. ),
  164. /*
  165. |--------------------------------------------------------------------------
  166. | Support for camel cased models
  167. |--------------------------------------------------------------------------
  168. |
  169. | There are some Laravel packages (such as Eloquence) that allow for accessing
  170. | Eloquent model properties via camel case, instead of snake case.
  171. |
  172. | Enabling this option will support these packages by saving all model
  173. | properties as camel case, instead of snake case.
  174. |
  175. | For example, normally you would see this:
  176. |
  177. | * @property \Illuminate\Support\Carbon $created_at
  178. | * @property \Illuminate\Support\Carbon $updated_at
  179. |
  180. | With this enabled, the properties will be this:
  181. |
  182. | * @property \Illuminate\Support\Carbon $createdAt
  183. | * @property \Illuminate\Support\Carbon $updatedAt
  184. |
  185. | Note, it is currently an all-or-nothing option.
  186. |
  187. */
  188. 'model_camel_case_properties' => false,
  189. /*
  190. |--------------------------------------------------------------------------
  191. | Property Casts
  192. |--------------------------------------------------------------------------
  193. |
  194. | Cast the given "real type" to the given "type".
  195. |
  196. */
  197. 'type_overrides' => array(
  198. 'integer' => 'int',
  199. 'boolean' => 'bool',
  200. ),
  201. /*
  202. |--------------------------------------------------------------------------
  203. | Include DocBlocks from classes
  204. |--------------------------------------------------------------------------
  205. |
  206. | Include DocBlocks from classes to allow additional code inspection for
  207. | magic methods and properties.
  208. |
  209. */
  210. 'include_class_docblocks' => false,
  211. );