AndrolGenhald
c18a155f77
Support type annotations for class consts ( fixes #942 ).
2022-01-22 17:06:53 -06:00
orklah
b3e7f12933
Prevent NoValue when there is no phpdoc
2022-01-14 21:39:23 +01:00
orklah
b633619a2c
Merge remote-tracking branch 'upstream/4.x' into upstream-master
2022-01-14 21:01:25 +01:00
Patrick Remy
a555543c0c
fix: pass static class name to ReturnTypeAnalyzer
2022-01-10 21:23:52 +01:00
Matthew Brown
a435bc57b9
Rename was_static property to is_static to be more accurate
2022-01-09 14:45:07 -05:00
orklah
cbb0c6398f
allow short closure with never
2022-01-06 21:36:34 +01:00
orklah
bf4bf92cb2
Merge pull request #7313 from orklah/empty-arrays
...
replace `array<never, never>` as a way to detect empty arrays by a dedicated method
2022-01-05 23:58:45 +01:00
orklah
3c468b3eeb
replace array<never, never>
as a way to detect empty arrays by a dedicated method
2022-01-05 23:14:54 +01:00
Bruce Weirdan
5758d31161
Apply literal number separator rector
...
I opted for customary 3-digit groups, except version id, where 2-digit
groups are used to match the version id encoding.
2022-01-05 01:00:05 +02:00
Bruce Weirdan
966b6ae2b2
Merge pull request #6808 from orklah/exitFunctions3
2022-01-03 06:04:01 +02:00
orklah
0747b48d06
remove TEmpty
2022-01-03 04:09:59 +02:00
orklah
b658b2738f
remove exitFunctions
2022-01-02 15:20:01 +02:00
orklah
8d6b781b3e
use consistent way to compare php version
2022-01-02 13:35:43 +02:00
adrew
878dfa2250
Variable types inference in method context when method marked with psalm-if-this-is
2022-01-01 13:03:17 +03:00
orklah
5f6bb39888
if with common parts
2021-12-27 23:08:19 +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
orklah
f79f857ded
Merge pull request #7133 from AndrolGenhald/remove-unused-suppressed
...
Allow suppressing UnusedPsalmSuppress, remove unused suppressions.
2021-12-11 23:24:31 +01:00
AndrolGenhald
225af970cc
Add comments explaining condition for UnusedPsalmSuppress.
2021-12-11 16:14:25 -06:00
AndrolGenhald
23b781163a
Use getSingleAtomic() instead of array_values(getAtomicTypes())[0].
2021-12-11 13:44:34 -06:00
AndrolGenhald
bfe7f96b56
Allow suppressing UnusedPsalmSuppress, remove unused suppressions.
2021-12-11 13:23:00 -06:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
f833085a15
Fix fqn usage in php-doc
2021-12-04 03:37:19 +01:00
ralila
30a65685a2
Import instead of using fqn classes
2021-12-03 21:40:18 +01:00
ralila
2a956498bf
Import instead of using fqn functions
2021-12-03 21:07:25 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
Matthew Brown
175ba83332
Migrate most IssueBuffer::accepts calls to IssueBuffer::maybeAdd ( #7020 )
2021-11-29 14:54:17 -05:00
orklah
ab61eae5c9
Taint can't transmit through numerics nor bool
2021-11-25 22:51:35 +01:00
orklah
3bc06a8eab
Taint can't transmit through numerics nor bool
2021-11-25 22:40:01 +01:00
Bruce Weirdan
c556920352
Revert "Merge remote-tracking branch 'upstream/master' into test5"
...
This reverts commit 043a0262f7
, reversing
changes made to cc4c29837d
.
2021-10-16 00:20:38 +03:00
orklah
99d8f92e4f
what would that do?
2021-10-15 22:33:04 +02:00
orklah
c4ebc34695
suppress or use the return type
2021-10-11 17:27:52 +02:00
orklah
5d6d3df4cf
unnecessary identical child method
2021-09-26 23:34:32 +02:00
Matthew Brown
6d09418a23
Detect unused return values ( #5917 )
...
* Detect unused return values
* Allow static-returning instance methods (presumed to be fluent)
* Make $is_used the default for Codebase::methodExists
2021-06-10 14:18:15 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
4f9067f5c8
Fix unused properties in Psalm’s own codebase
2021-05-21 09:15:23 -04:00
Matt Brown
f6bdeb6234
Fix switch-with-continue bug
2021-05-17 07:27:58 -05:00
Bruce Weirdan
0189420814
Inherit class-level suppressions when checking methods ( #5708 )
...
Fixes vimeo/psalm#5687
May fix vimeo/psalm#3357
2021-05-03 22:26:56 -04:00
Matthew Brown
832a190dd4
Support enums ( #5699 )
...
* Add initial enum preparation
* Support cases method
* Ignore bad use error
cc @weirdan
* Fix type
2021-05-03 17:54:09 -04:00
Bruce Weirdan
105c6f3a1c
Remove (and prevent) unused uses ( #5704 )
...
* Updates `slevomat/coding-standard`
* Removes unused uses
* Prevents unused uses
* Fixes a number of symbol case mismatches
2021-05-03 17:22:15 -04:00
Matt Brown
0f5b117534
Migrate ClassLikeName options to object
2021-04-30 15:01:33 -04:00
Bruce Weirdan
93946d0827
Forbid rejecting named arguments when parent allows them ( #5627 )
...
Fixes vimeo/psalm#5622
2021-04-15 06:55:13 -04:00
Matt Brown
c64e879178
Only check param-out when no exception is thrown
2021-03-27 09:50:20 -04:00
AndrolGenhald
de5a031088
Improve @no-named-arguments support and variadics. ( #5455 )
...
* Improve @no-named-arguments support and variadics.
Handling of argument unpacking and variadics still needs a pretty big makeover, but this is a good start.
Fixes #5420
Improves #5453 (iterable works, array still causes issues)
* Remove unneeded imports.
2021-03-22 19:58:22 -04:00
Bruce Weirdan
ae247d09a3
Don't mark promoted properties as unused params ( #5404 )
...
If anything, they should be marked as unused properties.
Fixes vimeo/psalm#4964
2021-03-16 13:41:43 -04:00
Matt Brown
817d1cf3fe
Fix #5408 - avoid nullref when parser param cannot be found
2021-03-16 13:40:16 -04:00
Matt Brown
8834a54934
Fix #5219 - invalidate cache for changed params
2021-02-14 12:07:15 -05:00
Matt Brown
61478bb003
Use generics to allow property subclassing
...
cc @bdsl
2021-02-09 11:40:52 -05:00
Barney Laurance
509aadc08a
Remove all (but one) properity declarations that needed NonInvariantDocblockPropertyType suppressed ( #5174 )
...
The remaining property
\Psalm\Internal\Analyzer\NamespaceAnalyzer::$source seems a bit harder
to fix
2021-02-08 09:36:42 -05:00