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

Allow arrays with viewData in Response #38

Closed
wants to merge 3 commits into from

Conversation

weblee
Copy link

@weblee weblee commented Jun 13, 2019

Allow arrays with viewData as per the docs :-)

Allow arrays with viewData as per the docs :-)
@njoguamos
Copy link

I support this PR. I had opened an issue regarding fo the same .

Copy link
Contributor

@georgehanson georgehanson left a comment

Choose a reason for hiding this comment

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

This could probably be simplified without foreach. The following would also work:

if (is_array($key)) {
    $this->viewData = array_merge($this->viewData, $key);
} else {
    $this->viewData[$key] = $value;
}

return $this;

In my opinion it is more readable.

@njoguamos
Copy link

@georgehanson I agree with you, it is more readable

@reinink
Copy link
Member

reinink commented Aug 8, 2019

Hey thanks @weblee. Apparently I implemented this (1f0a6f6). Thanks either way!

@reinink reinink closed this Aug 8, 2019
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.

None yet

4 participants