phpstan: Fix generic type errors (#446)

This commit is contained in:
Johannes Meyer 2024-04-22 10:48:39 +02:00 committed by GitHub
commit 1c38d23d3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 13 deletions

View file

@ -41,7 +41,6 @@ trait Sort
return $this;
}
/** @var array<int, string> $res */
$res = Str::symmetricSplit($sort, ' ', 2, 'asc');
[$sortBy, $direction] = $res;

View file

@ -15,13 +15,13 @@ abstract class Storage
protected static $instance;
/**
* @var ConfigObject
* @var ConfigObject<string>
*/
protected $config;
/**
* Storage constructor.
* @param ConfigObject $config
* @param ConfigObject<string> $config
*/
public function __construct(ConfigObject $config)
{

View file

@ -3570,11 +3570,6 @@ parameters:
count: 1
path: library/Businessprocess/Storage/LegacyStorage.php
-
message: "#^Method Icinga\\\\Module\\\\Businessprocess\\\\Storage\\\\Storage\\:\\:__construct\\(\\) has parameter \\$config with generic class Icinga\\\\Data\\\\ConfigObject but does not specify its types\\: TValue$#"
count: 1
path: library/Businessprocess/Storage/Storage.php
-
message: "#^Method Icinga\\\\Module\\\\Businessprocess\\\\Storage\\\\Storage\\:\\:deleteProcess\\(\\) has parameter \\$name with no type specified\\.$#"
count: 1
@ -3615,11 +3610,6 @@ parameters:
count: 1
path: library/Businessprocess/Storage/Storage.php
-
message: "#^Property Icinga\\\\Module\\\\Businessprocess\\\\Storage\\\\Storage\\:\\:\\$config with generic class Icinga\\\\Data\\\\ConfigObject does not specify its types\\: TValue$#"
count: 1
path: library/Businessprocess/Storage/Storage.php
-
message: "#^Method Icinga\\\\Module\\\\Businessprocess\\\\Web\\\\Component\\\\BpDashboardTile\\:\\:__construct\\(\\) has parameter \\$attributes with no type specified\\.$#"
count: 1