{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/7558","labels_url":"https://api.github.com/repos/laravel/framework/issues/7558/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/7558/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/7558/events","html_url":"https://github.com/laravel/framework/issues/7558","id":58500122,"number":7558,"title":"Add phpdoc @method to Eloquent\\Model Eloquent\\Builder with Query\\Builder methods","user":{"login":"MalikinSergey","id":8463996,"avatar_url":"https://avatars.githubusercontent.com/u/8463996?v=3","gravatar_id":"","url":"https://api.github.com/users/MalikinSergey","html_url":"https://github.com/MalikinSergey","followers_url":"https://api.github.com/users/MalikinSergey/followers","following_url":"https://api.github.com/users/MalikinSergey/following{/other_user}","gists_url":"https://api.github.com/users/MalikinSergey/gists{/gist_id}","starred_url":"https://api.github.com/users/MalikinSergey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MalikinSergey/subscriptions","organizations_url":"https://api.github.com/users/MalikinSergey/orgs","repos_url":"https://api.github.com/users/MalikinSergey/repos","events_url":"https://api.github.com/users/MalikinSergey/events{/privacy}","received_events_url":"https://api.github.com/users/MalikinSergey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-22T11:52:08Z","updated_at":"2015-02-22T14:50:06Z","closed_at":"2015-02-22T11:58:41Z","body":"Hello,\r\nIdea: add class-level phpdoc to Eloquent\\Builder with some @method definitions. It's methods from Query\\Builder, which called in eloquent builder and model, using __call()\r\n\r\nIf you think, that is good idea, I can wrote this phpdocs and create pull.\r\n\r\nMore about:\r\n\r\nIt will help IDE type hint, autocomplete and inspections:\r\n\r\n```\r\nclass SomeModel extends Eloquent {...}\r\nSomeModel::whereIn('id', [1,2]); // IDE (phpStorm, for example) says, that method whereIn not found in  class SomeModel\r\n```\r\n\r\n```\r\n$builder = SomeModel::query(); // get eloquent builder\r\n$builder->whereIn(); // same, IDE say method not found`\r\n```\r\n\r\nExample of proposed fix:\r\n```php\r\n<?php namespace Illuminate\\Database\\Eloquent;\r\n\r\nuse ...\r\n\r\n/**\r\n * Class Builder\r\n * @method \\Illuminate\\Database\\Query\\Builder whereIn(string $column, mixed $values, string $boolean, bool $not)\r\n */\r\n\r\nclass Builder ...\r\n```\r\n\r\nRefs:\r\nhttp://phpdoc.org/docs/latest/references/phpdoc/tags/method.html\r\nhttps://github.com/laravel/framework/blob/5.0/src/Illuminate/Database/Eloquent/Builder.php#L920\r\nhttps://github.com/laravel/framework/blob/5.0/src/Illuminate/Database/Eloquent/Model.php#L3314"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/75438732","html_url":"https://github.com/laravel/framework/issues/7558#issuecomment-75438732","issue_url":"https://api.github.com/repos/laravel/framework/issues/7558","id":75438732,"user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T14:50:06Z","updated_at":"2015-02-22T14:50:06Z","body":"> What are you referring to by \"static\"?\r\n\r\nI was just meaning no need to define all the methods all over again."}}