php-github-api icon indicating copy to clipboard operation
php-github-api copied to clipboard

Add .phpstorm.meta.php to improve code completion

Open pronskiy opened this issue 3 years ago • 1 comments

Folks, adding a .phpstorm.meta.php file with something like this below, would make users' experience with the package in PhpStorm a bit better when using calls like ->api('issue'):

<?php
namespace PHPSTORM_META {
    override( \Github\Client::api(0),
      map( [
        "issue" => \Github\Api\Issue::class,
        //...
    ]));
}

Would you be interested in adding it?

pronskiy avatar Nov 06 '22 22:11 pronskiy

Users can also use the ->issue() virtual method on the client object and receive full ide support. But indeed this would improve the UX when using the ->api('xxx') approach so I'm open for a PR that adds this improvement!

acrobat avatar Nov 15 '22 12:11 acrobat