Skip to content

Commit

Permalink
phpstan: Fix generic type errors (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg authored Apr 22, 2024
2 parents 77d5af4 + 980ea85 commit 1c38d23
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion library/Businessprocess/Common/Sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function setSort(?string $sort): self
return $this;
}

/** @var array<int, string> $res */
$res = Str::symmetricSplit($sort, ' ', 2, 'asc');
[$sortBy, $direction] = $res;

Expand Down
4 changes: 2 additions & 2 deletions library/Businessprocess/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline-standard.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1c38d23

Please sign in to comment.