-
-
Notifications
You must be signed in to change notification settings - Fork 116
isLinkCurrent compatible with PHP 7 typehints #126
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
Conversation
e85c82e to
18357c1
Compare
…al between destination string and args
fabb404 to
3e7e7a0
Compare
3e7e7a0 to
b1f7565
Compare
|
@dg This is a first draft aimed at resolving #124. I added a bunch more tests that should have been part of PR #125, but I didn't foresee the need for them. I wasn't sure what data structure should I use to pass data from parseLinkDestination, value object with getters might be better but I'm not sure about performance impact so I sticked to a plain array. |
b1f7565 to
df2f934
Compare
| $current = $parsedLinkDestination['current']; | ||
| $component = $parsedLinkDestination['callee']; | ||
| $signal = $parsedLinkDestination['signal']; | ||
| $fragment = $parsedLinkDestination['fragment']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use extract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly what I didn't want to do.
Ondřej Mirtes
On Tue, Mar 29, 2016 at 2:35 AM -0700, "Jan Tvrdík" [email protected] wrote:
In src/Application/UI/Presenter.php:
}try {$presenterClass = $this->presenterFactory->getPresenterClass($presenter);} catch (Application\InvalidPresenterException $e) {throw new InvalidLinkException($e->getMessage(), NULL, $e);}$parsedLinkDestination = $this->parseLinkDestination($component, $destination);$destination = $parsedLinkDestination['destination'];$scheme = $parsedLinkDestination['scheme'];$presenter = $parsedLinkDestination['presenter'];$presenterClass = $parsedLinkDestination['presenterClass'];$action = $parsedLinkDestination['action'];$current = $parsedLinkDestination['current'];$component = $parsedLinkDestination['callee'];$signal = $parsedLinkDestination['signal'];$fragment = $parsedLinkDestination['fragment'];
You can use extract
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$parsedLinkDestination['current'] is always FALSE
|
There is something wrong, now test passes even if you delete all methods from TestControl… |
|
|
|
@ondrejmirtes I closed it this way 6d12b3c, and thanks for all the tests! |
|
Cool 👍 |
No description provided.