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

Fix 139 #142

Merged
merged 3 commits into from
Nov 28, 2015
Merged

Fix 139 #142

merged 3 commits into from
Nov 28, 2015

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Nov 28, 2015

Rebase #139

private function handleRoute($routeInfo, PennyEventInterface $event)
{
private function handleRoute(
RouteInfoInterface $routeInfo,
Copy link
Member

Choose a reason for hiding this comment

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

remove RouteInfoInterface type hint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why?

gianarb pushed a commit that referenced this pull request Nov 28, 2015
@gianarb gianarb merged commit 25ac241 into master Nov 28, 2015
@gianarb gianarb deleted the fix-139 branch November 28, 2015 11:41
@@ -133,13 +133,15 @@ public function run($request = null, $response = null)
/**
* Handle Route.
*
* @param mixed $routeInfo
* @param PennyEventInterface $event
* @param RouteInfoInterface $routeInfo
Copy link
Member

Choose a reason for hiding this comment

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

@param mixed $routeInfo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why? The dispatch method triggers exceptions or return RouteInfo object

Copy link
Member

Choose a reason for hiding this comment

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

but the exception won't be executed, as the type hint is RouteInfoInterface

Copy link
Member

Choose a reason for hiding this comment

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

this is the internal method that handle RouteInfoInterface check, so param need accept not a RouteInfoInterface, so the RuntimeException will be executable!

@samsonasik
Copy link
Member

I will re-create PR for it.

@samsonasik
Copy link
Member

@gianarb you're wrong on rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants