Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Documentation: Incorrect Namespace on type hinted return. #1229

Closed
ottodashadow opened this issue Apr 5, 2016 · 1 comment
Closed

API Documentation: Incorrect Namespace on type hinted return. #1229

ottodashadow opened this issue Apr 5, 2016 · 1 comment
Assignees
Labels

Comments

@ottodashadow
Copy link

ottodashadow commented Apr 5, 2016

If I define the following class in Zephir with my Json class as the return type hint the zephir stubs command calculates the correct namespace for the class, but the zephir api documentation call seems to ignore the use statement.

Origin /library/api/client/apiresponse.zep file:

namespace Library\API\Client;

use Library\Types\Json;

class APIResponse extends Json {
    ...
    public function getData() -> <Json> {
        return new Json(this->get("data"));
    }
    ...
}

PHP Stub Code "zephir stubs"

<?php
namespace Library\API\Client;

class APIResponse extends \Library\Types\Json
{
    /**
     * @return \Library\Types\Json
     */
    public function getData() {}
}

API Documentation Methods

  • __construct(variable $responseJson) : void
  • getData() : Library\API\Client\Json
@sergeyklay sergeyklay self-assigned this Oct 11, 2019
@sergeyklay sergeyklay added the bug label Nov 2, 2019
@sergeyklay
Copy link
Contributor

Fixed in the docs branch. Feel free to open a new issue if the problem appears again. Thank you for the bug report.

sergeyklay added a commit that referenced this issue Nov 2, 2019
sergeyklay added a commit that referenced this issue Nov 2, 2019
dreamsxin pushed a commit to dreamsxin/zephir that referenced this issue Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants