-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
If the existing class property has a doc block, then the positioning of it when it gets moved to the __constructor is a little whack
Adding the following to the bottom of updateParameterSignature resulted in perfect positioning
foreach ($tokensToInsert as $key => $token) {
if ($token->isGivenKind(\T_DOC_COMMENT)) {
$tokensToInsert[$key] = new Token([\T_DOC_COMMENT, PHP_EOL.' '.preg_replace('/^/m', ' ', $token->getContent())]);
}
}
$this->tokensToInsert[$propertyStartIndex] = $tokensToInsert;A few additional options would be nice:
keep_class_property_docblocksdefaults totruepaddingdefaults to 4spaces
Currently you only put 1 whitespace in front of the promoted property which doesn't follow standards I believe.