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

Fixed validation for csv.header: false #80

Merged
merged 1 commit into from
Mar 24, 2024
Merged

Conversation

SmetDenis
Copy link
Member

No description provided.

This commit introduces a new getRealColumnNumber method in CsvFile class and enhances CSV validation process. The method returns the number of records in the first line. The validation logic now optimizes on memory by considering the case where CSV file has no headers. The Commit also fixes handling in allowed and not allowed rules by converting array elements to strings. Tests are updated to reflect these changes.
@SmetDenis SmetDenis merged commit b11dbfe into master Mar 24, 2024
9 checks passed
@SmetDenis SmetDenis deleted the fix-header-false branch March 24, 2024 19:14
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8411539318

Details

  • 45 of 46 (97.83%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 94.845%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Validators/ValidatorCsv.php 38 39 97.44%
Totals Coverage Status
Change from base Build 8411264766: 0.02%
Covered Lines: 1159
Relevant Lines: 1222

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants