1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 17:57:37 +01:00
Commit Graph

96 Commits

Author SHA1 Message Date
Brown
c5ef2516b5 Fix #2150 - add detection for unnecessary @var annotations
And also remove them from codebase
2019-09-19 11:59:43 -04:00
Matthew Brown
9ad6c36d9b
Conditionally verify that array offsets exist (#2147)
* Check array offsets idea

* Clean up some issues

* Add a few light fixes

* Add docs
2019-09-18 14:21:06 -04:00
Brown
b49444b8ad Allow immutable objects to be cloned
Fixes #2111
2019-09-09 11:14:40 -04:00
Matthew Brown
4cac8cd70f Don’t complain about mutating call when it was inferred during reflection 2019-09-08 10:36:57 -04:00
Matthew Brown
da1f36b57f Fix #2089 - properly coerce arguments 2019-09-01 10:10:38 -04:00
Brown
b7b4baff8f Add support for @immutable
Fixes #1272
2019-08-30 12:36:35 -04:00
Brown
7797bfd71c Refactor FunctionLikeAnalyzer::analyze 2019-08-22 11:25:13 -04:00
Matthew Brown
43a9ff0735 Prevent erroneous unused suppressions from plugin 2019-08-18 17:18:03 -04:00
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -04:00
Matthew Brown
eb50aad3a1 Fix offsets when checking function suppressions 2019-08-18 14:44:45 -04:00
Matthew Brown
2a5e0d8f39 Fix #1444 - track unused suppressions 2019-08-18 14:27:50 -04:00
Matthew Brown
2146f73782 Prepare for tracking unused suppressions
Ref #1444
2019-08-18 12:25:48 -04:00
Matthew Brown
600999a3a8 Add better typing 2019-08-14 00:47:57 -04:00
Brown
2b2988b072 Fix #2019 - allow union in @throws 2019-08-13 15:44:18 -04:00
Brown
da230bc9f1 Change the type of @throws error to UndefinedDocblockClass 2019-08-13 13:41:12 -04:00
Matthew Brown
a4b9b7311b Improve message a bit 2019-08-12 23:58:40 -04:00
Matthew Brown
ef3771d643 Fix #2015 - complain about invalid @throws classes 2019-08-12 23:42:51 -04:00
Matthew Brown
d5b026839c Add support for different taint types ref #1990 2019-08-12 23:16:05 -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
Tyson Andre
5d5a9c6eac Remove redundant casts and unused use statements (#1955)
* Remove redundant casts

(not sure about older versions of php-parser)

* Remove unused use statements
2019-07-18 23:37:36 -04:00
Matthew Brown
3df248eea2 Add concept of purity to functions and methods 2019-07-18 01:31:48 -04:00
Matthew Brown
1ae9ea5fed Use object instead of by-ref params 2019-07-10 01:35:57 -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
d96246a824 Improve template handling robustness 2019-06-25 09:06:23 -04:00
Matthew Brown
7fc11af49e Fix docblocks with @andrew-demb’s suggestions 2019-06-16 09:12:32 -04:00
Matthew Brown
2d5f332ebf Fix #1781 by improving handling of callmap options 2019-06-15 16:10:48 -04:00
Matthew Brown
c0a9ccb385 Fix handling of unused params in threaded mode 2019-06-09 17:02:21 -04:00
Matthew Brown
93f81f599e Fix #1764 - prevent UndefinedInterfaceMethod error when checking initialisation 2019-06-09 09:18:05 -04:00
Brown
4660beb28e Still look at param defaults even without param types 2019-06-07 14:24:15 -04:00
Matthew Brown
20c66f693e Fix handling of class const types 2019-06-06 18:46:40 -04:00
Matthew Brown
4fc5d1d5c8 Rewrite use statements 2019-06-05 22:13:33 -04:00
Matthew Brown
c6063d1378 Only replace same-file param docblock types 2019-06-05 19:32:27 -04:00
Brown
f309c755f8 Add ability to move classes 2019-06-05 08:50:24 -04:00
Marco Pivetta
624c7bc6fb Renamed Fn to TFn to allow for PHP 7.4 compatibility 2019-06-03 08:21:25 -04:00
Matthew Brown
2439a9f6a0 Allow instance method renaming, too 2019-06-02 12:02:39 -04:00
Matthew Brown
62be1cc1b0 Add rest of files 2019-06-01 16:57:33 -04:00
Matthew Brown
736f01c29e Store more accurate return type location 2019-06-01 13:02:20 -04:00
Matthew Brown
bee87c25eb Add transformations for new A, param A 2019-06-01 10:32:49 -04:00
Matthew Brown
cd969c51e5 Generate missing param types from callers
Fixes #1707
2019-05-31 01:47:35 -04:00
Matthew Brown
790bc53bfd Fix #1681 - interpret parent annotation properly 2019-05-25 11:51:09 -04:00
Brown
7fbbe964cb Fix #1609 - warn when using covariant template type as input 2019-05-14 18:17:38 -04:00
Matthew Brown
4f8d6a50d8 Don’t emit MissingClosureReturnType when inside call and type can be inferred 2019-05-06 20:47:55 -04:00
Brown
b6e9fba8e6 Track method param uses between diff runs 2019-04-29 17:29:38 -04:00
Brown
3dc3d659f1 Fix #1534 - allow unpacked args to be interpreted properly by overloaded functions 2019-04-09 14:48:51 -04:00
Brown
1348d634ed Improve handling of variadic parameters 2019-04-09 13:58:49 -04:00
bugreportuser
1a4b9ab25f Allow suppressing exception issues inline 2019-03-31 14:22:19 -04:00
bugreportuser
4fc7e4affc Give errors for all uncaught exceptions 2019-03-31 14:22:19 -04:00
Brown
1ab6345bac Fix treatment of PDOStatement::setFetchMode
Fixes #1496
2019-03-29 13:26:13 -04:00
bugreportuser
b71005e199 Make MissingThrowsDocblock codelocation more accurate 2019-03-24 23:03:37 -04:00