1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Ignore declared static properties with usage object gap

Usage static properties in PHP is allow only by static gap.
This commit is contained in:
Ivan Sidorov 2023-11-15 19:22:12 +00:00
parent 6f19440b02
commit 1cfc343c43
2 changed files with 1 additions and 20 deletions

View File

@ -1952,7 +1952,7 @@ final class Codebase
$declaring_class . '::$' . $property_name,
);
if ($property_storage->is_static || $gap === '->') {
if ($property_storage->is_static === ($gap === '::')) {
$completion_items[] = new CompletionItem(
$property_name,
CompletionItemKind::PROPERTY,

View File

@ -132,10 +132,6 @@ final class MethodGetCompletionItemsForClassishThingTest extends TestCase
'protectedObjProp',
'privateObjProp',
'publicStaticProp',
'protectedStaticProp',
'privateStaticProp',
'publicObjMethod',
'protectedObjMethod',
'privateObjMethod',
@ -212,10 +208,6 @@ final class MethodGetCompletionItemsForClassishThingTest extends TestCase
'publicObjProp',
'protectedObjProp',
'privateObjProp',
'publicStaticProp',
'protectedStaticProp',
'privateStaticProp',
'abstractPublicMethod',
'abstractProtectedMethod',
@ -299,10 +291,6 @@ final class MethodGetCompletionItemsForClassishThingTest extends TestCase
'publicObjProp',
'protectedObjProp',
'privateObjProp',
'publicStaticProp',
'protectedStaticProp',
'privateStaticProp',
],
'::' => [
'magicObjProp1',
@ -370,10 +358,6 @@ final class MethodGetCompletionItemsForClassishThingTest extends TestCase
'publicObjProp',
'protectedObjProp',
'privateObjProp',
'publicStaticProp',
'protectedStaticProp',
'privateStaticProp',
],
'::' => [
'magicObjProp1',
@ -437,9 +421,6 @@ final class MethodGetCompletionItemsForClassishThingTest extends TestCase
'publicObjProp',
'protectedObjProp',
'publicStaticProp',
'protectedStaticProp',
],
'::' => [
'magicObjProp1',