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:
parent
6f19440b02
commit
1cfc343c43
@ -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,
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user