Skip to content

Commit

Permalink
Updated Rector to commit d246d27a9442cc08a419e899e07c2c19a680eb80
Browse files Browse the repository at this point in the history
rectorphp/rector-src@d246d27 [CodeQuality] Skip multiple lines on JoinStringConcatRector (#6404)
  • Loading branch information
TomasVotruba committed Oct 29, 2024
1 parent ef92460 commit 6aa0ede
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions rules/CodeQuality/Rector/Concat/JoinStringConcatRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public function refactor(Node $node) : ?Node
if (!$node->right instanceof String_) {
return null;
}
$leftStartLine = $node->left->getStartLine();
$rightStartLine = $node->right->getStartLine();
if ($leftStartLine > 0 && $rightStartLine > 0 && $rightStartLine > $leftStartLine) {
return null;
}
return $this->joinConcatIfStrings($node->left, $node->right);
}
private function joinConcatIfStrings(String_ $leftString, String_ $rightString) : ?String_
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '61ebcc53b5c50f244ce0f7dfb626ded8d371c0a5';
public const PACKAGE_VERSION = 'd246d27a9442cc08a419e899e07c2c19a680eb80';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-10-27 15:15:12';
public const RELEASE_DATE = '2024-10-30 00:17:39';
/**
* @var int
*/
Expand Down

0 comments on commit 6aa0ede

Please sign in to comment.