1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Allow to scan private constants

This commit is contained in:
shvlv 2023-01-24 13:31:58 +02:00
parent d6aff3ed20
commit 6227943bfb
No known key found for this signature in database
GPG Key ID: 2062C18B717CE98A
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class PhpStormMetaScanner
$constant_type = $codebase->classlikes->getClassConstantType(
$resolved_name,
$array_item->key->name->name,
ReflectionProperty::IS_PUBLIC,
ReflectionProperty::IS_PRIVATE,
);
if (!$constant_type instanceof Union || !$constant_type->isSingleStringLiteral()) {

View File

@ -319,7 +319,7 @@ class StubTest extends TestCase
class MyClass {
public const OBJECT = "object";
public const EXCEPTION = "exception";
private const EXCEPTION = "exception";
/**
* @return mixed