Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/Completion/Bridge/TolerantParser/CompletionContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ public static function classMembersBody(?Node $node): bool
return false;
}

if ($node->parent instanceof MethodDeclaration && $node->openBrace instanceof MissingToken) {
if (
$node->parent instanceof MethodDeclaration
&& $node instanceof CompoundStatementNode
&& $node->openBrace instanceof MissingToken
) {
return false;
}

Expand Down
15 changes: 0 additions & 15 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,6 @@ parameters:
count: 1
path: lib/Completion/Bridge/TolerantParser/ChainTolerantCompletor.php

-
message: "#^Access to an undefined property Microsoft\\\\PhpParser\\\\Node\\:\\:\\$openBrace\\.$#"
count: 1
path: lib/Completion/Bridge/TolerantParser/CompletionContext.php

-
message: "#^Cannot call method getEndPosition\\(\\) on Microsoft\\\\PhpParser\\\\Node\\|null\\.$#"
count: 1
Expand Down Expand Up @@ -4065,16 +4060,6 @@ parameters:
count: 1
path: lib/Extension/LanguageServerRename/Tests/Util/OffsetExtractor.php

-
message: "#^Parameter \\#2 \\$offsets of class Phpactor\\\\Extension\\\\LanguageServerRename\\\\Tests\\\\Util\\\\OffsetExtractorResult constructor expects array\\<string, array\\<Phpactor\\\\TextDocument\\\\ByteOffset\\>\\>, array\\<int\\|string, array\\<int\\<0, max\\>, Phpactor\\\\TextDocument\\\\ByteOffset\\>\\> given\\.$#"
count: 1
path: lib/Extension/LanguageServerRename/Tests/Util/OffsetExtractor.php

-
message: "#^Parameter \\#3 \\$ranges of class Phpactor\\\\Extension\\\\LanguageServerRename\\\\Tests\\\\Util\\\\OffsetExtractorResult constructor expects array\\<string, array\\<Phpactor\\\\TextDocument\\\\ByteOffsetRange\\>\\>, array\\<int\\|string, array\\<int\\<0, max\\>, Phpactor\\\\TextDocument\\\\ByteOffsetRange\\>\\> given\\.$#"
count: 1
path: lib/Extension/LanguageServerRename/Tests/Util/OffsetExtractor.php

-
message: "#^Property Phpactor\\\\Extension\\\\LanguageServerRename\\\\Tests\\\\Util\\\\OffsetExtractor\\:\\:\\$points type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down
Loading