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

54 Commits

Author SHA1 Message Date
Matthew Brown
c75f7dc4d5 Fix #2339 - add support for null coalescing operator 2019-11-27 00:34:23 -05:00
Brown
5626058eff Fix #2374 - refine error-suppressed output a little better 2019-11-25 15:38:54 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Brown
8876499ddd Fix #2252 - allow destructuring of ArrayAccess objects 2019-10-22 11:17:42 -04:00
Brown
353cf2351e Fix #2259 - if error suppression is use, list destructuring values will be nullable 2019-10-22 10:40:37 -04:00
Brown
b29227aaf6 Allow taints to be removed via annotation 2019-10-15 16:25:27 -04:00
Brown
22a12444df Fix #2220 - detect destructuring of non-array 2019-10-15 13:55:30 -04:00
Brown
16c33d1565 Add support for list type
Fixes #2209
2019-10-08 18:44:46 -04:00
Brown
f8f8b633b1 Suppress a bunch of PossiblyUndefinedArrayOffset issues 2019-10-01 15:44:43 -04:00
Matthew Brown
a9d0296252 Fix #2182 - allow modification to cloned objects inside 2019-09-30 22:07:20 -04:00
Brown
cf799d0926 Fix #2173 - remove @var annotations automatically 2019-09-26 15:08:05 -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
a1ea5c38c2 Clean up unnecessary annotation
Ref #2111
2019-09-09 11:20:47 -04:00
Brown
b49444b8ad Allow immutable objects to be cloned
Fixes #2111
2019-09-09 11:14:40 -04:00
Brown
8601731fa2 Prohibit mutation-free assignment ops 2019-09-03 12:16:31 -04:00
Matthew Brown
cfdfb9b64c Allow pure functions/methods to be called and not destroy known properties 2019-08-31 14:54:59 -04:00
Brown
b7b4baff8f Add support for @immutable
Fixes #1272
2019-08-30 12:36:35 -04:00
lhchavez
1f0aca00b3 Use the correct types for AssignmentRef (#2078)
This change assigns the type of the rhs expression to the variable that
will become a reference, as well as preventing clobbering of the rhs if
it is an already-typed variable.

Fixes: #2077
2019-08-27 23:19:09 -04:00
Brown
9835943294 Fix #2041 - make sure property is always set 2019-08-21 11:25:08 -04:00
lhchavez
c98c160907 Allow explicitly-annotated mixed assignments (#2030)
This change makes it possible to assign mixed expressions to variables
if an annotation is explicitly added to the variable. This allows the
use of `call_user_func` without needing to suppress issues.

Fixes: #1374
2019-08-17 11:22:43 -04:00
Brown
0468d11158 Detect function in array access op 2019-08-13 14:07:45 -04:00
Brown
b5614d03f8 Add detection for unused function calls 2019-08-13 13:15:23 -04:00
Brown
e22e0ac92c Fix unused ref in assign op
Fixes #1968
2019-07-24 16:53:14 -04:00
Matthew Brown
3df248eea2 Add concept of purity to functions and methods 2019-07-18 01:31:48 -04:00
Matthew Brown
6dd549b8a6 Fix #1900 - discard old references to code after an assignment 2019-07-04 17:35:33 -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
Brown
b1d1ab974c Preserve formatting of callable type 2019-06-06 14:27:49 -04:00
Matthew Brown
ad4e2f72e2 Add means to guess PSR4 file path 2019-06-05 08:50:24 -04:00
Brown
f309c755f8 Add ability to move classes 2019-06-05 08:50:24 -04:00
Matthew Brown
2439a9f6a0 Allow instance method renaming, too 2019-06-02 12:02:39 -04:00
Matthew Brown
736f01c29e Store more accurate return type location 2019-06-01 13:02:20 -04:00
Matthew Brown
909e02d441 Move var docblocks within function 2019-06-01 12:25:57 -04:00
Matthew Brown
dc5a5bcd9d Simplify var docblock parsing signature 2019-06-01 11:53:32 -04:00
Matthew Brown
790bc53bfd Fix #1681 - interpret parent annotation properly 2019-05-25 11:51:09 -04:00
Brown
640c1d13a6 Fix unused variables now found in Psalm’s code 2019-05-02 17:21:23 -04:00
Matthew Brown
e08944cae0 Allow diff mode with --find-dead-code 2019-04-27 17:38:24 -04:00
Matthew Brown
9be8013633 Add a way to ignore variable method & property calls 2019-04-20 17:49:49 -04:00
Brown
d6de6ca5d5 Prevent removing properties on classes with variable assignment 2019-04-18 14:47:58 -04:00
Tyson Andre
fc83f1c3ea Fix typo: "Arithmentic" -> "Arithmetic" 2019-03-24 23:00:51 -04:00
Matthew Brown
ee56419fd6 Improve accuracy and durability of mixed counts 2019-03-23 09:50:47 -04:00
Matthew Brown
de7df3175b Fix #1368 - improve message formatting 2019-03-16 12:53:54 -04:00
Matthew Brown
709a5c31da Allow bitwise or ops to change type
Ref #1340
2019-02-18 12:53:55 -05:00
Matthew Brown
62fb8035bf Fix #1309 - no PropertyNotSetInConstructor warnings for grandchild of class 2019-02-10 15:01:10 -05:00
Matthew Brown
6033345694 Fix #1281 - improve handling of mixed property array assignment 2019-02-05 00:36:57 -05:00
Brown
2054e3753f Fix #1260 - improve handling of ArrayAccess assignment 2019-01-31 12:45:47 -05:00
Matthew Brown
16c2a0f899 Fix #1246 - check @var annotations 2019-01-26 17:30:44 -05:00
Brown
2b4b55fd33 Add support for @return no-return
Fixes #1155
2019-01-02 17:05:39 -05:00
Matthew Brown
ca6149ed17 Improve treatment of templated params within function analysis 2018-12-17 23:29:27 -05:00
Matthew Brown
fd0ab47b80 Fix #1118 - detect possible issues with unions of mixed 2018-12-08 13:18:55 -05:00
Matthew Brown
b32000fa05 Fix #689 - add checks for @internal annotations 2018-12-01 18:37:49 -05:00