1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-16 03:17:02 +01:00
Commit Graph

147 Commits

Author SHA1 Message Date
Matthew Brown
7857b07f91 Fix list-could-be-array issue 2019-10-11 08:24:35 -04:00
Matthew Brown
03c39cbe7c Fix #2223 - make sure lists are handled in more places 2019-10-10 20:16:43 -04:00
Brown
54d5a25077 Remove known array offsets after altering array 2019-10-09 10:36:55 -04:00
Brown
b75720c32b Add more list types 2019-10-09 10:04:34 -04:00
Brown
16c33d1565 Add support for list type
Fixes #2209
2019-10-08 18:44:46 -04:00
Brown
d225374d6d Fix #2156 - do better inference after isset 2019-10-01 19:31:08 -04:00
Brown
f8f8b633b1 Suppress a bunch of PossiblyUndefinedArrayOffset issues 2019-10-01 15:44:43 -04:00
Matthew Brown
9f10564184 Add another array addition check 2019-10-01 09:13:31 -04:00
Matthew Brown
95c7b986c2 Fix formatting 2019-10-01 08:46:37 -04:00
Matthew Brown
2ffdf1bacc Fix undefined numeric offset 2019-10-01 08:45:36 -04:00
Brown
c5ef2516b5 Fix #2150 - add detection for unnecessary @var annotations
And also remove them from codebase
2019-09-19 11:59:43 -04:00
Brown
944531b73b fix #2125 - Don’t assume function args are necessarily authoratative 2019-09-11 13:52:58 -04:00
lhchavez
ae2c6715a7 Allow @psalm-assert to propagate member assertions to the caller's context (#2100)
This change injects method call assertions that involve member variables
to the caller context by replacing `$this->` with the lhs of the member
call.

Fixes: #2099
2019-09-05 21:00:02 -04:00
Brown
22ba3ada7b Fix #2081 - allow Assert::true to replace assert() calls 2019-08-29 11:53:36 -04:00
Brown
4db8ca6a1d Cleanup extra issues from recent fixes 2019-08-27 14:16:34 -04:00
Matthew Brown
03f59ae05e Check other arguments of array_unshift/array_push
Ref #2052
2019-08-25 23:52:38 -04:00
Brown
f00ee740c0 Analyse encapsulated string when method not known
Ref #2052
2019-08-23 10:59:59 -04:00
Matthew Brown
738ba81185 Fix #2046 - trigger PossiblyNullArgument when in union with mixed 2019-08-22 23:26:04 -04:00
Brown
e25ce152d6 Fix #2014 - prevent unusedvariable false positive when redefined in assignment || 2019-08-15 09:43:43 -04:00
Brown
3d01708c6c Improve backtrace of property-involved issues 2019-08-14 11:47:58 -04:00
Brown
e92896f145 Fix taint records 2019-08-14 09:52:59 -04:00
Matthew Brown
600999a3a8 Add better typing 2019-08-14 00:47:57 -04:00
Brown
d6e084ec9c Remove false-positive for callmap function arg 2019-08-13 14:53:31 -04:00
Brown
b5614d03f8 Add detection for unused function calls 2019-08-13 13:15:23 -04:00
Matthew Brown
d5b026839c Add support for different taint types ref #1990 2019-08-12 23:16:05 -04:00
Brown
669b50e8b4 Fix erroneous callable parsing 2019-08-12 15:04:43 -04:00
Brown
d5e2c323d3 Add support for pure-ish instance methods 2019-08-08 14:17:34 -04:00
Brown
14b37b95af Fix potential recursion 2019-08-06 17:29:44 -04:00
Brown
17753865f3 Add detection to mixed params 2019-08-06 10:33:21 -04:00
Brown
6eb62591ab Specialise calls when functions are pure 2019-08-05 18:33:33 -04:00
Matthew Brown
b2c0993cdc Add framework for taint analysis to Psalm
Ref #611
2019-08-04 10:37:36 -04:00
Brown
352f18b169 Register so it doesn’t get removed 2019-07-24 17:41:13 -04:00
Brown
5770a6c904 Add support for compact 2019-07-24 17:24:23 -04:00
Brown
c283f0877d Analyse binary ops always 2019-07-22 18:04:52 -04:00
Matthew Brown
76508e6d64 Improve behaviour of templated template assertions
Fixes #1956
2019-07-21 01:40:19 -04:00
Brown
7f0dcae0b2 Always evaluate property calls on mixed methods 2019-07-12 14:39:06 -04:00
Brown
8e149461f0 Remove unnecessary references to had_template 2019-07-10 14:03:13 -04:00
Brown
2c6854f403 Massage arg type after coerced param
Ref #1927
2019-07-10 12:12:51 -04:00
Matthew Brown
1ae9ea5fed Use object instead of by-ref params 2019-07-10 01:35:57 -04:00
Matthew Brown
0e8fa0e73e Return false in fewer places 2019-06-30 12:06:49 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Matthew Brown
c66a106622 Improve performance by doing less cloning
Ref #1837
2019-06-26 00:14:06 -04:00
Matthew Brown
c0b86bd40d Use uppercase template_type_extends keys 2019-06-24 23:43:04 -04:00
Brown
0246f600f4 Fix #1813 - convert object&Foo into Foo after template resolution 2019-06-19 12:00:19 -04:00
Matthew Brown
7155ed4e06 Fix #1811 - improve expected argument count 2019-06-19 09:05:07 -04:00
Matthew Brown
2d5f332ebf Fix #1781 by improving handling of callmap options 2019-06-15 16:10:48 -04:00
Brown
3c3c8cd3b9 Always analyse class constants 2019-06-07 13:23:52 -04:00
Marco Pivetta
624c7bc6fb Renamed Fn to TFn to allow for PHP 7.4 compatibility 2019-06-03 08:21:25 -04:00
Brown
a060da95bf Allow MissingParamType alteration to be done in multithreaded mode 2019-05-31 11:55:24 -04:00
Brown
534e4c034b Fix replacement for inherited methods 2019-05-31 10:37:26 -04:00