geocoder-php / geocoder-php/Geocoder

Adopt variadic methods throughout because it enforces types. DX

Open
#954 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.