-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List endpoint #11
List endpoint #11
Conversation
# Find files fixed by pint by comparing file lists before and after pint run | ||
files_fixed_by_format=$(comm -13 <(sort <<<"$files_before_format") <(sort <<<"$files_after_format")) | ||
|
||
# Re-stage files fixed by pint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!
composer.json
Outdated
@@ -25,7 +25,8 @@ | |||
"phpunit/phpunit": "^11.0", | |||
"projektgopher/whisky": "^0.7.0", | |||
"rector/rector": "^1.2", | |||
"symfony/var-dumper": "^4.3" | |||
"symfony/var-dumper": "^4.3", | |||
"spatie/ray": "^1.41" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
protected function formatUrl(string $endpoint): string | ||
{ | ||
return vsprintf('https://%s/%s/%s', [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL: There's a vsprintf(...)
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love sprintf
and vsprintf
I use them all the time for string formatting.
protected function getHeaders(): array | ||
{ | ||
return [ | ||
'User-Agent' => sprintf('geocodio-library-php/%s', Geocodio::SDK_VERSION), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
?string $filename = null | ||
): Response { | ||
if (is_file($fileContents) && ! file_exists($fileContents)) { | ||
throw GeocodioException::fileNotFound($fileContents); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!!
994cd9b
to
c212b57
Compare
Description
❗This PR is built off of #10
json_decode
objectdescribe
method