Skip to content

Filter out anonymous classes #60

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

Merged
merged 3 commits into from
May 4, 2018
Merged

Conversation

asgrim
Copy link
Member

@asgrim asgrim commented May 4, 2018

Fixes #55

Note: the issue specifies filtering out anonymous functions too, but we don't actually reflect on functions at all at the moment; it is all just ClassBased, InterfaceBased and TraitBased roots; plus the top level is the CompareClasses implementation...

@asgrim asgrim force-pushed the feature/filter-anon-classes branch from d2aac7f to 5f4deee Compare May 4, 2018 15:34
function (Changes $changes, FunctionBased $check) use ($fromFunction, $toClass) : Changes {
return $changes->mergeWith($check->__invoke($fromFunction, $toClass));
function (Changes $changes, FunctionBased $check) use ($fromFunction, $toFunction) : Changes {
return $changes->mergeWith($check->__invoke($fromFunction, $toFunction));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to detect anonymous functions BTW?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See description:

Note: the issue specifies filtering out anonymous functions too, but we don't actually reflect on functions at all at the moment; it is all just ClassBased, InterfaceBased and TraitBased roots; plus the top level is the CompareClasses implementation...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ai was just wondering on whether we have these facilities in BR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new FunctionReflector(/* stuff */)->getAllFunctions() exists, so I don't see why not 👍

@Ocramius Ocramius merged commit 294f165 into master May 4, 2018
@asgrim asgrim deleted the feature/filter-anon-classes branch May 4, 2018 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants