Skip to content

Commit fb191de

Browse files
committed
Fix psalm errors
1 parent 3374d9e commit fb191de

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^8.0"
21+
"php": "^8.1"
2222
},
2323
"autoload": {
2424
"psr-4": {

src/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/**
1818
* @psalm-import-type VersionStringType from VersionInterface
19-
*/
19+
*/
2020
final class Version implements ComparableInterface
2121
{
2222
use Comparable;

src/Version/Comparable.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
/**
1818
* @mixin ComparableInterface
19+
* @mixin VersionInterface
20+
*
1921
* @psalm-require-implements ComparableInterface
22+
* @psalm-require-implements VersionInterface
23+
*
2024
* @psalm-import-type VersionStringType from VersionInterface
2125
*/
2226
trait Comparable
@@ -36,6 +40,7 @@ private function make(VersionInterface|string $version): VersionInterface
3640

3741
/**
3842
* {@inheritDoc}
43+
* @psalm-suppress ArgumentTypeCoercion
3944
*/
4045
public function eq(VersionInterface|string $version): bool
4146
{
@@ -44,6 +49,7 @@ public function eq(VersionInterface|string $version): bool
4449

4550
/**
4651
* {@inheritDoc}
52+
* @psalm-suppress ArgumentTypeCoercion
4753
*/
4854
public function neq(VersionInterface|string $version): bool
4955
{
@@ -52,6 +58,7 @@ public function neq(VersionInterface|string $version): bool
5258

5359
/**
5460
* {@inheritDoc}
61+
* @psalm-suppress ArgumentTypeCoercion
5562
*/
5663
public function gt(VersionInterface|string $version): bool
5764
{
@@ -60,6 +67,7 @@ public function gt(VersionInterface|string $version): bool
6067

6168
/**
6269
* {@inheritDoc}
70+
* @psalm-suppress ArgumentTypeCoercion
6371
*/
6472
public function gte(VersionInterface|string $version): bool
6573
{
@@ -68,6 +76,7 @@ public function gte(VersionInterface|string $version): bool
6876

6977
/**
7078
* {@inheritDoc}
79+
* @psalm-suppress ArgumentTypeCoercion
7180
*/
7281
public function lt(VersionInterface|string $version): bool
7382
{
@@ -76,6 +85,7 @@ public function lt(VersionInterface|string $version): bool
7685

7786
/**
7887
* {@inheritDoc}
88+
* @psalm-suppress ArgumentTypeCoercion
7989
*/
8090
public function lte(VersionInterface|string $version): bool
8191
{

src/VersionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface VersionInterface
1919
/**
2020
* Returns string representation of the version.
2121
*
22-
* @return non-empty-string
22+
* @return VersionStringType
2323
*/
2424
public function toString(): string;
2525
}

0 commit comments

Comments
 (0)