Skip to content

Commit ec05f9d

Browse files
committed
Fixed phpstan issues
1 parent 1c3dfa2 commit ec05f9d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

phpstan.dist.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ parameters:
5959
- '#expects .*PartParameter, .*AbstractParameter given.#'
6060
- '#Part::getParameters\(\) should return .*AbstractParameter#'
6161

62+
# Fix some weird issue with how covariance with collections is solved
63+
- '#Method App\\Entity\\Base\\AbstractStructuralDBElement::getParameters\(\) should return Doctrine\\Common\\Collections\\Collection<int, App\\Entity\\Parameters\\AbstractParameter> but returns#'
64+
6265
# Ignore doctrine type mapping mismatch
6366
- '#Property .* type mapping mismatch: property can contain .* but database expects .*#'
6467

@@ -70,3 +73,6 @@ parameters:
7073

7174
- message: '#Access to an undefined property Brick\\Schema\\Interfaces\\#'
7275
path: src/Services/InfoProviderSystem/Providers/GenericWebProvider.php
76+
77+
-
78+
identifier: nullCoalesce.property

src/Doctrine/Functions/SiValueSort.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public static function sqliteSiValue(?string $value): ?float
189189
return $number;
190190
}
191191

192-
$multiplier = self::SI_MULTIPLIERS[$prefix] ?? 1.0;
192+
$multiplier = self::SI_MULTIPLIERS[$prefix] ?? 1.0; //@phpstan-ignore-line - fallback to 1.0 if prefix is not recognized (should not happen due to regex)
193193

194194
return $number * $multiplier;
195195
}

0 commit comments

Comments
 (0)