Skip to content

Commit

Permalink
Run php-cs-fixer on 1.x (#407)
Browse files Browse the repository at this point in the history
* Run php-cs-fixer on 1.x

* Lock version

* php-cs-fixer fix
  • Loading branch information
Nyholm authored Mar 21, 2021
1 parent 32a92b3 commit 359b1f4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 359b1f4

Please sign in to comment.