-
Notifications
You must be signed in to change notification settings - Fork 131
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
Compatibility for ReflectionFunctionAbstract and ReflectionFunction #40
Conversation
…), ::inNamespace() methods
…ed, isInternal, isUserDefined
5b0656f
to
a224087
Compare
@@ -50,10 +53,12 @@ public function getName() | |||
public function isMatchingReflector(Reflection $reflector) | |||
{ | |||
if ($this->name == self::IDENTIFIER_CLASS) { | |||
return $reflector instanceof ReflectionClass; | |||
return ($reflector instanceof ReflectionClass); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parenthesis not needed
@Ocramius all done |
if (isset($stmt->stmts) && is_array($stmt->stmts) && count($stmt->stmts)) { | ||
if ($this->checkStatementsForYield($stmt->stmts)) { | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yield is an expression, it does not necessarily occur as a statement. So you should probably do a full traversal to find usages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikic ahh nice catch there, thanks for pointing this out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -53,7 +56,9 @@ public function isMatchingReflector(Reflection $reflector) | |||
return $reflector instanceof ReflectionClass; | |||
} | |||
|
|||
// @todo add more type checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compatibility for ReflectionFunctionAbstract and ReflectionFunction
👍 |
Depends on #32 being merged first, possibly rebase after etc.This introduces compatibility for #7 items
ReflectionFunction
andReflectionFunctionAbstract
where possible. Some items are not implement, but marked accordingly in the compatibility list (with corresponding GitHub issues)