1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 02:07:37 +01:00
Commit Graph

105 Commits

Author SHA1 Message Date
Matthew Brown
6b793db5c6 Allow some intersection types
Fixes #600 Ref #594
2018-03-18 13:57:28 -04:00
Matthew Brown
61af2a924c Fix #575 - generated possibly-undefined keys when scanning objectlike return types
Ref #458
2018-03-17 16:53:11 -04:00
Matthew Brown
10d18481a2 Add syntax support for optional array types
Ref #458
2018-03-16 23:37:10 -04:00
Matt Brown
850998ed1a Add class-string type for enforcing use of ::class constants 2018-03-05 16:06:06 -05:00
Matt Brown
5471b89391 Make array coercion an error 2018-02-21 18:59:31 -05:00
Matthew Brown
88ca7d2fa7 Fix #515 - make Psalm aware of variable array keys 2018-02-17 11:24:08 -05:00
Matthew Brown
a6b54a3607 Fix #513 - make sure numeric is treated like a number 2018-02-15 19:50:50 -05:00
Matt Brown
78cc1786c8 Don’t check newly-scoped vars in conditional 2018-02-08 14:46:06 -05:00
Matt Brown
30ca2ad65f Fix issues with mixed assignments inside loop 2018-02-08 14:02:32 -05:00
Matthew Brown
473a174f23 Memoise type tokenisation and move functions to more logical locations 2018-02-04 12:23:32 -05:00
Matthew Brown
4a672fade8 Add a couple of optimisations suggested by Scrutinizer 2018-01-28 17:26:09 -05:00
Matt Brown
543872f186 Allow @psalm-ignore-falsable-return annotation
Downgrades issues around use of current(), reset(), end() etc.
2018-01-24 18:52:58 -05:00
Matt Brown
abf561bb7d Improve Psalter return type additions 2018-01-23 12:03:18 -05:00
Matthew Brown
92e43b8fa0 Add a few optimisations 2018-01-20 21:22:33 -05:00
Matt Brown
9f2a0847a4 Fix #453 - catch bad objectlike type when analysing docblock 2018-01-19 16:06:30 -05:00
Matthew Brown
75daea5f04 Fix #382 - improve reserved word checks 2018-01-10 00:07:47 -05:00
Matt Brown
edde8930af Speed up Psalm by caching result of Union::getId 2018-01-09 15:05:48 -05:00
Matthew Brown
693c7a81fa Improve tracking of docblock types 2018-01-07 17:25:23 -05:00
Matthew Brown
cc81d78dfd Add code replacement api to allow Psalm to update arbitrary parts of the codebase
Fixes #264
2018-01-02 09:46:50 -05:00
Matthew Brown
8efc939a5f Move Psalm execution code into PHP file that Psalm can analyse 2017-12-29 17:02:56 -05:00
Matthew Brown
035f528581 Make sure that combining false with false simplifies to false 2017-12-19 00:06:05 -05:00
Matthew Brown
0e6006deda Fix #328 and allow single-entry object-like shorthand 2017-12-18 22:07:52 -05:00
Matthew Brown
17edb2bbe6
Add better understanding of arrays with keyed integer offsets (#400)
* Add tests for keyed integer assignemnt

* First pass to get keyed integer assignment working

* Fix array assignment to object-like with different key type

* Improve treatment of objectlikes for callable and iterable comparisons

* Fix array assignment to strings and addition

* Convert expression to CNF

* Do better at merging property types

* Fix array_rand key type
2017-12-18 18:47:17 -05:00
Matthew Brown
2011b8fb8f Remove dead code 2017-12-16 10:51:04 -05:00
Tyson Andre
d0fe5e3127 Don't convert standalone false/true to bool in combineTypes (#396)
Fixes #392
2017-12-15 16:36:42 -05:00
Matthew Brown
42dcd136ca Improve treatment of true and fix #369 2017-12-09 15:51:38 -05:00
Matthew Brown
13f290038a Improve RedundantCondition checks and add true type
Fixes #383
2017-12-09 14:53:39 -05:00
Matthew Brown
aca23d236b Check for ? after replacement 2017-11-20 00:37:45 -05:00
Matthew Brown
9d025fad8f Only replace ? where appropriate 2017-11-20 00:32:40 -05:00
Matt Brown
39baa00fd3 Fix issue with nested object-like array updating 2017-11-17 16:33:36 -05:00
Matthew Brown
965352c711 Fix #312 - support parsing object-like arrays without keys 2017-11-17 01:18:13 -05:00
Tyson Andre
b3505cfbef Get rid of unused variables in psalm's codebase (#272)
* Remove unused variables

* Fix more unused variables

* Fix remaining detected undefined variables

Other 20 detected undefined variable warnings were false positives.
2017-11-08 23:14:27 -05:00
Matt Brown
024bcbc371 Fix #239 - warn about bad brackets 2017-10-12 14:02:06 -04:00
Matthew Brown
d8654b8389 Slow down Psalm by checking parent initialisations too 2017-06-30 01:24:45 -04:00
Matt Brown
3dceebc42f Make type combination less dependant on __toString 2017-06-29 17:40:25 -04:00
Matt Brown
effdec6b1d Separate objectlike types into their own container 2017-06-29 11:48:00 -04:00
Matt Brown
3775b29e30 Move by-ref types into object 2017-06-29 11:18:02 -04:00
Matthew Brown
f9b16c9a2d Explicitly cast mock class to string 2017-06-13 00:51:16 -04:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Matthew Brown
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matt Brown
f73fc7c6eb Carry over ignore_nullable_issues when combining/simplifying types 2017-05-10 13:36:05 -04:00
Matthew Brown
dcedd65215 Add check for paradoxical statements 2017-04-02 15:26:10 -04:00
Matthew Brown
f096468536 Don’t forget where a type came from when combining 2017-03-19 14:39:05 -04:00
Matthew Brown
50b629e88e Update context types after switch statement without default case 2017-03-13 21:17:21 -04:00
Matt Brown
3d2be3410e Infer loop types without @var comments 2017-03-13 18:06:56 -04:00
Matt Brown
ae0ca9553f Remove training wheels 2017-03-13 12:02:28 -04:00
Matt Brown
32d85e20da Remove unused vars 2017-02-10 19:10:13 -05:00
Matthew Brown
6bcc763414 Fix #3 by checking inside __constructor calls for initialisations 2017-01-26 23:23:12 -07:00