langleyfoxall / langleyfoxall/php-simple-google-maps
Add additional methods to mutate time & distance
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
It would be very convenient if you could mutate the time that is calculated, without needing to perform additional processing of the data outside of the package.
Time
If we use the demo as an example, it currently returns the information in seconds. What I propose would do the following.
$journey->duration()->toMinutes()
This would then return, for example, 5 mins. Additional options would also be really handy, e.g. toHours().
Distance
Something similar could also be done to the distance.
$journey->distance()->toMiles()
Contributor guide
No contributing guide indexed for this repository
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 duration() and distance() return values used in the package and its demo. Review how those values are currently represented, then define the supported time and distance conversion methods and their output formatting. Done means the proposed methods work for both examples and are covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100