rule: Usage of "new" without parentheses is disallowed. (SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses)
$object3 = new class {
public readonly int $foo;
public int $bar;
};
is not detected at all (this may be a feature? - running with default configuration: <rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>)
$object4 = new readonly class {
public int $foo;
};
is autofixed to invalid code (wrong parentheses placement):
$object4 = new readonly class {
public int $foo();
};
this is ok (no error. not changed):
$object4 = new readonly class() {
public int $foo;
};
rule: Usage of "new" without parentheses is disallowed. (SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses)
is not detected at all (this may be a feature? - running with default configuration:
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>
)is autofixed to invalid code (wrong parentheses placement):
this is ok (no error. not changed):