isLinkCurrent compatible with PHP 7 typehints#126
isLinkCurrent compatible with PHP 7 typehints#126ondrejmirtes wants to merge 6 commits intonette:masterfrom
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.
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" notifications@github.com 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.
$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.