Skip to content

Commit bbb1714

Browse files
committed
fix: coding-standard follow-ups for the 8.2 cs-check run
- Add missing `use function assert;` import in GlobTypeMapperCache so the new assertion satisfies the Slevomat no-fallback-global-function rule. - Exclude SlevomatCodingStandard.TypeHints.ClassConstantTypeHint: the rule expects PHP 8.3 typed class constants, but our minimum supported PHP is 8.2 so the rule can't be satisfied. Re-enable when min PHP lifts to 8.3.
1 parent 1f47699 commit bbb1714

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

phpcs.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
<exclude name="Squiz.Commenting.FunctionComment.InvalidNoReturn" />
3030
<exclude name="Generic.Formatting.MultipleStatementAlignment" />
3131
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace" />
32+
<!-- Requires PHP 8.3 typed class constants; our minimum supported PHP is 8.2 so this
33+
rule can't be satisfied without a runtime bump. Re-enable when min PHP >= 8.3. -->
34+
<exclude name="SlevomatCodingStandard.TypeHints.ClassConstantTypeHint" />
3235
</rule>
3336

3437
<!-- Do not align assignments -->

src/Mappers/GlobTypeMapperCache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use ReflectionClass;
88

99
use function array_keys;
10+
use function assert;
1011

1112
/**
1213
* The cached results of a GlobTypeMapper

0 commit comments

Comments
 (0)