Skip to content

Adding per collection custom delimiter #36

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

Merged
merged 3 commits into from
Oct 14, 2022
Merged

Adding per collection custom delimiter #36

merged 3 commits into from
Oct 14, 2022

Conversation

mattsah
Copy link

@mattsah mattsah commented Oct 14, 2022

This is a pull request for 2.x (for a v2.5) to add the custom delimiter at the constructor (per collection) level only per #35.

@adbario adbario self-requested a review October 14, 2022 20:05
@coveralls
Copy link

coveralls commented Oct 14, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling c58b2fd on mattsah:2.x into 3bfe678 on adbario:2.x.

src/Dot.php Outdated
{
$this->items = $this->getArrayItems($items);
$this->delimiter = $delimiter;
Copy link
Owner

Choose a reason for hiding this comment

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

If the delimiter is an empty string, explode() will throw an error. So the delimiter must default to a dot if an empty string was passed to the constructor.

Copy link
Owner

@adbario adbario left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @mattsah 🔥

Can you also update the helpers.php file accordingly and add the delimiter to readme?

Thanks 🙏

@adbario
Copy link
Owner

adbario commented Oct 14, 2022

Thanks for the contribution @mattsah 🚀

@adbario adbario merged commit 081e2cc into adbario:2.x Oct 14, 2022
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.

3 participants