{"action":"created","issue":{"url":"https://api.github.com/repos/nvlad/yii2support/issues/119","repository_url":"https://api.github.com/repos/nvlad/yii2support","labels_url":"https://api.github.com/repos/nvlad/yii2support/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/nvlad/yii2support/issues/119/comments","events_url":"https://api.github.com/repos/nvlad/yii2support/issues/119/events","html_url":"https://github.com/nvlad/yii2support/issues/119","id":231092410,"number":119,"title":"Подсказка типа для Yii::createObject","user":{"login":"tekord","id":1286100,"avatar_url":"https://avatars2.githubusercontent.com/u/1286100?v=3","gravatar_id":"","url":"https://api.github.com/users/tekord","html_url":"https://github.com/tekord","followers_url":"https://api.github.com/users/tekord/followers","following_url":"https://api.github.com/users/tekord/following{/other_user}","gists_url":"https://api.github.com/users/tekord/gists{/gist_id}","starred_url":"https://api.github.com/users/tekord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekord/subscriptions","organizations_url":"https://api.github.com/users/tekord/orgs","repos_url":"https://api.github.com/users/tekord/repos","events_url":"https://api.github.com/users/tekord/events{/privacy}","received_events_url":"https://api.github.com/users/tekord/received_events","type":"User","site_admin":false},"labels":[{"id":514069432,"url":"https://api.github.com/repos/nvlad/yii2support/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":615874458,"url":"https://api.github.com/repos/nvlad/yii2support/labels/planned","name":"planned","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":{"login":"insperedia","id":1706065,"avatar_url":"https://avatars3.githubusercontent.com/u/1706065?v=3","gravatar_id":"","url":"https://api.github.com/users/insperedia","html_url":"https://github.com/insperedia","followers_url":"https://api.github.com/users/insperedia/followers","following_url":"https://api.github.com/users/insperedia/following{/other_user}","gists_url":"https://api.github.com/users/insperedia/gists{/gist_id}","starred_url":"https://api.github.com/users/insperedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insperedia/subscriptions","organizations_url":"https://api.github.com/users/insperedia/orgs","repos_url":"https://api.github.com/users/insperedia/repos","events_url":"https://api.github.com/users/insperedia/events{/privacy}","received_events_url":"https://api.github.com/users/insperedia/received_events","type":"User","site_admin":false},"assignees":[{"login":"insperedia","id":1706065,"avatar_url":"https://avatars3.githubusercontent.com/u/1706065?v=3","gravatar_id":"","url":"https://api.github.com/users/insperedia","html_url":"https://github.com/insperedia","followers_url":"https://api.github.com/users/insperedia/followers","following_url":"https://api.github.com/users/insperedia/following{/other_user}","gists_url":"https://api.github.com/users/insperedia/gists{/gist_id}","starred_url":"https://api.github.com/users/insperedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insperedia/subscriptions","organizations_url":"https://api.github.com/users/insperedia/orgs","repos_url":"https://api.github.com/users/insperedia/repos","events_url":"https://api.github.com/users/insperedia/events{/privacy}","received_events_url":"https://api.github.com/users/insperedia/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-05-24T16:06:45Z","updated_at":"2017-05-30T11:59:50Z","closed_at":null,"body":"Есть классы, реализующие бизнес-логику и создающиеся через Yii::createObject. Этот метод умеет внедрять зависимости, которые активно используются в классах с бизнес-логикой. Вот пример кода инстанцирования и использования класса:\r\n\r\n```php\r\n\t/** @var SetTaskAssigneeCommand $command */\r\n\t$command = Yii::createObject(SetTaskAssigneeCommand::class);\r\n\t$command->execute($task, $task->project->tester_id);\r\n```\r\n\r\nПриходится писать длинные type hint'ы, т.к. IDE ждёт от createObject результат типа object.\r\n\r\n**Вопрос**: возможно ли сделать так, чтобы плагин Yii 2 сообщал IDE тип возвращаемого значения на основе параметра метода Yii::createObject? Тогда можно будет избавиться от надоедливых type hint'ов."},"comment":{"url":"https://api.github.com/repos/nvlad/yii2support/issues/comments/304856623","html_url":"https://github.com/nvlad/yii2support/issues/119#issuecomment-304856623","issue_url":"https://api.github.com/repos/nvlad/yii2support/issues/119","id":304856623,"user":{"login":"insperedia","id":1706065,"avatar_url":"https://avatars3.githubusercontent.com/u/1706065?v=3","gravatar_id":"","url":"https://api.github.com/users/insperedia","html_url":"https://github.com/insperedia","followers_url":"https://api.github.com/users/insperedia/followers","following_url":"https://api.github.com/users/insperedia/following{/other_user}","gists_url":"https://api.github.com/users/insperedia/gists{/gist_id}","starred_url":"https://api.github.com/users/insperedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insperedia/subscriptions","organizations_url":"https://api.github.com/users/insperedia/orgs","repos_url":"https://api.github.com/users/insperedia/repos","events_url":"https://api.github.com/users/insperedia/events{/privacy}","received_events_url":"https://api.github.com/users/insperedia/received_events","type":"User","site_admin":false},"created_at":"2017-05-30T11:59:50Z","updated_at":"2017-05-30T11:59:50Z","body":":)"}}
{"actor":{"display_login":"insperedia"}}