1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
Commit Graph

1461 Commits

Author SHA1 Message Date
Matt Brown
024d93b7fd Fix #4467 - variables are only the same if they were set in the same location 2020-11-01 11:26:42 -05:00
Joe Hoyle
4bb675ea72
Pass CodeLocation to FunctionParamsProviderInterface interface (#4444)
Currently the `getFunctionParams()` method of the `FunctionParamsProviderInterface` is never passed the CodeLocation of the analyzed function call. As this is in-scope in the only call site, we can pass the CodeLocation. This means the `getFunctionParams()` is able to issue it's own Issues (which required the code location to attached the Issue to)
2020-10-29 19:53:21 -04:00
Matt Brown
5c784dc7cb Fix #4435 - ensure casts are always flow-sensitive 2020-10-28 14:06:05 -04:00
Matt Brown
4aef96bbac Use lists everywhere for args 2020-10-28 12:45:26 -04:00
Matt Brown
1da6615ac2 Fix comma 2020-10-27 09:13:57 -04:00
Matt Brown
d3464cb22a Fix #4418 - improve try analysis for mixed, too 2020-10-26 09:05:48 -04:00
Matt Brown
462f8ba32b Fix #4397 - allow offsetGet on inside isset 2020-10-25 22:16:43 -04:00
Matt Brown
18f3a3721f Fix #4414 - allow multiple @psalm-assert-if-true on same var 2020-10-25 10:49:39 -04:00
Matt Brown
94e26b2257 Empty checks variables are really falsy checks 2020-10-24 12:46:27 -04:00
Matt Brown
5ff3f1377d Fix a few bugs 2020-10-24 12:23:59 -04:00
Matt Brown
f72e2d7de5 Fix #4374 - prevent paradox and allow Psalm to understand more assignments in conditionals 2020-10-20 14:43:05 -04:00
Matt Brown
66780716aa Fix #3625 - getIterator call is used inside loop 2020-10-20 10:59:09 -04:00
Matt Brown
3803bbfce0 Fix #4368 - improve handling of try with finally 2020-10-20 09:07:10 -04:00
Matt Brown
1a6b684993 Fix #4366 - possibly-undefined vars in finally block should not error 2020-10-19 09:56:38 -04:00
Matt Brown
fe294a4dc0 Don’t overwrite true flag 2020-10-18 01:24:36 -04:00
Matt Brown
3c29ffd0b7 Ignore just-coerced vars 2020-10-17 23:35:24 -04:00
Matt Brown
b646414304 Prevent unnecessary assignments 2020-10-17 18:44:42 -04:00
Matt Brown
055fe551c1 Suppress errors from fake statements 2020-10-17 18:35:55 -04:00
Matt Brown
9502e51a08 Fix reversed negation check 2020-10-17 17:46:00 -04:00
Matt Brown
c0f6afbd87 Improve binary op || analysis for chain 2020-10-17 17:16:47 -04:00
Matt Brown
559abb7b6a Fix style 2020-10-17 14:50:14 -04:00
orklah
ceaaa39ec3
improve phpdoc (#4352) 2020-10-17 12:36:44 -04:00
Matt Brown
9f29e77adc Fix #4354 - allow assignments on RHS of || in if conditional 2020-10-17 12:29:57 -04:00
Matt Brown
083cc29c04 Fix #4347 - fix combinatorial expansion when negating if conditions 2020-10-16 10:23:15 -04:00
orklah
ffe7874906
Misc improvements (#4314)
* extract the operation out of the loop when possible

* remove unnecessary interfaces when already inherited in parent

* simplify expressions

* avoid using alias functions

* redundant phpdoc

* unused imports
2020-10-15 13:23:35 -04:00
Matt Brown
b69e28f26a Fix default value 2020-10-15 13:20:42 -04:00
Matt Brown
8d2e88ef41 Fix #4333 - don’t get tripped up on try with no catches 2020-10-15 10:15:55 -04:00
Matt Brown
8a2983e5e9 Fix #4336 - don’t merge sources twice for null coalesce 2020-10-15 09:57:37 -04:00
Matt Brown
da257a0fa5 Break apart InstancePropertyFetchAnalyzer and others 2020-10-15 09:21:44 -04:00
Matt Brown
2902a8cc60 Fix #4326 - Prevent later remapping of properties 2020-10-14 21:35:57 -04:00
Matt Brown
b2382cdf18 Use correct count 2020-10-14 18:56:49 -04:00
Matt Brown
4488d5fb1f Use more accurate arguments count 2020-10-14 18:51:15 -04:00
Matt Brown
864a7bbb4c Add better support for get_debug_type 2020-10-14 17:30:08 -04:00
Matt Brown
a0fbac347e Prevent features pre-php-8 2020-10-14 17:09:56 -04:00
Matt Brown
724b25b918 Change control_flow_graph to data_flow_graph 2020-10-13 17:28:12 -04:00
Matt Brown
516141a380 Rename ControlFlowGraph to more appropriate DataFlowGraph 2020-10-13 16:49:03 -04:00
Matt Brown
1ae9a6127e Fix #4315 - prevent crash when setting unknown property in finally 2020-10-13 08:32:26 -04:00
Matt Brown
bb7d7132f7 Do arithmetic for preg_split arguments 2020-10-12 20:26:02 -04:00
orklah
62e79fb7ea
param types (#4313) 2020-10-12 15:46:47 -04:00
orklah
10f2966dcb
return types (#4311)
* return types

* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Matt Brown
fcfa746ba8 Fix #4310 - prevent literal class check on union 2020-10-12 14:45:11 -04:00
Matt Brown
d16c0de872 Add slash 2020-10-12 14:32:44 -04:00
Matt Brown
464795d86c Fix #4309 - improve reuse of callmap callable inference 2020-10-12 13:46:43 -04:00
Matt Brown
7195275993 Fix #4299 - only allow unpacking for the zeroeth-indexed element 2020-10-08 09:51:27 -04:00
Matt Brown
e9b520d72d Ignore precondition issues in loop 2020-10-07 20:24:50 -04:00
Matt Brown
3b19913b44 Unbreak CI 2020-10-07 18:50:30 -04:00
Matt Brown
a9c145a725 Convert numeric literal strings to their int/float equivalents for numeric operations 2020-10-07 18:06:41 -04:00
Matt Brown
443025eab8 Fix addition of int and string type 2020-10-07 18:01:41 -04:00
Matt Brown
c8d4bafb85 Improve accuracy of messages 2020-10-07 17:26:37 -04:00
Matt Brown
c2108e89db Warn about impossible/redundant conditions in RHS of || 2020-10-07 17:04:01 -04:00