Skip to content

Conversation

kamil-zacek
Copy link
Contributor

No description provided.

@kamil-zacek kamil-zacek force-pushed the unsupported-value-lt-gt branch 9 times, most recently from 81ae0c3 to 7b569cc Compare June 27, 2023 14:56
…an value for greater / smaller comparison is not allowed).
@kamil-zacek kamil-zacek force-pushed the unsupported-value-lt-gt branch from 7b569cc to 47a3db0 Compare June 27, 2023 15:12
@janedbal
Copy link

janedbal commented Sep 1, 2023

Here is a more generic approach: https://github.com/shipmonk-rnd/phpstan-rules#allowcomparingonlycomparabletypes

Denies using comparison operators >,<,<=,>=,<=> over anything other than int|string|float|DateTimeInterface. Null is not allowed.
Mixing different types in those operators is also forbidden, only exception is comparing floats with integers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants