1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
Brown
fd4ced42a7 Don’t register new assignment inside isset expr 2020-07-31 12:44:01 -04:00
Brown
57cd21346c Fix #3914 - treat $i++ like $i = $i + 1 2020-07-31 11:26:54 -04:00
Brown
a8c0d81dc1 Prevent bool > 1 in strict mode 2020-07-30 11:25:47 -04:00
Brown
74eea18563 Add better checks 2020-07-26 19:09:26 -04:00
Brown
d9d5fdd6c9 Add more rules around positive ints 2020-07-26 18:29:17 -04:00
Matthew Brown
806db80d63 Fix #3440 - literal string doesn’t contain numeric-string 2020-05-24 22:42:08 -04:00
SignpostMarv
911ac2d363
Infer numeric-string from (string)$numeric (#3390)
* adding test for vimeo/psalm#3370

* check if typecast will result in numeric-string

* int & float as per examples in vimeo/psalm#3370
* numeric & numeric-string because they shouldn't lose numericness.

* satisfy phpcs

* adjusting assertions to reflect typecasting change
2020-05-18 13:42:47 -04:00
Brown
21798efed2 Fix #3388 - eliminate null after < 0 check 2020-05-18 08:52:44 -04:00
Brown
ea0a670230 Flesh out class constants in function call return type
Fixes #2884
2020-02-26 17:28:44 -05:00
Matthew Brown
9f13341ef9 Fix #2827 - detect literal numeric values 2020-02-22 00:16:15 -05:00
Brown
b87161785d Be even more permissive 2020-02-13 17:58:15 -05:00
Brown
cecc5ed798 Move constant tests 2020-02-07 10:47:42 -05:00
Matthew Brown
e92656c4cb Fix #2707 - reconcile object equality properly 2020-01-29 21:25:44 -05:00
SignpostMarv
fbf66ba7f6 Typecast bool to int (#2550)
* adding specific checks for typecasting booleans, re: vimeo/psalm#2548

* satisfying phpcs

* amend check to use psalm types rather than php-parser types

* implementing tests for typecasting bools to int

* satisfying phpcs
2020-01-04 16:36:19 -05:00
Matthew Brown
d7fdd9b179 Move more tests into appropriate directory 2019-12-07 13:38:06 -05:00