1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-05 13:10:49 +01:00
Commit Graph

332 Commits

Author SHA1 Message Date
orklah
3649712c66 deprecate TPositiveInt 2022-01-23 23:26:24 +01:00
rarila
97e6511fab Set number of lines before and after namespace. 2021-12-15 04:58:32 +01:00
rarila
1c298c4605 Conversion of Psalm\Type 2021-12-14 02:31:22 +01:00
ralila
e32af3c05a Conversion of Psalm\Type\Atomic 2021-12-14 02:26:28 +01:00
rarila
39402c233d
Return type hints (#7065)
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
30a65685a2 Import instead of using fqn classes 2021-12-03 21:40:18 +01:00
ralila
245920e53c Import instead of using fqn 2021-12-03 20:11:20 +01:00
sasezaki
5a01c8d601 Added phpcs SelfMemberReference rule, and applied 2021-11-07 15:47:39 +09:00
orklah
4783149773 deprecate TEmpty 2021-10-27 21:26:31 +02:00
orklah
5efd49f38d fix redundant condition 2021-10-02 10:09:40 +02:00
orklah
a92fee8ae3 better combining 2021-09-25 11:21:06 +02:00
orklah
97e91e6bf0 code trimming 2021-09-25 02:34:21 +02:00
orklah
dbf3512b70 introduce $definite_class flag and use it to avoid using final keyword for simple inference 2021-08-19 23:19:59 +02:00
Alexandr Zolotukhin
d7f83c3b5e Fix issues detected by psalm 2021-08-10 20:07:53 +03:00
Alexandr Zolotukhin
9687836519 Fix intersection calculation for unions of scalar types 2021-08-05 23:15:58 +03:00
Bruce Weirdan
6abce3525a
Enforce use sort (#5900) 2021-06-07 22:55:21 -04:00
orklah
f62b83a190
Assert intersection type when two variables are compared (#5774) 2021-05-18 16:14:58 -04:00
orklah
ab1732de66
combining never/empty twice gives never (#5756) 2021-05-12 18:46:37 -04:00
AndrolGenhald
d022910599
ConcatAnalyzer improvements and non-falsy-string fixes. (#5544)
* ConcatAnalyzer improvements.

Deduplicate code.
Improve type inference.
Allow literal type inference when only one side has multiple types (fixes #5483).
Fix invalid type inference with negative int as right operand.

* Fix inference to be lowercase-string when concatenating int.

* Fix TNonEmptyLowercaseString to not be subtype of TNonFalsyString.

'0' is a non-empty-lowercase-string that is falsy.

* Fix other issues with non-falsy-string.

* Nest ands and ors

Co-authored-by: Matthew Brown <github@muglug.com>
2021-03-31 23:16:21 -04:00
orklah
f9fccb2b2d
implement DTO for plugins (#4881)
* implement DTO for plugins

* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
orklah
bcc378bd20
handle concatenation with int parts (#4938) 2021-01-06 09:01:53 -05:00
orklah
1d9987e0ed
fix phpdoc (#4905) 2020-12-29 11:42:41 +00:00
orklah
09fb141e49
Document lowercase-string when possible (#4904)
* document lowercase-string

* fix missing strtolower
2020-12-29 11:42:12 +00:00
Matt Brown
5f065d3d74 Turn template bound tuples into object
Ref #4714
2020-11-27 11:43:30 -05:00
Matt Brown
f0ae0e5cb4 Break aparat type combiner 2020-11-21 18:11:29 -05:00
orklah
e04f219948
return static instead of self when static context detected (#4632)
* return this instead of self when static context detected

* replace $this by static
2020-11-19 19:02:25 -05:00
Matt Brown
2e47ca51d5 Fix #4547 - mark unused uses 2020-11-13 13:13:29 -05:00
Matt Brown
13b83e6132 Fix #4545 - allow intersections in more places 2020-11-13 09:43:30 -05:00
Matt Brown
d3464cb22a Fix #4418 - improve try analysis for mixed, too 2020-10-26 09:05:48 -04:00
orklah
62e79fb7ea
param types (#4313) 2020-10-12 15:46:47 -04:00
Matt Brown
939297484c 4.x - rename TFn to TClosure 2020-10-04 23:32:01 -04:00
Matt Brown
14efde286f 4.x - refactor unused variable detection
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
2020-09-30 12:28:13 -04:00
Brown
19f88a2e31 Add improvements from unused variable checks 2020-09-28 00:45:02 -04:00
orklah
a9a364e363
Misc improvements (#4216)
* misc changes

* fix CI
2020-09-20 08:55:28 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
64f08fa9dc Improve Closure::fromCallable handling 2020-08-29 22:02:58 -04:00
Brown
df0d426f61 Fix #4081 - better inference of positive ints 2020-08-28 16:38:50 -04:00
Matthew Brown
ef0486ce35 Add some pure annotations 2020-08-23 13:52:31 -04:00
Brown
7367e8e6c2 Allow assertions of non-empty lists on typed lists
Fixes #3906
2020-07-29 18:10:43 -04:00
Brown
4a5f74c091 Add positive-int type 2020-07-26 15:51:55 -04:00
Brown
76bd5b6278 Refactor type comparison 2020-07-21 19:40:35 -04:00
Brown
95bf7f835b Improve handling of array_map, faking out calls where nececssary 2020-06-25 13:05:34 -04:00
Matthew Brown
58a8cafaf2 Fix #3588 - a really long literal string is non-empty 2020-06-13 16:08:51 -04:00
Matthew Brown
187b944680 Add faster taint analysis 2020-05-22 12:33:29 -04:00
Brown
0fc3398631 Move parsing methods into internal namespace 2020-05-13 19:12:45 -04:00
Brown
8bfe91787d Add the is_list flag to object-like tuples 2020-05-11 08:33:05 -04:00
Brown
640ffdb324 Fix #3323 - make short object-like arrays sealed tuples 2020-05-08 14:36:06 -04:00
Brown
07e5250292 Fix #3273 - add support for func_num_args() in conditional type 2020-05-01 16:02:53 -04:00
Brown
117a4d4d40 Require callable() have a return type when in conditional
Fixes #3260
2020-04-30 23:35:13 -04:00