1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-05 20:48:45 +01:00

these commas man!

This commit is contained in:
Andrew Nagy 2022-04-28 18:42:20 +00:00
parent 96e7b428a0
commit e5c5b4ae73

View File

@ -208,12 +208,12 @@ class Codebase extends PsalmCodebase
[$fq_classlike_name, $const_name] = explode( [$fq_classlike_name, $const_name] = explode(
'::', '::',
$reference->symbol, $reference->symbol
); );
$class_constants = $this->classlikes->getConstantsForClass( $class_constants = $this->classlikes->getConstantsForClass(
$fq_classlike_name, $fq_classlike_name,
ReflectionProperty::IS_PRIVATE, ReflectionProperty::IS_PRIVATE
); );
if (!isset($class_constants[$const_name])) { if (!isset($class_constants[$const_name])) {
@ -291,7 +291,7 @@ class Codebase extends PsalmCodebase
$namespace_constants = NamespaceAnalyzer::getConstantsForNamespace( $namespace_constants = NamespaceAnalyzer::getConstantsForNamespace(
$namespace_name, $namespace_name,
ReflectionProperty::IS_PUBLIC, ReflectionProperty::IS_PUBLIC
); );
//Namespace Constant //Namespace Constant
if (isset($namespace_constants[$const_name])) { if (isset($namespace_constants[$const_name])) {
@ -392,7 +392,7 @@ class Codebase extends PsalmCodebase
$file_contents, $file_contents,
$matches, $matches,
0, 0,
$end_pos_excluding_whitespace, $end_pos_excluding_whitespace
) )
? strlen($matches[0]) ? strlen($matches[0])
: 0; : 0;