geocoder-php / geocoder-php/Geocoder
No interface for formatters?
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4k
- Forks
- 525
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
I'm building a wrapper for this library and a service class for my app and when I wanted to make the formatter exchangeable I realized that I can't typehint the setter against an interface.
https://github.com/geocoder-php/Geocoder/blob/master/src/Common/Formatter/StringFormatter.php
If you agree I'll create a PR and add a Formatter interface that implements the format() method.
Would \Geocoder\Formatter\FormatterInterface.php work for you?
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 reading src/Common/Formatter/StringFormatter.php and inspect its format() method and the setter that needs a typehint. Confirm the proposed FormatterInterface.php location and the format() contract, then consider the existing formatter usage. Done means the formatter interface is defined consistently and the exchangeable setter can typehint it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100