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

Added addHeaderFromArray method to the SimpleWriter #125

Merged

Conversation

bedus-creation
Copy link

@bedus-creation bedus-creation commented Dec 5, 2022

Currently, no feature to directly add headers from the array. This PR adds addHeaderFromArray method to the SimpleWriter, which allows to add headers from array.

@freekmurze
Copy link
Member

Thank you!

Could you remove all unrelated code style changes in this PR so I can easily see the actual changes?

@bedus-creation
Copy link
Author

@freekmurze Thanks for the quick response, I have updated the PR by removing unnecessary changes.

Copy link
Member

@freekmurze freekmurze left a comment

Choose a reason for hiding this comment

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

Could you also update the readme with an example of how to use this new function?

@@ -127,6 +127,18 @@ public function addRows(iterable $rows, Style $style = null)
return $this;
}

public function addHeaderFromArray(array $header): self
Copy link
Member

Choose a reason for hiding this comment

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

Rename this to addHeader

@bedus-creation
Copy link
Author

Readme updated.

@freekmurze freekmurze merged commit ebcc81b into spatie:main Dec 5, 2022
@freekmurze
Copy link
Member

Thanks!

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