1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

128 Commits

Author SHA1 Message Date
Matthew Brown
03ed1a5135 Fix #1016 - load stdClass info when an object cast comes along 2018-10-11 09:14:34 -04:00
Matthew Brown
96768ffd48 Fix wrong redundant condition converting scalar to string 2018-10-10 01:57:11 -04:00
Matt Brown
661087d445 Allow float to be empty (0.00) 2018-09-10 15:38:31 -04:00
Matthew Brown
334c463e08 Fix #977 - improve handling of orred expressions 2018-09-10 00:13:59 -04:00
Matt Brown
4d676afaef Fix #985 - strip null from object type where possible 2018-09-07 11:01:10 -04:00
Matt Brown
caf65ca8a9 Fix #957 - allow assertions on $_GET, $_POST, $_SERVER etc 2018-08-24 16:48:14 -04:00
Matthew Brown
3b12ce4a31 Fix #874 - add support for is_iterable 2018-07-09 08:31:43 -04:00
Matthew Brown
8bdeb5ed65 Fix #864 - only create intersection types when dealing with classes & interfaces 2018-07-05 19:46:33 -04:00
Matthew Brown
76e369d330 Allow multiple matching types to be captured in if 2018-07-02 22:53:17 -04:00
Matthew Brown
c354a024d8 Fix #856 - perform better class filtering based on parent classes 2018-07-02 21:59:40 -04:00
Matthew Brown
6267fa7d1d Fix #850 - allow is_numeric to refine scalar type 2018-06-30 10:52:45 -04:00
Matt Brown
1ca5ef9bf7 Prevent duplicate classes in same file 2018-06-29 15:39:17 -04:00
Matt Brown
5f251a9d88 Allow intersection creation of interface then class 2018-06-28 18:13:06 -04:00
Matt Brown
ffda44c3ba Fix #838 - check assertions, even outside conditionals 2018-06-25 18:02:05 -04:00
Matthew Brown
3a2fa99969 Improve coverage of Reconciler and fix issues with float type comparison 2018-06-10 10:48:19 -04:00
Matt Brown
eb10b15cfc Improve reliability of elseif resolution 2018-05-30 18:56:44 -04:00
Matthew Brown
09eb316a9c Fix #755 - add support for inferring explicit true checks 2018-05-19 00:41:07 -04:00
Matthew Brown
b0733254bb
Use individual type objects for each string (#757)
* Experiment with individual types for each string

* Fix bunch of errors

* Fix a few more issues

* Fix a whole bunch of bugs

* Fix most remaining bugs

* Fix isset warnings

* Fix psalm errors in psalm

* Limit big string size

* Fix falsiness of ints

* Fix issue with type widening, allowing value set in nested if to be altered

* Don’t complain if type is mixed

* Add skipped-for-now test

* Add specific test to address issue
2018-05-18 11:02:50 -04:00
Matt Brown
3263b64301 Filter conditions better when encountering parent instanceof 2018-05-16 11:47:39 -04:00
Matt Brown
02d65b617b Allow weak comparison between floats and ints 2018-05-14 12:02:06 -04:00
Matt Brown
58c68c355e Allow weak equality between scalar types 2018-05-14 10:36:41 -04:00
Matthew Brown
d46997b196 Make sure weak equality clauses don’t generate ParadoxicalCondition 2018-05-13 01:27:45 -04:00
Matthew Brown
9f28be415a Fix reconciliation of ored types 2018-05-13 00:54:12 -04:00
Matthew Brown
8e90334428 Allow assignment to numeric string via assertion 2018-05-12 19:56:17 -04:00
Matthew Brown
61aeea6375 Fix whole bunches of things 2018-05-07 01:26:06 -04:00
Matt Brown
a0984cdaf1 Fix #697 - make missing objectlike fields an InvalidArgument 2018-04-27 17:10:57 -04:00
Matthew Brown
f15c26d7f4 Change how type impossibilities are treated to improve message types 2018-04-10 01:27:26 -04:00
Matt Brown
0b268eb602 Allow scalars to be empty 2018-04-05 12:11:58 -04:00
Matt Brown
1282f74931 Allow coercion from generic array to objectlike with possible keys 2018-04-04 18:01:53 -04:00
Matthew Brown
03b3a764e3 Fix #641 - allow is_a to operate on strings as well 2018-04-03 23:14:23 -04:00
Matthew Brown
4552e69ef2 Allow classes to be instantiated by their name only
Ref #641
2018-04-03 22:20:00 -04:00
Matthew Brown
5ff6f27178 Fix #615 - numeric-string is always still a string 2018-03-22 21:48:26 -04:00
Matt Brown
cc3aafe4c4 Improve intersection type parsing 2018-03-22 17:55:36 -04:00
Matthew Brown
837f5d7096 Fix #594 - support intersection types (and catch errors) 2018-03-20 20:56:33 -04:00
Matt Brown
24490aac0e Fix #609 - fix callable coercion in reconciliation step 2018-03-20 13:24:16 -04:00
Matthew Brown
b8a8e9bc5b Add two skipped (bug-identifying) tests 2018-03-20 09:30:37 -04:00
Matthew Brown
217233472c Fix #457 - fix objectlike property isset check 2018-02-10 23:30:40 -05:00
Matt Brown
7f4be858c2 Fix #498 - add better issue type for docblock contradiction 2018-02-07 15:20:47 -05:00
Matt Brown
1df4c3d196 Add DocblockTypeContradiction to find possible issues with docblock types
Fixes #491
2018-02-06 18:44:53 -05:00
Matt Brown
1d46124bab Fix issues found by detecting docblock type inconsistencies 2018-02-06 13:40:28 -05:00
Matt Brown
4b87612bb4 Add better issue message for bad array offset
Fixes #492
2018-02-06 11:27:01 -05:00
Matt Brown
5d25edf80c Deal with overlapping docblock types and typehints better 2018-02-05 16:57:33 -05:00
Matthew Brown
fb300baa6d Move a bunch of code into Codebase 2018-02-01 00:50:01 -05:00
Matt Brown
b2b2572e4d Fix #478 - allow is_a checks with string arg 2018-01-30 16:45:29 -05:00
Matt Brown
dea5d92e9b Add support for static::class 2018-01-23 15:46:14 -05:00
Matt Brown
c0fda0ef1e Allow instanceof static checks 2018-01-23 14:46:46 -05:00
Matthew Brown
e05a7c00cc Break FileScanner out from FileChecker 2018-01-21 12:44:46 -05:00
Matt Brown
4b4e09277c Fix #450 - add checks for duplicate array keys
And fix the embarassing errors in tests
2018-01-18 17:16:50 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matt Brown
edde8930af Speed up Psalm by caching result of Union::getId 2018-01-09 15:05:48 -05:00