File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
rules/DowngradePhp80/Rector/Class_ Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,12 @@ public function refactor(Node $node): ?Node
120120 (string ) $ oldTokens [$ attrGroup ->getEndTokenPos () + 1 ],
121121 "\n"
122122 )) {
123- if ($ node instanceof Param) {
124- if (isset ($ oldTokens [$ attrGroup ->getStartTokenPos () - 1 ]) && ! str_contains (
125- (string ) $ oldTokens [$ attrGroup ->getStartTokenPos () - 1 ],
126- "\n"
127- )) {
128- // add new line before
129- $ oldTokens [$ attrGroup ->getStartTokenPos () - 1 ]->text .= "\n" ;
130- }
123+ if ($ node instanceof Param && (isset ($ oldTokens [$ attrGroup ->getStartTokenPos () - 1 ]) && ! str_contains (
124+ (string ) $ oldTokens [$ attrGroup ->getStartTokenPos () - 1 ],
125+ "\n"
126+ ))) {
127+ // add new line before
128+ $ oldTokens [$ attrGroup ->getStartTokenPos () - 1 ]->text .= "\n" ;
131129 }
132130
133131 // add new line after
You can’t perform that action at this time.
0 commit comments