No interface for formatters?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
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.
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?
- Dominant language
- PHP
- Stars
- 4k
- Forks
- 525
- Avg merge
- 8m
- Merged PRs (30d)
- 1
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.
More from geocoder-php/Geocoder
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
geocoder-php/Geocoder#1272 ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
geocoder-php/Geocoder#1267 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
geocoder-php/Geocoder#1266 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 38/100
geocoder-php/Geocoder#1244 · 2 comments · 2 reactions ·
-
provider
Difficulty 4/5 3-5 days Newbie friendliness 30/100
geocoder-php/Geocoder#1243 ·
All issues in geocoder-php/Geocoder
Similar issues
-
a11y admissions.uiowa.edu needs grooming SiteImprove best practice
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Save States Menu Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pluginsGLPI/datainjection#673 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
octobercms/october#6130 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getgrav/grav-plugin-form#656 ·