Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix complex constant return expression #1

Merged
merged 5 commits into from
Oct 28, 2022
Merged

Fix complex constant return expression #1

merged 5 commits into from
Oct 28, 2022

Conversation

Slamdunk
Copy link

Reasoning behind this PR will be written as a reply to sebastianbergmann#949 (comment) soon

@@ -154,6 +153,8 @@ private function getLines(Node $node): array
}

if ($node instanceof ArrayDimFetch) {
$this->arrayDimFetchVars[spl_object_hash($node->var)] = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spl_object_id is faster

}

public function nowdocSimpleC(): string
public function nowdoc(): string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heredoc/nowdoc with 2+ lines content should be tested to assert startLine + 1 is correct

@Slamdunk Slamdunk requested a review from mvorisek October 28, 2022 06:18
@mvorisek mvorisek merged commit 548bcae into mvorisek:test_more_const_expr Oct 28, 2022
@mvorisek
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants