Intervention / Intervention/image
Standardized create() Methods
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 14.4k
- Forks
- 1.5k
- Avg merge
- 17h 51m
- Merged PRs (30d)
- 11
Description
The create() method is typically a static constructor with the same parameters. Some classes deviate from this standard and also accept variable parameters. This should be standardized by ensuring that the create() method always reflects the constructor's parameters. Other parameters should be handled in dedicated static methods.
The following methods need change:
Intervention\Image\Format::create()Intervention\Image\FileExtension::create()Intervention\Image\MediaType::create()
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 by inspecting the constructors and create() methods in Intervention\Image\Format, Intervention\Image\FileExtension, and Intervention\Image\MediaType. Compare each create() signature with its constructor and identify the variable parameters that need dedicated static methods. Done means all three create() methods consistently reflect their constructor parameters and alternate inputs have separate methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100