Idea: Create a `checkFileIsValid` and `checkContentIsValid` function
Open
Nobody has claimed this yet.
feature request
help wanted
needs more info
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Idea: Create a checkFileIsValid and checkContentIsValid function
Why?
Sometimes, I Have to parse an PDF just to check if its valid, and it consumes memory, cpu, etc.
Example?
$parser = new Parser();
$parser->checkFileIsValid('file.pdf'); // In case of a File - Returns bool - True for IS VALID and False for NOT VALID
$parser->checkContentIsValid('CONTENT'); // In that case, the function will return false. (Because it's NOT VALID)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Parser entry point shown in the example and review how PDF files and content are currently handled. Define the validity contract for both inputs and identify tests for valid and invalid PDFs; done means the new API behavior is specified and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100