Skip to content

Commit 5956954

Browse files
committed
phpstan cleanup
1 parent 469bd98 commit 5956954

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- name: PHP-CS-Fixer
3434
uses: docker://oskarstark/php-cs-fixer-ga
3535
with:
36-
args: --dry-run --diff-format udiff
36+
args: --dry-run --diff

phpstan-baseline.neon

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ parameters:
8080
count: 1
8181
path: src/CookieJar.php
8282

83-
-
84-
message: "#^Method Http\\\\Message\\\\CookieJar\\:\\:findMatchingCookies\\(\\) should return array\\<Http\\\\Message\\\\Cookie\\> but returns array\\<int, object\\>\\.$#"
85-
count: 1
86-
path: src/CookieJar.php
87-
8883
-
8984
message: "#^Method Http\\\\Message\\\\CookieJar\\:\\:setCookies\\(\\) has no return type specified\\.$#"
9085
count: 1
@@ -115,11 +110,6 @@ parameters:
115110
count: 1
116111
path: src/CookieJar.php
117112

118-
-
119-
message: "#^Method Http\\\\Message\\\\CookieJar\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Traversable\\<mixed, mixed\\>\\.$#"
120-
count: 1
121-
path: src/CookieJar.php
122-
123113
-
124114
message: "#^Property Http\\\\Message\\\\CookieUtil\\:\\:\\$dateFormats type has no value type specified in iterable type array\\.$#"
125115
count: 1
@@ -130,11 +120,6 @@ parameters:
130120
count: 1
131121
path: src/Encoding/ChunkStream.php
132122

133-
-
134-
message: "#^Access to an undefined property object\\:\\:\\$datalen\\.$#"
135-
count: 2
136-
path: src/Encoding/Filter/Chunk.php
137-
138123
-
139124
message: "#^Method Http\\\\Message\\\\Encoding\\\\FilteredStream\\:\\:fill\\(\\) has no return type specified\\.$#"
140125
count: 1
@@ -264,3 +249,8 @@ parameters:
264249
message: "#^Unreachable statement \\- code above always terminates\\.$#"
265250
count: 1
266251
path: src/UriFactory/SlimUriFactory.php
252+
253+
-
254+
message: "#^Call to function array_key_exists\\(\\) with 'chunk' and array<int, string> will always evaluate to false\\.$#"
255+
count: 1
256+
path: src/filters.php

phpstan.neon.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ parameters:
55
level: max
66
paths:
77
- src
8+
excludePaths:
9+
analyse:
10+
- %currentWorkingDirectory%/src/MessageFactory/*
11+
- %currentWorkingDirectory%/src/StreamFactory/*
12+
- %currentWorkingDirectory%/src/UriFactory/*

src/CookieJar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
final class CookieJar implements \Countable, \IteratorAggregate
1111
{
1212
/**
13-
* @var \SplObjectStorage<object, mixed>
13+
* @var \SplObjectStorage<Cookie, mixed>
1414
*/
1515
private $cookies;
1616

0 commit comments

Comments
 (0)