1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

72 Commits

Author SHA1 Message Date
Matthew Brown
c5fa07920c Fix improper property var calculation
Ref #1332
2020-03-11 11:03:27 -04:00
Brown
3c416482ec Fix #2932 - don’t crash when trying to expand callable object-like array 2020-03-09 10:56:37 -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
97a849b1be Fix #1311 - narrow scalar properly, exploding constituent types 2020-02-22 20:25:13 -05:00
Matthew Brown
2635e57cde Negation of numeric on array-key is fine too 2020-02-22 12:53:27 -05:00
Matthew Brown
ae1360a52f An array-key can be numeric 2020-02-22 12:34:27 -05:00
Matthew Brown
952045e2ba Fix return type checks 2020-02-22 11:28:24 -05:00
Matthew Brown
1c218c020e Fix #1684 - detect error in assertion on return type of direct call 2020-02-22 10:41:57 -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
Matthew Brown
3559fdd6b3 Fix #2742 - prevent paradoxes in assert calls 2020-02-09 11:42:41 -05:00
Brown
cecc5ed798 Move constant tests 2020-02-07 10:47:42 -05:00
Brown
7bad2042f8 Skip failing test 2020-02-06 18:45:03 -05:00
Brown
d5f71bf529 Localise template checks to class being tested 2020-02-06 16:38:45 -05:00
Matthew Brown
292f6e797f Only make directly-assertable things possibly-undefined
Ref #2724
2020-02-01 10:58:13 -05:00
Matthew Brown
f2347303c9 Skip correct test 2020-02-01 01:43:26 -05:00
Matthew Brown
255ffa05ea
Skip another failing test 2020-01-31 17:59:29 -05:00
Matthew Brown
6f75903948
Fix dupe key 2020-01-31 17:47:11 -05:00
Brown
a40bfbd2b2 Add back skipped tests for the moment 2020-01-31 17:27:39 -05:00
Brown
3b6f53a356 Revert "Fix #2724 - make sure behaviour is not dependent on array type"
This reverts commit 1df03b0ff2.
2020-01-31 17:25:15 -05:00
Brown
1df03b0ff2 Fix #2724 - make sure behaviour is not dependent on array type 2020-01-31 16:46:05 -05:00
Brown
34408a892c Support has-at-least type in negation 2020-01-31 13:13:50 -05:00
Brown
37765098e9 Fix #2725 - allow empty checks on objects that implement countable 2020-01-31 12:55:33 -05:00
Matthew Brown
e92656c4cb Fix #2707 - reconcile object equality properly 2020-01-29 21:25:44 -05:00
Matthew Brown
c87b19eeb0 Fix #2681 - no error after empty check on literal value 2020-01-23 22:26:49 -05:00
Matthew Brown
8ccd4860e3 fclose should treat resource as passed-by-reference 2020-01-17 13:12:00 -05:00
Matthew Brown
7f093ca8ed Fix #2626 - allow assertions on resource types
Also fixes #2266
2020-01-17 11:55:16 -05:00
Matthew Brown
4a03c4aedd Fix impossible isset checks 2020-01-14 21:54:02 -05:00
Matthew Brown
c3edbdbc19 Allow checking $_SESSION for null without altering type 2020-01-14 21:51:04 -05:00
Brown
0f6b61d62d Clone isset type before contradicting 2020-01-14 18:28:32 -05:00
Matthew Brown
e1daf26202 Improve support for null coalesce checks 2020-01-14 00:53:38 -05:00
Matthew Brown
b0073d4558 Fix #2614 - prevent isset($string) 2020-01-13 21:27:09 -05:00
Matthew Brown
131fb97663 Fix #2594 - forbid isset check on null 2020-01-11 15:58:40 -05:00
Matthew Brown
1b7b71f2ca Fix #2591 - always remove changed var from parent clauses
Even when there are no child clauses due to an assertion
2020-01-10 23:46:45 -05:00
Brown
5ddcab1003 Fix subtraction of string from numeric 2020-01-10 18:05:45 -05:00
Brown
bd9142f131 Fix #2574 - remove assertions after increment 2020-01-09 11:51:56 -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
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
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Matthew Brown
71cdaf6345 Fix tests 2020-01-02 08:37:54 -05:00
Matthew Brown
4021d673bd Fix #2536 - grab binary op left assertions after analysis 2020-01-01 12:45:24 -05:00
Matthew Brown
0c7851ae21 Fix #2526 - always check for array assignment in assignop 2019-12-29 08:36:46 -05:00
Matthew Brown
982fe627e0 Fix #2515 - allow chained assertions on @psalm-mutation-free methods 2019-12-27 16:44:55 -05:00
Matthew Brown
4a28525275 Fix removal of traversable from iterable
Fixes #2509
2019-12-27 13:01:44 -05:00
Matthew Brown
141bfd313f Improve handling of assignments in arrays 2019-12-22 12:36:16 +00:00
Matthew Brown
8fc3c3b8cd Improve removing types from callable 2019-12-22 10:29:00 +00:00