geocoder-php / geocoder-php/Geocoder
Adopt variadic methods throughout because it enforces types. DX
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4k
- Forks
- 525
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
example adoption:
From BeforeAdoption.
a.) class: Geocoder\ProviderAggregator
b.) method def: registerProviders(array $providers = []);
c.) sample method call: $geocoder->registerProviders([new \Geocoder\Provider\GoogleMaps\GoogleMaps($adapter), new \Geocoder\Provider\Yandex\Yandex($adapter),]);
To AfterAdoption.
a.) class: Geocoder\ProviderAggregator
b.) method def: registerProviders(Providers ...$providers);
c.) method call: $geocoder->registerProviders(new \Geocoder\Provider\GoogleMaps\GoogleMaps($adapter));
d.) method call: $geocoder->registerProviders(new \Geocoder\Provider\GoogleMaps\GoogleMaps($adapter), new XXProvider);
e.) method call: $providers = [new \Geocoder\Provider\GoogleMaps\GoogleMaps($adapter), new \Geocoder\Provider\Yandex\Yandex($adapter),]; $geocoder->registerProviders(... $providers);
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 locating the Geocoder\ProviderAggregator class and its registerProviders method. Review the current array-based signature and calls, then identify the other methods covered by “throughout.” Done means the affected methods accept typed variadic providers and their calls support individual providers and unpacked arrays as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100