From 9626babe6116a4bb9419d5d5aa884f258ee31706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Thu, 6 Apr 2023 03:54:23 +0200 Subject: [PATCH] qa: update psalm configuration and cleanup baseline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- psalm-baseline.xml | 22 ++-------------------- psalm.xml.dist | 2 ++ test/StreamTest.php | 2 +- test/UriTest.php | 2 +- 4 files changed, 6 insertions(+), 22 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 1741a4f9..6dada0f6 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + null|callable @@ -114,10 +114,6 @@ $requestTarget - - $this->uri->getPort() - $uri->getPort() - @@ -170,11 +166,6 @@ $hasContentType - - - json_encode - - gettype($uri) @@ -234,21 +225,12 @@ - + getHeaderLine getServerParams getUri - withHost - withPort - withScheme withUri - - $proxyCIDRList - - - list<non-empty-string> - diff --git a/psalm.xml.dist b/psalm.xml.dist index 82f531f3..3cf45c00 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -5,6 +5,8 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="psalm-baseline.xml" + findUnusedCode="false" + findUnusedPsalmSuppress="true" > diff --git a/test/StreamTest.php b/test/StreamTest.php index 1b72fb31..d156cd6a 100644 --- a/test/StreamTest.php +++ b/test/StreamTest.php @@ -613,7 +613,7 @@ public function testRaisesExceptionOnConstructionForNonStreamResources(): void $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('stream'); - /** @psalm-suppress ImplicitToStringCast, PossiblyInvalidArgument */ + /** @psalm-suppress PossiblyInvalidArgument */ new Stream($resource); } diff --git a/test/UriTest.php b/test/UriTest.php index 848241af..5c65b192 100644 --- a/test/UriTest.php +++ b/test/UriTest.php @@ -166,7 +166,7 @@ public function testWithPortReturnsNewInstanceWithProvidedPort($port): void public function testWithPortReturnsSameInstanceWithProvidedPortIsSameAsBefore(): void { $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz'); - /** @psalm-suppress PossiblyInvalidArgument,InvalidArgument */ + /** @psalm-suppress InvalidArgument */ $new = $uri->withPort('3001'); $this->assertSame($uri, $new); $this->assertSame(3001, $new->getPort());