Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Zend\Code\Scanner\ClassScanner::getTraitNames() does not call scan() before running #57

Closed
djmattyg007 opened this issue May 7, 2016 · 1 comment

Comments

@djmattyg007
Copy link
Contributor

As the subject says, unlike most methods in that class, getTraitNames() does not call scan() before checking available data. This means that if you call getTraitNames() or getTraits() as the first action on a newly-instantiated ClassScanner, you won't get any traits, depsite there being traits.

Unless someone confirms that this is intended behaviour and isn't actually a bug, I'll happily submit a PR to fix the issue.

@djmattyg007
Copy link
Contributor Author

It looks like the tests didn't pick this up because they always call isTrait() first, which does call scan().

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

No branches or pull requests

1 participant