1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
Commit Graph

7348 Commits

Author SHA1 Message Date
orklah
b559951bf4
replace deprecated methods with their equivalent (#4217) 2021-01-29 11:39:39 +01:00
orklah
ba202b7ad3
Misc improvements (#4216)
* misc changes

* fix CI
2021-01-29 11:39:39 +01:00
orklah
3652d51275
Remove empty() and use strict comparison when safe (#4211)
* replace empty usage with stricter checks

* use strict comparison when safe

* replace is_null with === null for consistency
2021-01-29 11:39:39 +01:00
Brown
6a4df30868
Meke staticy methods properly static 2021-01-29 11:39:39 +01:00
Brown
5302936e76
Fix #4206 - add shortcut for if ((bool) $foo) 2021-01-29 11:39:39 +01:00
Brown
ec64ae930a
Fix a couple of false-positive redundant conditions 2021-01-29 11:39:38 +01:00
Brown
1b10f11217
Fix tests 2021-01-29 11:39:38 +01:00
Brown
ff2c18aa67
Fix #4208 - array with possibly-undefined keys isn‘t really sealed 2021-01-29 11:39:38 +01:00
Brown
e7333ec4db
Fix #4209 - allow hinting arrow function return type 2021-01-29 11:39:38 +01:00
Brown
1b6ecfc128
Fix #4210 - fix __invoke declaration tracing 2021-01-29 11:39:38 +01:00
Brown
93d66117d0
func_num_args is pure
fixes #4215
2021-01-29 11:39:38 +01:00
orklah
e22491537b
align default value with documentation (#4188) 2021-01-29 11:39:38 +01:00
Brown
da8df71b2f
Add explicit offset
Fixes #4202
2021-01-29 11:39:38 +01:00
Daniel Badura
b321b47822
add random_int as stub, returns positive-int if min is positive-int (#4199) 2021-01-29 11:39:38 +01:00
orklah
2c1ff808bb
Fix errors in return types (#4189)
* FunctionLikeAnalyzer::verifyReturnType returns void

* ArrayFunctionArgumentsAnalyzer::checkArgumentsMatch returns void

* AssertionFinder::scrapeAssertions can't return null
2021-01-29 11:39:38 +01:00
Brown
a71af5a5e5
Only refine for matching closure union members
Ref #4136
2021-01-29 11:39:37 +01:00
Brown
7e534d14d0
Improve accuracy of array_filter 2021-01-29 11:39:37 +01:00
Brown
f8e7b649c7
Improve array_merge return type 2021-01-29 11:39:37 +01:00
Brown
9b31fb4d00
Fix style 2021-01-29 11:39:37 +01:00
Brown
95cc274192
Support more array intersections in type parsing 2021-01-29 11:39:37 +01:00
Brown
f8f83e88f1
Add back suppression 2021-01-29 11:39:37 +01:00
Brown
7b48584d24
Make sure all written entries are correctly sorted 2021-01-29 11:39:37 +01:00
Brown
376a825161
Fix regression – detect unused params with defaults again 2021-01-29 11:39:37 +01:00
Brown
386f3da446
Fix template check 2021-01-29 11:39:36 +01:00
Brown
5e6b158dd9
Do no writing when saving parser cache in tests 2021-01-29 11:39:36 +01:00
Brown
270f9de20a
Fix a few more things 2021-01-29 11:39:36 +01:00
Brown
e9fb3dcad2
Fix various things 2021-01-29 11:39:36 +01:00
Brown
d53a9313a5
Fix stub test 2021-01-29 11:39:36 +01:00
Brown
c3a8b1b852
Fix style issues 2021-01-29 11:39:36 +01:00
Brown
0b66e8897c
Add check for strpos dictionaries
Ref #4070
2021-01-29 11:39:36 +01:00
Brown
db55f608be
Fix #4122 - detect yield in function arguments 2021-01-29 11:39:36 +01:00
Brown
168972e91a
Fix #4178 - always detect missing property types 2021-01-29 11:39:36 +01:00
Bruce Weirdan
b27a233cdd
Support multiple issue types in @psalm-suppress (#4179)
* Accept multiple issue names in `@psalm-suppress`

Fixes vimeo/psalm#1575

* Accept multiple issue types on statement docblocks as well

* Proper highlighting of individual issues in compound suppressions
2021-01-29 11:39:36 +01:00
Bruce Weirdan
4319132057
Added @psalm-stub-override for classlikes and methods (#4177)
Fixes vimeo/psalm#1252
2021-01-29 11:39:34 +01:00
orklah
865b36cd3d
replace return; by return null; in every non-void method, add return null; when mising, add return types, remove redundant phpdoc (#4176) 2021-01-29 11:38:58 +01:00
Brown
53de9f20c1
Fix bad error flagging 2021-01-29 11:38:58 +01:00
Brown
29481ed1bd
Fix #4127 - improve error message for unused closure var 2021-01-29 11:38:58 +01:00
ygottschalk
c361f86c68
added array-size max constraint to greater check (#4175)
added a few unit tests
2021-01-29 11:38:58 +01:00
Brown
5d04368d98
Fix #4169 - add appropriate bounds check 2021-01-29 11:38:57 +01:00
Claas Augner
e1926164a8
fix(docs): add missing issues to error levels (#4171) 2021-01-29 11:38:57 +01:00
Toshiyuki Goto
3f08734975
Workaround to PhpScoper group use bug in Box (#4174) 2021-01-29 11:38:57 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
Lexidor Digital
5d95cceb21
[easy fix] Update example for @no-named-arguments (#4170)
The text mentions `@no-named-arguments`, but the example shows `@no-named-params`.
`@no-named-params` can not be found in the psalm source.
Updated example to `@no-named-arguments`.
[https://github.com/vimeo/psalm/search?q=no-named-params&unscoped_q=no-named-params](search for no-named-params) 1 result (this example)
[https://github.com/vimeo/psalm/search?q=no-named-arguments&unscoped_q=no-named-arguments](search for no-named-arguments) 2 results (this example and in CommentAnalyzer.php)
2021-01-29 11:38:57 +01:00
Adrien LUCAS
ac8c2db016
Document Xdebug usage (#4164)
* Document Xdebug usage

* Change to non-persistent approache

Co-authored-by: Bruce Weirdan <weirdan@gmail.com>

Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2021-01-29 11:38:57 +01:00
Brown
8a17987af1
Fix documentation 2021-01-29 11:38:57 +01:00
Brown
307790fbac
Make new InvalidLiteralArgument issue for strpos refs
Ref #4070
2021-01-29 11:38:57 +01:00
Brown
0116284d16
Improve unique issue solution 2021-01-29 11:38:57 +01:00
Brown
568cbfb1be
Fix tests 2021-01-29 11:38:56 +01:00
Brown
ca0608d92a
Fix #4070 - prevent literal strpos argument 2021-01-29 11:38:56 +01:00
Brown
c291b93bbe
Fix #4167 - allow many issues for the same position 2021-01-29 11:38:56 +01:00