1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00
Commit Graph

86 Commits

Author SHA1 Message Date
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
Matthew Brown
d361f17203 Catch {int} types 2017-01-15 11:00:35 -05:00
Matthew Brown
03141e41c2 Move string-stored types into named classes 2017-01-15 10:22:05 -05:00
Matthew Brown
4e00ef51cd Do not check special terms 2017-01-09 01:50:24 -05:00
Matthew Brown
db6d46d5a9 Support numbers in square bracket notation 2017-01-01 23:49:52 -05:00
Matthew Brown
1fe0eee8e4 Add generic type coercion checks 2016-12-25 01:08:58 +00:00
Matthew Brown
c55870e26c Allow generic TypeChecker::isContainedBy checks 2016-12-24 18:28:43 +00:00
Matt Brown
6755c8724a Add tests for M* issues, fixing bugs along the way 2016-12-16 18:56:23 -05:00
Matt Brown
55a060b53a Add support for closure checks 2016-12-07 14:13:39 -05:00
Matthew Brown
638fdad3ad Add support for PHP 7.1 iterable pseudo-type 2016-12-04 21:04:25 -05:00
Matthew Brown
4f95c67e1c Emit issues for null/mixed array access 2016-11-21 19:07:56 -05:00
Matthew Brown
d8e11c7ad7 Support dollars 2016-11-21 10:29:59 -05:00
Matthew Brown
7e829a3b46 Allow numbers in types 2016-11-20 23:35:15 -05:00
Matthew Brown
9d3dcc7401 Do not panic when bad types are passed 2016-11-20 23:31:10 -05:00
Matthew Brown
31aa1c3ce5 Fix PHPDoc-style type parsing 2016-11-20 02:52:34 -05:00
Matthew Brown
3b1dfd0942 Fix issue combining generic and object-like 2016-11-13 11:54:40 -05:00
Matthew Brown
38daca5edd Fix Psalm errors in Psalm 2016-11-13 11:24:46 -05:00
Matthew Brown
5cf95b42f2 --update-docblocks now works 2016-11-12 23:59:31 -05:00
Matthew Brown
fb77c3393a Tighten up rules 2016-11-04 22:11:46 -04:00
Jon Ursenbach
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00