-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
phpdoc_var_without_name is corrupting phpdoc type with $this #6959
Copy link
Copy link
Closed
Labels
Description
Bug report
array<string, string|array{ string|\Closure(mixed, string, $this): int|float }>|false is valid phpdoc type and must be kept unchanged.
Description
1) ui/src/Table.php (phpdoc_var_without_name)
---------- begin diff ----------
--- /__w/ui/ui/src/Table.php
+++ /__w/ui/ui/src/Table.php
@@ -43,7 +43,7 @@
* Determines a strategy on how totals will be calculated. Do not touch those fields
* directly, instead use addTotals().
*
- * @var array<string, string|array{ string|\Closure(mixed, string, $this): int|float }>|false
+ * @var array<string, string|array{ string|\Closure(mixed, string,): int|float }>|false
*/
public $totalsPlan = false;
Runtime version
PHP CS Fixer 3.16.0 BoY42 by Fabien Potencier and Dariusz Ruminski.
PHP runtime: 8.1.18
Used command
vendor/bin/php-cs-fixer fix --dry-run --using-cache=no --diff --verbose
Configuration file
https://github.com/atk4/ui/blob/01d39d24694e4b4f63a576d090e55e0e97aaa9e4/.php-cs-fixer.dist.php
Code snippet that reproduces the problem
class Table
{
/**
* Determines a strategy on how totals will be calculated. Do not touch those fields
* directly, instead use addTotals().
*
* @var array<string, string|array{ string|\Closure(mixed, string, $this): int|float }>|false
*/
public $totalsPlan = false;
}
Reactions are currently unavailable