Skip to content

Commit 04d543b

Browse files
Fixes
1 parent 26a4f3a commit 04d543b

File tree

7 files changed

+42
-18
lines changed

7 files changed

+42
-18
lines changed

phpstan-baseline.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ parameters:
2020
count: 1
2121
path: src/Api/AbstractApi.php
2222

23+
-
24+
message: "#^PHPDoc tag @return contains generic type Http\\\\Promise\\\\Promise\\<Psr\\\\Http\\\\Message\\\\ResponseInterface\\> but interface Http\\\\Promise\\\\Promise is not generic\\.$#"
25+
count: 1
26+
path: src/HttpClient/Plugin/Authentication.php
27+
28+
-
29+
message: "#^PHPDoc tag @return contains generic type Http\\\\Promise\\\\Promise\\<Psr\\\\Http\\\\Message\\\\ResponseInterface\\> but interface Http\\\\Promise\\\\Promise is not generic\\.$#"
30+
count: 1
31+
path: src/HttpClient/Plugin/ExceptionThrower.php
32+
2333
-
2434
message: "#^Cannot cast mixed to string\\.$#"
2535
count: 1

psalm-baseline.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
2+
<files psalm-version="5.23.1@8471a896ccea3526b26d082f4461eeea467f10a4">
33
<file src="src/Api/AbstractApi.php">
44
<InvalidArgument>
55
<code><![CDATA[function () use ($filename, $mode, &$ex): void {
@@ -17,6 +17,16 @@
1717
<code><![CDATA['is_int']]></code>
1818
</TypeDoesNotContainType>
1919
</file>
20+
<file src="src/HttpClient/Plugin/Authentication.php">
21+
<TooManyTemplateParams>
22+
<code><![CDATA[Promise<ResponseInterface>]]></code>
23+
</TooManyTemplateParams>
24+
</file>
25+
<file src="src/HttpClient/Plugin/ExceptionThrower.php">
26+
<TooManyTemplateParams>
27+
<code><![CDATA[Promise<ResponseInterface>]]></code>
28+
</TooManyTemplateParams>
29+
</file>
2030
<file src="src/ResultPager.php">
2131
<InaccessibleProperty>
2232
<code><![CDATA[$clone->perPage]]></code>

psalm.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
xmlns="https://getpsalm.org/schema/config"
77
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
88
errorBaseline="psalm-baseline.xml"
9+
findUnusedBaselineEntry="true"
10+
findUnusedCode="false"
911
>
1012
<issueHandlers>
1113
<PossiblyInvalidDocblockTag errorLevel="info" />

src/Api/Repositories.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,37 +144,39 @@ public function createTag($project_id, string $name, string $ref, ?string $messa
144144
}
145145

146146
/**
147-
* @param int|string $project_id
148-
* @param string $tag_name
149-
* @param string $description
150-
* @param ?string $name
147+
* @param int|string $project_id
148+
* @param string $tag_name
149+
* @param string $description
150+
* @param string|null $name
151151
*
152152
* @return mixed
153153
*/
154154
public function createRelease($project_id, string $tag_name, string $description, ?string $name = null)
155155
{
156-
return $this->post($this->getProjectPath($project_id, 'releases'), [
156+
return $this->post($this->getProjectPath($project_id, 'releases'), array_filter([
157157
'id' => $project_id,
158158
'tag_name' => $tag_name,
159159
'description' => $description,
160-
'name' => $name ?? $tag_name,
161-
]);
160+
'name' => $name,
161+
], fn ($v) => null !== $v));
162162
}
163163

164164
/**
165-
* @param int|string $project_id
166-
* @param string $tag_name
167-
* @param string $description
165+
* @param int|string $project_id
166+
* @param string $tag_name
167+
* @param string $description
168+
* @param string|null $name
168169
*
169170
* @return mixed
170171
*/
171-
public function updateRelease($project_id, string $tag_name, string $description)
172+
public function updateRelease($project_id, string $tag_name, string $description, ?string $name = null)
172173
{
173-
return $this->put($this->getProjectPath($project_id, 'releases/'.self::encodePath($tag_name)), [
174+
return $this->put($this->getProjectPath($project_id, 'releases/'.self::encodePath($tag_name)), array_filter([
174175
'id' => $project_id,
175176
'tag_name' => $tag_name,
176177
'description' => $description,
177-
]);
178+
'name' => $name,
179+
], fn ($v) => null !== $v));
178180
}
179181

180182
/**

vendor-bin/phpstan/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"require": {
33
"php": "^8.1",
4-
"phpstan/phpstan": "1.10.47",
4+
"phpstan/phpstan": "1.10.62",
55
"phpstan/phpstan-deprecation-rules": "1.1.4",
66
"phpstan/phpstan-strict-rules": "1.5.2",
77
"thecodingmachine/phpstan-strict-rules": "1.0.0",
8-
"ergebnis/phpstan-rules": "2.1.0"
8+
"ergebnis/phpstan-rules": "2.2.0"
99
},
1010
"config": {
1111
"preferred-install": "dist"

vendor-bin/phpunit/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
33
"php": "^7.4.15 || ^8.0.2",
4-
"phpunit/phpunit": "^9.6.15 || ^10.5.1"
4+
"phpunit/phpunit": "^9.6.17 || ^10.5.13"
55
},
66
"config": {
77
"preferred-install": "dist"

vendor-bin/psalm/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
33
"php": "^8.1",
4-
"psalm/phar": "5.16.0"
4+
"psalm/phar": "5.23.1"
55
},
66
"config": {
77
"preferred-install": "dist"

0 commit comments

Comments
 (0)