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

Non accurate generation of stubs for methods which may return object or null #2092

Closed
sergeyklay opened this issue May 3, 2020 · 1 comment
Assignees

Comments

@sergeyklay
Copy link
Member

For the following Zephir code:

/**
 * Returns the internal event manager
 */
public function getInternalEventsManager() -> <ManagerInterface> | null
{
    return this->eventsManager;
}

The following sub was generated:

/**
 * Returns the internal event manager
 *
 * @return mixed
 */
public function getInternalEventsManager(): ?ManagerInterface
{
}

It is a bit non accurate and should be as follows:

/**
 * Returns the internal event manager
 *
-* @return mixed
+* @return ManagerInterface|null
 */
public function getInternalEventsManager(): ?ManagerInterface
{
}
@sergeyklay
Copy link
Member Author

Implemented in development branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants