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

Added FindReflectionOnLine helper utility #181

Merged
merged 1 commit into from
Mar 11, 2016

Conversation

asgrim
Copy link
Member

@asgrim asgrim commented Feb 22, 2016

Attempt number 2 and solving #178 in a nicer way.

This provides an API as per the documentation written in docs/find-reflection-on-line.md.

@asgrim
Copy link
Member Author

asgrim commented Mar 3, 2016

ping @sebastianbergmann - have you had a chance to look over this change, and whether it's suitable for your needs, please?

@sebastianbergmann
Copy link

Not yet, sorry. Hopefully tomorrow.

@sebastianbergmann
Copy link

I had a chance to look at this and it does what I need. Thanks!

Can you explain, though, why you chose to implement this as a functor (using __invoke()) instead of a straight-forward public method?

@asgrim
Copy link
Member Author

asgrim commented Mar 6, 2016

The class has a single purpose, so no need for any other public API really. Can be used throw-away, for example in PHP 7, something like this should work (didn't check syntax btw):

$reflection = (new FindReflectionOnLine)($file, $line);

@Ocramius
Copy link
Member

This is good to go: merging!

Ocramius added a commit that referenced this pull request Mar 11, 2016
Added FindReflectionOnLine helper utility
@Ocramius Ocramius merged commit 185c6fe into master Mar 11, 2016
@Ocramius Ocramius deleted the find-reflection-on-line-helper branch March 11, 2016 17:06
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.

3 participants