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

1050 Commits

Author SHA1 Message Date
Matthew Brown
1a8cdc5da9 Allow two or more instanceof interface checks side by side 2017-04-15 21:25:53 -04:00
Matthew Brown
007442fdd0 Fix possibly-private error 2017-04-15 21:10:49 -04:00
Matthew Brown
f67e92023b Add support for intersection types
Fixes #140
2017-04-15 20:36:40 -04:00
Matthew Brown
2bdd062400 Ternary else should ignore if expression context 2017-04-15 13:46:18 -04:00
Matthew Brown
eebaf5795d Fix regression dealing with union types from docblocks 2017-04-15 12:44:38 -04:00
Matthew Brown
bdfe2396ad Don’t suggest useless type information 2017-04-15 00:45:43 -04:00
Matthew Brown
a8bee2f843 Suggest missing property types for traits as well 2017-04-15 00:04:03 -04:00
Matthew Brown
0c4824b2cc Take property defaults into account when suggesting missing type 2017-04-14 23:46:55 -04:00
Matthew Brown
8d46c65815 Only make non-null if inside constructor 2017-04-14 23:26:58 -04:00
Matthew Brown
60be6f07a0 Delay checks for MissingPropertyType so we can give more useful messages 2017-04-14 23:09:34 -04:00
Matthew Brown
ce6ca58291 Fix #114 - add optional Hack-like checks calls 2017-04-14 21:32:14 -04:00
Vladimir Komissarov
818e3be00c Fix undefined global constant in closure 2017-04-14 17:03:09 +07:00
Matt Brown
7bcf7f13b1 Fix #137 - add for init in main scope 2017-04-11 17:43:46 -04:00
SignpostMarv
46a0b03aac enable the exposure of the source line number when DocblockParseException is thrown 2017-04-11 22:14:15 +01:00
Matt Brown
ed356bfbd0 Don’t mistake same-named functions for old-style constructors
Fixes #131
2017-04-10 11:03:19 -04:00
Matthew Brown
32efdfd0f7 Fix #129 - emit PossiblyNullFuntionCall when encountering such a thing 2017-04-08 11:38:06 -04:00
Matthew Brown
2d454d6e10 Fix #130 - check class exists before checking for __invoke 2017-04-08 11:15:17 -04:00
Matthew Brown
a985fd9324 Add PossiblyInvalidArgument for closure param type checks 2017-04-08 09:47:03 -04:00
Matthew Brown
64361ad2c3 Add more descriptive message to PossiblyInvalidArgument issue 2017-04-08 09:43:58 -04:00
Matthew Brown
c663062816 Add PossiblyUndefinedArgument issue to cope with #126 2017-04-08 09:28:02 -04:00
Matthew Brown
b3a454cf5b Create new InvalidMethodCall issue for calling methods on non-objects 2017-04-08 09:20:32 -04:00
Matthew Brown
7d17a07cd2 Fix #125 - allow abstract classes to reference methods only defined in interfaces 2017-04-07 19:16:25 -04:00
Matt Brown
f011197090 Fix #124 - don’t check array_filter closures when >2 args passed 2017-04-07 18:30:15 -04:00
Matthew Brown
b20ddfec94 Add better way of checking two types can ever yield identical values 2017-04-07 09:02:09 -04:00
Matthew Brown
8910e4226c Allow scalar type refinement 2017-04-07 00:19:55 -04:00
Matthew Brown
40427839ea Get all variables possibly assigned in conditional 2017-04-06 22:56:37 -04:00
Matthew Brown
b74b8d7a58 Prevent reconciling to empty 2017-04-06 22:38:12 -04:00
Matthew Brown
20b0460a33 Fix #123 - ternary byref vars now adjusted 2017-04-06 21:53:29 -04:00
Matt Brown
8a20aca4cf Only compare non-null types 2017-04-06 18:11:09 -04:00
Matt Brown
c09b0e459a Make is_numeric a proper type refinement 2017-04-06 18:06:24 -04:00
Matt Brown
e7aec27eae Prevent emitting issues when comparing mixed values 2017-04-06 17:40:15 -04:00
Matt Brown
1c6934bfa8 Fix a couple more return types 2017-04-06 16:41:44 -04:00
Matt Brown
20b148d2d5 Fix preg_match return types 2017-04-06 15:48:52 -04:00
Matt Brown
da19b55db1 Add special TypeDoesNotContainNull issue as distinct from TypeDoesNotContainType 2017-04-06 15:36:22 -04:00
Matt Brown
cb3f6b14ba Fix AssertionFinder to trap the right null type 2017-04-06 15:05:23 -04:00
Matt Brown
e02999f2ba Prevent undefined property notices 2017-04-06 14:57:00 -04:00
Matt Brown
14bb967c7d Warn when doing === comparisons on incompatible types 2017-04-06 14:53:45 -04:00
Matt Brown
d65221fbe4 Fix nested requires in different directories 2017-04-05 14:37:22 -04:00
Matt Brown
fe43c4e37f Fix #122 - allow multiple types of filtering 2017-04-03 12:36:49 -04:00
Matthew Brown
ce5b35169b Treat empty & !empty as special straddling types 2017-04-02 19:06:18 -04:00
Matthew Brown
a8220ba4f1 Fix bug where empty string could confuse 2017-04-02 18:28:06 -04:00
Matthew Brown
075cc5f50d Add by-reference clause removal 2017-04-02 17:37:56 -04:00
Matthew Brown
a09e668dbc Only allow before/after clause comparisons on non-mixed types 2017-04-02 17:25:21 -04:00
Matthew Brown
791be97b13 Undo changes to type simplification 2017-04-02 17:10:49 -04:00
Matthew Brown
fbda71f026 Ignore mixed vars when selectively removing clauses 2017-04-02 16:51:27 -04:00
Matthew Brown
dcedd65215 Add check for paradoxical statements 2017-04-02 15:26:10 -04:00
Matthew Brown
83edf8c4db Complete the circle – fix remaining type algebra issue 2017-04-01 19:04:49 -04:00
Matt Brown
5b34163d8d Add ability to insert suppressed issues on functions 2017-03-31 11:21:34 -04:00
Matt Brown
d06a199d25 Fix #121 - simplify all parameter types 2017-03-30 11:44:38 -04:00
Matt Brown
02726300dc Fix #120 - allow array_unique extra arg 2017-03-30 11:04:47 -04:00