Skip to content
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

Run php-cs-fixer on 1.x #407

Merged
merged 3 commits into from Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/static.yml
@@ -0,0 +1,29 @@
name: Static analysis

on:
pull_request:

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: mbstring

- name: Download dependencies
run: composer update --no-interaction --no-progress

- name: Download PHP CS Fixer
run: composer require "friendsofphp/php-cs-fixer:2.18.4"

- name: Execute PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run
2 changes: 1 addition & 1 deletion src/Uri.php
Expand Up @@ -109,7 +109,7 @@ static function ($matches) {
$url
);

$result = parse_url($prefix.$encodedUrl);
$result = parse_url($prefix . $encodedUrl);

if ($result === false) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.php
Expand Up @@ -217,7 +217,7 @@ public static function modifyRequest(RequestInterface $request, array $changes)
->withQueryParams($request->getQueryParams())
->withCookieParams($request->getCookieParams())
->withUploadedFiles($request->getUploadedFiles());

foreach ($request->getAttributes() as $key => $value) {
$new = $new->withAttribute($key, $value);
}
Expand Down