{"action":"created","issue":{"url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/issues/377","repository_url":"https://api.github.com/repos/barryvdh/laravel-ide-helper","labels_url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/issues/377/comments","events_url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/issues/377/events","html_url":"https://github.com/barryvdh/laravel-ide-helper/pull/377","id":172192516,"number":377,"title":"Allow Type Overrides","user":{"login":"ellisio","id":127468,"avatar_url":"https://avatars.githubusercontent.com/u/127468?v=3","gravatar_id":"","url":"https://api.github.com/users/ellisio","html_url":"https://github.com/ellisio","followers_url":"https://api.github.com/users/ellisio/followers","following_url":"https://api.github.com/users/ellisio/following{/other_user}","gists_url":"https://api.github.com/users/ellisio/gists{/gist_id}","starred_url":"https://api.github.com/users/ellisio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ellisio/subscriptions","organizations_url":"https://api.github.com/users/ellisio/orgs","repos_url":"https://api.github.com/users/ellisio/repos","events_url":"https://api.github.com/users/ellisio/events{/privacy}","received_events_url":"https://api.github.com/users/ellisio/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-19T18:32:06Z","updated_at":"2016-08-24T20:41:39Z","closed_at":"2016-08-24T20:41:37Z","pull_request":{"url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/pulls/377","html_url":"https://github.com/barryvdh/laravel-ide-helper/pull/377","diff_url":"https://github.com/barryvdh/laravel-ide-helper/pull/377.diff","patch_url":"https://github.com/barryvdh/laravel-ide-helper/pull/377.patch"},"body":"This PR is to allow a developer to define the following in their `ide-helper.php` configuration:\r\n\r\n```php\r\n    /*\r\n    |--------------------------------------------------------------------------\r\n    | Property Casts\r\n    |--------------------------------------------------------------------------\r\n    |\r\n    | Cast the given \"real type\" to the given \"type\".\r\n    |\r\n    */\r\n   'type_overrides' => array(\r\n       'integer' => 'int',\r\n       'boolean' => 'bool',\r\n   ),\r\n```\r\n\r\nThis will replace `@property integer` with `@property int` when running `ide-helper:models`. This will satisfy the [phpdoc_scalar](https://styleci.readme.io/docs/fixers#phpdoc_scalar) fixer when using the Laravel preset on StyleCI.\r\n\r\nThis is also the scalar convention for Laravel and I would actually honestly consider changing `integer` to `int` and `boolean` to `bool` in the following locations:\r\n\r\n- https://github.com/barryvdh/laravel-ide-helper/blob/master/src/Console/ModelsCommand.php#L260\r\n- https://github.com/barryvdh/laravel-ide-helper/blob/master/src/Console/ModelsCommand.php#L332\r\n- https://github.com/barryvdh/laravel-ide-helper/blob/master/src/Console/ModelsCommand.php#L245\r\n- https://github.com/barryvdh/laravel-ide-helper/blob/master/src/Console/ModelsCommand.php#L339"},"comment":{"url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/issues/comments/242201294","html_url":"https://github.com/barryvdh/laravel-ide-helper/pull/377#issuecomment-242201294","issue_url":"https://api.github.com/repos/barryvdh/laravel-ide-helper/issues/377","id":242201294,"user":{"login":"barryvdh","id":973269,"avatar_url":"https://avatars.githubusercontent.com/u/973269?v=3","gravatar_id":"","url":"https://api.github.com/users/barryvdh","html_url":"https://github.com/barryvdh","followers_url":"https://api.github.com/users/barryvdh/followers","following_url":"https://api.github.com/users/barryvdh/following{/other_user}","gists_url":"https://api.github.com/users/barryvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/barryvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barryvdh/subscriptions","organizations_url":"https://api.github.com/users/barryvdh/orgs","repos_url":"https://api.github.com/users/barryvdh/repos","events_url":"https://api.github.com/users/barryvdh/events{/privacy}","received_events_url":"https://api.github.com/users/barryvdh/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T20:41:39Z","updated_at":"2016-08-24T20:41:39Z","body":"Thanks!"}}
{"actor":{"display_login":"barryvdh"}}