1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

7584 Commits

Author SHA1 Message Date
Matt Brown
b3ff107c20 Add functions 2020-11-04 23:34:38 -05:00
Matt Brown
3bde327f1b Break up CommentAnalyzer 2020-11-04 23:25:08 -05:00
Matt Brown
f3c6d70a9b Use more accurate type for div of ints 2020-11-04 22:39:27 -05:00
Matt Brown
eacc05e73f Fix #2132 - get value of literal int division 2020-11-04 22:32:33 -05:00
Matt Brown
3e9c5d3600 Add support for @return never 2020-11-04 12:30:02 -05:00
Matt Brown
b5a3f45d52 Remove use of PHP 7.2 function 2020-11-04 11:02:34 -05:00
Matt Brown
590af31449 Improve output of Clause::__toString 2020-11-03 17:02:37 -05:00
Matt Brown
91d9dc3759 Fix overeager inference 2020-11-03 16:44:24 -05:00
Matt Brown
b35db3e523 Reorganise things a little 2020-11-03 16:15:54 -05:00
Philip Hofstetter
5abde20fd0
improve mb_strtolower return type (#4469)
this fixes #4455
2020-11-02 08:18:42 -05:00
Matt Brown
16bfbd9224 Fix function 2020-11-02 00:54:12 -05:00
Matt Brown
3d4e77beb6 Fix int-mask-of expansion 2020-11-02 00:40:36 -05:00
Matt Brown
09228131d8 Use falsy value 2020-11-01 22:57:30 -05:00
Matt Brown
6922caf9f6 Fix #4466 use better differentiation for class_exists second param 2020-11-01 13:14:17 -05:00
Matt Brown
966b139504 Fix dupe semicolons 2020-11-01 11:42:09 -05:00
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
Matt Brown
f0a30b9fd0 Invalidate child methods when signature changes 2020-11-01 09:46:21 -05:00
Matt Brown
667220408c Fix #4464 - bust cache when Psalm’s version changes, not just composer’s 2020-11-01 09:01:53 -05:00
Matthew Brown
8f05cc994a
Add aka 2020-10-31 00:18:23 -04:00
Matthew Brown
4966754358
Fix brackets 2020-10-30 23:42:47 -04:00
Matt Brown
957a554c4b Support a bunch of attributes 2020-10-30 21:38:27 -04:00
Matt Brown
938cebc9f8 Use better inference for getAttributes return type
Fixes #4367
2020-10-30 17:37:16 -04:00
Matt Brown
cbd09adb2a Only load xdebug stub afterwards
Ref #4459
2020-10-30 15:11:40 -04:00
Matt Brown
67554dd017 Fix #4453 - sanitise @extends types before attempting to parse 2020-10-30 15:08:23 -04:00
Matt Brown
579327a470 Detect when targets are incorrectly targeted 2020-10-30 13:28:45 -04:00
Matt Brown
4ea87b9054 Add support for int-mask<...> and int-mask-of<...> 2020-10-30 13:28:45 -04:00
Jáchym Toušek
8929bde535
Add psalm-mutation-free to ext-ds (#4425)
* Add psalm-mutation-free to ext-ds

* Update ext-ds.php

* Update stubs/ext-ds.php

Co-authored-by: Jáchym Toušek <enumag@gmail.com>

Co-authored-by: Matthew Brown <github@muglug.com>
2020-10-29 19:55:10 -04: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
82f35c1454 Ensure Stringable is always available to tests that need it 2020-10-29 19:41:10 -04:00
Matt Brown
438bcc6ab7 Use softer return 2020-10-29 16:14:16 -04:00
Matt Brown
2e95d1fb98 Use more robust check for Stringable stub 2020-10-29 14:15:35 -04:00
Matt Brown
5c784dc7cb Fix #4435 - ensure casts are always flow-sensitive 2020-10-28 14:06:05 -04:00
Matt Brown
fce5c26600 Remove subpar test 2020-10-28 13:55:51 -04:00
Matt Brown
dab1aac9d4 Protect more calls 2020-10-28 13:48:13 -04:00
Matt Brown
f43dba8c4c Use more accurate comparison for non-empty-lists 2020-10-28 13:32:55 -04:00
Matt Brown
083102a862 Fix count call 2020-10-28 13:10:30 -04:00
Matt Brown
4aef96bbac Use lists everywhere for args 2020-10-28 12:45:26 -04:00
Matt Brown
fee5eab671 If interface implements __toString it’s also Stringable 2020-10-28 09:06:52 -04:00
Matt Brown
0344ff6858 Add polyfill for Stringable interface 2020-10-28 00:55:53 -04:00
Matt Brown
a3755a1d1f Fix tests 2020-10-27 22:29:49 -04:00
Matt Brown
aeeb1e6b90 Fix test type 2020-10-27 18:10:53 -04:00
Matt Brown
d00a02a06b Fix #4429 - any class with a __toString method in PHP8 assumed to implement Stringable 2020-10-27 15:41:04 -04:00
Matt Brown
d27d86a84c Fix #4422 - be aware of nested template params 2020-10-27 10:01:17 -04:00
Matt Brown
1da6615ac2 Fix comma 2020-10-27 09:13:57 -04:00
Matt Brown
8dd5dc5b72 Improve algebra handling a little better 2020-10-26 16:34:56 -04:00
Matthew Brown
aadc52fda1
Bump circle PHP version 2020-10-26 15:26:39 -04:00
Matthew Brown
42c9f017f9
Experiment with PHP 7.1 compatibility (#4421)
* Experiment with PHP 7.1 compatibility

* Let’s hop
2020-10-26 15:14:48 -04:00
Matt Brown
b91370e4ae Fix #4407 - always scan types in @var docblocks regardless of next element 2020-10-26 12:35:29 -04:00
Simon Podlipsky
6bbf06f7cc
Fix preg_match_all param name (#4416) 2020-10-26 11:53:03 -04:00
Matt Brown
d3464cb22a Fix #4418 - improve try analysis for mixed, too 2020-10-26 09:05:48 -04:00