Skip to content

Commit 6d0f55c

Browse files
authored
Code style updates (#126)
* Code style updates * update version
1 parent b025228 commit 6d0f55c

File tree

7 files changed

+15
-8
lines changed

7 files changed

+15
-8
lines changed

.github/workflows/static.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
phpstan:
88
name: PHPStan
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-22.04
1010

1111
steps:
1212
- name: Checkout code
@@ -34,7 +34,7 @@ jobs:
3434

3535
php-cs-fixer:
3636
name: PHP-CS-Fixer
37-
runs-on: ubuntu-20.04
37+
runs-on: ubuntu-22.04
3838

3939
steps:
4040
- name: Checkout code
@@ -52,14 +52,14 @@ jobs:
5252
with:
5353
php-version: 8.1
5454
coverage: none
55-
tools: php-cs-fixer:3.8.0, cs2pr
55+
tools: php-cs-fixer:3.11.0, cs2pr
5656

5757
- name: PHP-CS-Fixer
5858
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
5959

6060
psalm:
6161
name: Psalm
62-
runs-on: ubuntu-20.04
62+
runs-on: ubuntu-22.04
6363
steps:
6464
- name: Checkout code
6565
uses: actions/checkout@v2
@@ -86,7 +86,7 @@ jobs:
8686

8787
composer-normalize:
8888
name: Composer Normalize
89-
runs-on: ubuntu-20.04
89+
runs-on: ubuntu-22.04
9090

9191
steps:
9292
- name: Setup PHP

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,10 @@
5656
"psr-4": {
5757
"Swoole\\": "vendor/swoole/ide-helper/src/swoole/Swoole"
5858
}
59+
},
60+
"config": {
61+
"allow-plugins": {
62+
"symfony/runtime": true
63+
}
5964
}
6065
}

src/psr-17/src/Emitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function emitStatusLine(ResponseInterface $response): void
9292
'HTTP/%s %d%s',
9393
$response->getProtocolVersion(),
9494
$statusCode,
95-
($reasonPhrase ? ' '.$reasonPhrase : '')
95+
$reasonPhrase ? ' '.$reasonPhrase : ''
9696
), true, $statusCode);
9797
}
9898

src/psr-guzzle/src/Emitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function emitStatusLine(ResponseInterface $response): void
9292
'HTTP/%s %d%s',
9393
$response->getProtocolVersion(),
9494
$statusCode,
95-
($reasonPhrase ? ' '.$reasonPhrase : '')
95+
$reasonPhrase ? ' '.$reasonPhrase : ''
9696
), true, $statusCode);
9797
}
9898

src/psr-nyholm/src/Emitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function emitStatusLine(ResponseInterface $response): void
9292
'HTTP/%s %d%s',
9393
$response->getProtocolVersion(),
9494
$statusCode,
95-
($reasonPhrase ? ' '.$reasonPhrase : '')
95+
$reasonPhrase ? ' '.$reasonPhrase : ''
9696
), true, $statusCode);
9797
}
9898

src/swoole-nyholm/tests/E2E/StaticFileHandlerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Runtime\Swoole\Tests\E2E;
44

55
use PHPUnit\Framework\TestCase;
6+
67
use function Swoole\Coroutine\Http\get;
78
use function Swoole\Coroutine\run;
89

src/swoole/tests/E2E/StaticFileHandlerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Runtime\Swoole\Tests\E2E;
44

55
use PHPUnit\Framework\TestCase;
6+
67
use function Swoole\Coroutine\Http\get;
78
use function Swoole\Coroutine\run;
89

0 commit comments

Comments
 (0)