★ wanayoo — archive 1999 https://github.com/slimphp/Slim/pull/2157Nouvelle recherche | Portail wanayoo
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

Simplify callable resolver #2157

Merged
merged 1 commit into from Mar 18, 2017
Merged

Conversation

@mnlg
Copy link
Contributor

@mnlg mnlg commented Feb 26, 2017

Simplify callable resolver to avoid duplicated code.

@coveralls
Copy link

@coveralls coveralls commented Feb 26, 2017

Coverage Status

Coverage decreased (-0.01%) to 97.289% when pulling d2843c4 on mnlg:feature/simplify-callable-resolver into 5abbab0 on slimphp:4.x.

@@ -49,34 +49,24 @@ public function resolve($toResolve)
$resolved = $toResolve;

if (!is_callable($toResolve) && is_string($toResolve)) {
$class = $toResolve;
$method = '__invoke';

This comment has been minimized.

@geggleto

geggleto Mar 6, 2017
Member

it might be nice to have this as a configurations setting.

This comment has been minimized.

@mnlg

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.

This comment has been minimized.

@akrabat

akrabat Mar 8, 2017
Member

I tend to agree with @mnlg.

@akrabat
Copy link
Member

@akrabat akrabat commented Mar 8, 2017

Out of interest, is there a reason why this isn't relevant to the 3.x branch?

@akrabat
akrabat approved these changes Mar 8, 2017
@mnlg
Copy link
Contributor Author

@mnlg mnlg commented Mar 10, 2017 •

@akrabat I wasn't sure what branch to target, the CONTRIBUTING.md file doesn't seem to be up to date.

@akrabat akrabat merged commit d2843c4 into slimphp:4.x Mar 18, 2017
1 of 2 checks passed
1 of 2 checks passed
coverage/coveralls Coverage decreased (-0.01%) to 97.289%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
akrabat added a commit that referenced this pull request Mar 18, 2017
@akrabat akrabat added this to the 4.0 milestone Mar 18, 2017
@mnlg mnlg deleted the mnlg:feature/simplify-callable-resolver branch Mar 18, 2017
@ghost ghost mentioned this pull request Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants