3906600d44
Fix CS
2023-09-20 19:44:53 +01:00
3f7abf29a8
Added PHPStan rule to flag usages of legacy enum accessors provided by LegacyEnumShimTrait
...
closes #6061
2023-09-20 19:42:21 +01:00
c1638ffaab
Ban foreach by-reference at the PHPStan level
2023-08-08 17:08:13 +01:00
537721fe7d
Replace Closure::fromCallable() usages with first-class callables
...
PHP 8.1 <3
2023-07-19 13:34:42 +01:00
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
345ac75aac
Remove PHPStan rules (no longer needed)
...
this is enforced by php-cs-fixer now instead.
2022-01-20 19:25:34 +00:00
6846f1e78a
Replace disallowed operators in tests/
2022-01-20 16:48:36 +00:00
b60dd1e9b4
Ban 'and' and 'or' operators via PHPStan
2022-01-20 16:44:59 +00:00
f1723acfd3
UnsafeForeachArrayOfStringRule: use statically analysable function reference
...
this will ensure that it get automatically updated during refactors.
2022-01-18 00:23:29 +00:00
8da27ea0aa
UnsafeForeachArrayOfStringRule: fixed outdated function name
2022-01-18 00:15:44 +00:00
6d249026cc
Merge branch 'legacy/pm3' into stable
2022-01-07 20:15:15 +00:00
269231c228
Ban foreach(arrayWithStringKeys as k => v)
...
this is not as good as phpstan/phpstan-src#769 (e.g. array_key_first()/array_key_last() aren't covered by this, nor is array_rand()) but it does eliminate the most infuriating cases where this usually crops up.
2021-11-15 22:52:05 +00:00
b534ae050e
DisallowEnumComparisonRule: detect bugs involving union types (Enum|null compared to Enum|null)
2020-11-14 16:51:13 +00:00
0e1cea043a
added some phpstan-specific generic type annotations
2020-01-13 15:05:02 +00:00
a733f094ac
phpstan: added a custom rule to disallow strict equality operators on enum members
...
comparing enums with equality operators is unreliable because there is no guarantee that the enum objects won't be somehow duplicated, through serialization, cloning or ext-parallel dumb object copying. This means that two equal enum objects may not be thw same object.
2020-01-08 19:45:05 +00:00