Skip to content

Commit

Permalink
Fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jan 15, 2025
1 parent 8c84043 commit 11ca159
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
12 changes: 0 additions & 12 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ parameters:
count: 1
path: src/Package/SymlinkDumper.php

-
message: '#^Method App\\Package\\Updater\:\:sanitize\(\) should return T of string\|null but returns null\.$#'
identifier: return.type
count: 1
path: src/Package/Updater.php

-
message: '#^Method App\\Package\\Updater\:\:sanitize\(\) should return T of string\|null but returns string\.$#'
identifier: return.type
count: 1
path: src/Package/Updater.php

-
message: '#^Parameter \#1 \$ids of method App\\Entity\\PackageRepository\:\:getPackagesWithVersions\(\) expects list\<int\>\|null, array\<int\<0, max\>, int\> given\.$#'
identifier: argument.type
Expand Down
5 changes: 2 additions & 3 deletions src/Package/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,8 @@ private function prepareReadme(string $readme, ?string $host = null, ?string $ow
}

/**
* @template T of string|null
* @phpstan-param T $str
* @phpstan-return T
* @phpstan-param string|null $str
* @phpstan-return ($str is string ? string : null)
*/
private function sanitize(string|null $str): string|null
{
Expand Down

0 comments on commit 11ca159

Please sign in to comment.