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

Incorrect annotations #41

Closed
mindplay-dk opened this issue May 3, 2013 · 6 comments
Closed

Incorrect annotations #41

mindplay-dk opened this issue May 3, 2013 · 6 comments
Milestone

Comments

@mindplay-dk
Copy link

Some of the annotation are incorrectly namespaced, and can't be interpreted by e.g. PhpStorm, where long lists of warnings are generated while running inspections.

https://github.com/filp/whoops/blob/master/src/Whoops/Run.php#L31

/**
 * Pushes a handler to the end of the stack.
 * @param  Whoops\HandlerInterface $handler
 * @return Whoops\Run
 */

Should read:

/**
 * Pushes a handler to the end of the stack.
 * @param  \Whoops\HandlerInterface $handler
 * @return \Whoops\Run
 */

Or add a use clause for Whoops\Run and you can cut it down to:

/**
 * Pushes a handler to the end of the stack.
 * @param  HandlerInterface $handler
 * @return Run
 */
@mindplay-dk
Copy link
Author

If you would like, I can fix this and submit a pull-request - but I need to know which is your preference, the fully-qualified type-referenced with leading \, or the use clause? (personally I prefer use-clauses, as they make all the dependencies visible in the header of the file.)

@mindplay-dk
Copy link
Author

I should perhaps have explained that the reason this doesn't work for me, is because your code throws up long lists of inspection warnings in PhpStorm.

@filp
Copy link
Owner

filp commented Jun 19, 2013

Hi @mindplay-dk, sorry I kind of let this one fall behind. If you could send in a pull request, I'd greatly appreciate it; iif you're not able to, however, I'll look into it until the end of this week.

Thanks a ton for the help!

@mindplay-dk
Copy link
Author

I'd be happy to help, but still need an answer to the question above - \ prefixes or use clauses?

@filp
Copy link
Owner

filp commented Jun 19, 2013

@mindplay-dk I think it'll be better to use \ prefixes, cheers!

@cryptiklemur
Copy link

Quick note for the function you mentioned @mindplay-dk. The typehint for that should actually be \Whoops\Handler\HandlerInterface as opposed to \Whoops\HandlerInterface

@filp filp closed this as completed in 5307eba Jul 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants