From 81a228e2714a08d0c5785e3c63fb45007240f63f Mon Sep 17 00:00:00 2001 From: mondrake <1174864+mondrake@users.noreply.github.com> Date: Wed, 13 May 2026 22:22:51 +0200 Subject: [PATCH 1/2] Fix: Remove unmatched PHPStan ignore comments in BaseMap.php PHPStan is reporting "No error with identifier assign.propertyType is reported" errors on lines 170, 174, 223, and 273 because the @phpstan-ignore comments are no longer necessary. These ignore directives are for the `assign.propertyType` error, but the code no longer triggers this error. Removed the unmatched ignore comments to resolve the PHPStan errors. --- src/Map/BaseMap.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Map/BaseMap.php b/src/Map/BaseMap.php index b3fd8d32..c324bee9 100644 --- a/src/Map/BaseMap.php +++ b/src/Map/BaseMap.php @@ -166,11 +166,9 @@ protected function getMapSubEntry(string $entry, string $entryKey, string $subEn protected function addMapSubEntry(string $entry, string $entryKey, string $subEntry, string $value): MapInterface { if (!isset(static::$map[$entry][$entryKey][$subEntry])) { - // @phpstan-ignore assign.propertyType static::$map[$entry][$entryKey][$subEntry] = [$value]; } else { if (array_search($value, static::$map[$entry][$entryKey][$subEntry]) === false) { - // @phpstan-ignore assign.propertyType static::$map[$entry][$entryKey][$subEntry][] = $value; } } @@ -206,12 +204,10 @@ protected function removeMapSubEntry(string $entry, string $entryKey, string $su } // Remove the map sub entry key. - // @phpstan-ignore assign.propertyType unset(static::$map[$entry][$entryKey][$subEntry][$k]); // Remove the sub entry if no more values. if (empty(static::$map[$entry][$entryKey][$subEntry])) { - // @phpstan-ignore assign.propertyType unset(static::$map[$entry][$entryKey][$subEntry]); } else { // Resequence the remaining values. @@ -219,13 +215,11 @@ protected function removeMapSubEntry(string $entry, string $entryKey, string $su foreach (static::$map[$entry][$entryKey][$subEntry] as $v) { $tmp[] = $v; } - // @phpstan-ignore assign.propertyType static::$map[$entry][$entryKey][$subEntry] = $tmp; } // Remove the entry if no more values. if (empty(static::$map[$entry][$entryKey])) { - // @phpstan-ignore assign.propertyType unset(static::$map[$entry][$entryKey]); } @@ -269,7 +263,6 @@ protected function setValueAsDefault(string $entry, string $entryKey, string $su } $tmp[] = $v; } - // @phpstan-ignore assign.propertyType static::$map[$entry][$entryKey][$subEntry] = $tmp; return $this; From 307f3d531ea8fdf2bfec6ede5bc3e63cc0dd8b74 Mon Sep 17 00:00:00 2001 From: mondrake <1174864+mondrake@users.noreply.github.com> Date: Wed, 13 May 2026 22:26:48 +0200 Subject: [PATCH 2/2] Fix: Remove unmatched PHPStan ignore comments in BaseMap.php PHPStan is reporting "No error with identifier assign.propertyType is reported" errors on lines 170, 174, 223, and 273 because the @phpstan-ignore comments are no longer necessary. These ignore directives are for the `assign.propertyType` error, but the code no longer triggers this error. Kept the valid ignore comments on lines 78, 209, 214, and 228 which are still needed. Removed only the unmatched ignore comments to resolve the PHPStan errors. --- src/Map/BaseMap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Map/BaseMap.php b/src/Map/BaseMap.php index c324bee9..608c1dd2 100644 --- a/src/Map/BaseMap.php +++ b/src/Map/BaseMap.php @@ -204,10 +204,12 @@ protected function removeMapSubEntry(string $entry, string $entryKey, string $su } // Remove the map sub entry key. + // @phpstan-ignore assign.propertyType unset(static::$map[$entry][$entryKey][$subEntry][$k]); // Remove the sub entry if no more values. if (empty(static::$map[$entry][$entryKey][$subEntry])) { + // @phpstan-ignore assign.propertyType unset(static::$map[$entry][$entryKey][$subEntry]); } else { // Resequence the remaining values. @@ -220,6 +222,7 @@ protected function removeMapSubEntry(string $entry, string $entryKey, string $su // Remove the entry if no more values. if (empty(static::$map[$entry][$entryKey])) { + // @phpstan-ignore assign.propertyType unset(static::$map[$entry][$entryKey]); }