Skip to content

Commit 2b901f6

Browse files
committed
Apply PER2.0 phpcs (part 1)
1 parent 2c73db9 commit 2b901f6

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

composer.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
},
2929
"require-dev": {
3030
"phpunit/phpunit": "^9.6|^10.0",
31-
"psr/http-message": "^1.0",
32-
"laminas/laminas-diactoros": "^2.17",
33-
"vimeo/psalm": "^5.22"
31+
"psr/http-message": "^1.0|^2.0",
32+
"httpsoft/http-message": "^1.1",
33+
"phpstan/extension-installer": "^1.4",
34+
"phpstan/phpstan": "^1.11",
35+
"phpstan/phpstan-strict-rules": "^1.6"
3436
},
3537
"autoload-dev": {
3638
"psr-4": {

phpstan.neon

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
includes:
2+
- phar://phpstan.phar/conf/bleedingEdge.neon
3+
parameters:
4+
level: 1
5+
strictRules:
6+
allRules: true
7+
fileExtensions:
8+
- php
9+
paths:
10+
- src
11+
tmpDir: vendor/.cache.phpstan
12+
reportUnmatchedIgnoredErrors: false

psalm.xml

-16
This file was deleted.

src/Stream.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ public function __serialize(): array
154154
}
155155

156156
return [
157-
'uri' => $meta['uri'],
158-
'mode' => $meta['mode'],
159-
'seek' => $this->offset,
160-
'algo' => $this->algo,
157+
'uri' => $meta['uri'],
158+
'mode' => $meta['mode'],
159+
'seek' => $this->offset,
160+
'algo' => $this->algo,
161161
'chunk' => $this->chunkSize,
162162
];
163163
}

tests/Unit/TestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Phplrt\Source\Tests\Unit;
66

7-
use Laminas\Diactoros\StreamFactory;
7+
use HttpSoft\Message\StreamFactory;
88
use Phplrt\Source\File;
99
use Phplrt\Source\Tests\TestCase as UnitTestCase;
1010

0 commit comments

Comments
 (0)