1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00
Commit Graph

69 Commits

Author SHA1 Message Date
Matt Brown
f8e22ab7ac
Break out array_key_exists tests 2021-01-29 11:47:12 +01:00
Matt Brown
033a209950
Treat $a ?? $b identically to isset($a) ? $a : $b 2021-01-29 11:46:26 +01:00
Matt Brown
068907327d
Fix #4637 - prevent regression when negating function call with === false 2021-01-29 11:46:18 +01:00
Matt Brown
7b4f0745f5
Simplify assertion negations, centralising as much as possible
Now the flag passed to scrapeAssertions just determines the errors emitted
2021-01-29 11:46:16 +01:00
Matt Brown
57cd29ee9d
Put assignment-in-conditional tests in their own file 2021-01-29 11:46:04 +01:00
Matt Brown
8b44459c7c
Fix overeager inference 2021-01-29 11:45:02 +01:00
Matt Brown
7df404bfb5
Fix #4374 - prevent paradox and allow Psalm to understand more assignments in conditionals 2021-01-29 11:41:13 +01:00
Matt Brown
481cf84b94
Don’t overwrite true flag 2021-01-29 11:39:58 +01:00
Matt Brown
74d6f166c1
Be more explicit about negation 2021-01-29 11:39:58 +01:00
Matt Brown
8043683f26
Ignore just-coerced vars 2021-01-29 11:39:58 +01:00
Matt Brown
596811cdc1
Suppress errors from fake statements 2021-01-29 11:39:58 +01:00
Matt Brown
c5c177a80a
Improve binary op || analysis for chain 2021-01-29 11:39:57 +01:00
Matt Brown
596e71d6aa
Unskip now-working tests 2021-01-29 11:39:57 +01:00
Matt Brown
2d8d1b9bf7
Fix #4354 - allow assignments on RHS of || in if conditional 2021-01-29 11:39:57 +01:00
Matt Brown
0f8b017384
Prevent features pre-php-8 2021-01-29 11:39:54 +01:00
Matt Brown
3f5cb4db1f
Warn about impossible/redundant conditions in RHS of || 2021-01-29 11:39:50 +01:00
Matt Brown
d1b81e9b80
Improve error message 2021-01-29 11:39:50 +01:00
Matt Brown
2a755cce8c
Always check LHS of or condition before applying to RHS 2021-01-29 11:39:49 +01:00
Matt Brown
956199c688
4.x - add support for the nullsafe operator 2021-01-29 11:39:47 +01:00
orklah
e3e5a55907
unused use statements (#4228) 2021-01-29 11:39:42 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
Brown
6d43a6696c
Make clause fully immutable 2021-01-29 11:38:46 +01:00
Matthew Brown
cb243778d2 Fix #3917 - allow comparisons between classes and interfaces 2020-08-16 16:25:59 -04:00
Brown
e0f5595307 Fix #3932 - try to get assertions of negated expression if instant negation fails 2020-08-05 16:53:30 -04:00
Brown
7ef3d4711f Fix some more tests 2020-07-21 23:16:56 -04:00
Brown
f0a5463834 Catch string subtypes that cannot be identical 2020-07-14 10:08:31 -04:00
Brown
68fe66fcf6 Fix tests 2020-06-25 01:33:02 -04:00
Brown
7a7cd91c24 Fix #3631 - better treatment for assignments in complex conditionals 2020-06-24 13:16:52 -04:00
Brown
4d6fc4d0ca Fix get_class($foo) === static::class checks 2020-06-23 13:11:19 -04:00
Brown
1f86afece7 Revert "Fix #3631 - apply assertions to RHS of equality in conditional"
This reverts commit 9c17795545.
2020-06-22 20:01:27 -04:00
Brown
9c17795545 Fix #3631 - apply assertions to RHS of equality in conditional 2020-06-22 15:16:16 -04:00
Brown
9ca6c868b7 Fix #3563 - add workaround for == true 2020-06-12 10:58:44 -04:00
Brown
21798efed2 Fix #3388 - eliminate null after < 0 check 2020-05-18 08:52:44 -04:00
Brown
ae48c1895f Fix #3365 - add support for negated empty string checks 2020-05-14 22:09:37 -04:00
Pierre Grimaud
e7990390a6
Fix typos (#3255) 2020-04-28 09:17:31 -04:00
Brown
9d2957d339 Fix a few more edge-cases 2020-04-12 01:26:11 -04:00
Brown
db7447abd7 Make array coercion-to--mixed rules a little more lenient 2020-04-10 16:21:48 -04:00
Brown
bd2104c5ba Merge with mixed in nested arrays 2020-04-09 09:27:21 -04:00
Matthew Brown
1b88316c51 Convert method from recursive to inline 2020-03-29 19:42:22 -04:00
Matthew Brown
15c6778223 Add test that passes 2020-03-29 18:59:48 -04:00
Matthew Brown
c5fa07920c Fix improper property var calculation
Ref #1332
2020-03-11 11:03:27 -04:00
Matthew Brown
97a849b1be Fix #1311 - narrow scalar properly, exploding constituent types 2020-02-22 20:25:13 -05:00
Brown
34408a892c Support has-at-least type in negation 2020-01-31 13:13:50 -05:00
Matthew Brown
1f777bec0e Capture non-empty-string from concat more effectively 2020-01-07 01:44:12 -05:00
Matthew Brown
cc9e0fab67 Prevent string being used in non-empty-string location 2020-01-06 20:57:57 -05:00
Brown
5c45221bdc Improve reconciliation of ||
Ref #2426
2020-01-06 16:37:44 -05:00
Brown
8e786a17dd Deal with a reconciled var more accurately
Ref #2426
2020-01-06 11:09:07 -05:00
Matthew Brown
4888ae67a6 Fix #2558 - remove wedge clauses when they’re the only thing left 2020-01-06 08:56:50 -05:00
Matthew Brown
4021d673bd Fix #2536 - grab binary op left assertions after analysis 2020-01-01 12:45:24 -05:00
Matthew Brown
982fe627e0 Fix #2515 - allow chained assertions on @psalm-mutation-free methods 2019-12-27 16:44:55 -05:00