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
Assignees
Labels
bug

Comments

@ottodashadow
Copy link

@ottodashadow 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 sergeyklay referenced this issue Nov 2, 2019
2 of 3 tasks complete
@sergeyklay sergeyklay closed this in e00ed50 Nov 2, 2019
@sergeyklay

This comment has been minimized.

Copy link
Member

@sergeyklay sergeyklay commented Nov 2, 2019

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
Closes: #1229
sergeyklay added a commit that referenced this issue Nov 2, 2019
dreamsxin added 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
Projects
None yet
2 participants
You can’t perform that action at this time.