Simplify callable resolver #2157
Merged
Conversation
| @@ -49,34 +49,24 @@ public function resolve($toResolve) | |||
| $resolved = $toResolve; | |||
|
|
|||
| if (!is_callable($toResolve) && is_string($toResolve)) { | |||
| $class = $toResolve; | |||
| $method = '__invoke'; | |||
geggleto
Mar 6, 2017
Member
it might be nice to have this as a configurations setting.
it might be nice to have this as a configurations setting.
mnlg
Mar 7, 2017
Author
Contributor
I can't think of any case where having this as a setting could be useful. Anyway, this PR isn't intended to add a new feature but to avoid code duplication.
I can't think of any case where having this as a setting could be useful. Anyway, this PR isn't intended to add a new feature but to avoid code duplication.
|
Out of interest, is there a reason why this isn't relevant to the |
|
@akrabat I wasn't sure what branch to target, the CONTRIBUTING.md file doesn't seem to be up to date. |
akrabat
added a commit
that referenced
this pull request
Mar 18, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Simplify callable resolver to avoid duplicated code.