geocoder-php / geocoder-php/Geocoder

No interface for formatters?

オープン
#843 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

improvement
主要言語
PHP
スター
4k
フォーク
525
平均マージ
8分
マージ済み PR(30日)
1

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず src/Common/Formatter/StringFormatter.php を読み、format() メソッドと、typehint が必要な setter を確認します。提案されている FormatterInterface.php の場所と format() の契約を確認し、そのうえで既存の formatter の使用箇所を検討します。Formatter interface が一貫した形で定義され、交換可能な setter にその interface の typehint を付けられれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
php
領域
backend
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。