Open
Description
There is the rule SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion
which enforces Constructor Property Promotion.
Is there an other (additional) rule that marks private properties as readonly?
For example:
private array $config;
public function __construct(array $config) {
$this->config = $config;
}
actually is converted to
public function __construct(private array $config)
{
// nothing to do
}
but also may be converted to
public function __construct(private readonly array $config)
{
// nothing to do
}