src/Psalm/Internal/Codebase/Properties.php
public function propertyExists(
        string $property_id,
        bool $read_mode,
        StatementsSource $source = null,
        Context $context = null,
        CodeLocation $code_location = null
    ) {
        // remove trailing backslash if it exists
        $property_id = preg_replace('/^\\\\/', '', $property_id);

        list($fq_class_name, $property_name) = explode('::$', $property_id);

        if ($this->property_existence_provider->has($fq_class_name)) {
            $property_exists = $this->property_existence_provider->doesPropertyExist(
                $fq_class_name,
                $property_name,
                $read_mode,
                $source,
                $context,
                $code_location
            );

            if ($property_exists !== null) {
                return $property_exists;
            }
        }

        $class_storage = $this->classlike_storage_provider->get($fq_class_name);

        if (isset($class_storage->declaring_property_ids[$property_name])) {
            $declaring_property_class = $class_storage->declaring_property_ids[$property_name];

            if ($context && $context->calling_method_id) {
                $this->file_reference_provider->addMethodReferenceToClassMember(
                    $context->calling_method_id,
                    strtolower($declaring_property_class) . '::$' . $property_name
                );
            } elseif ($source) {
                $this->file_reference_provider->addFileReferenceToClassMember(
                    $source->getFilePath(),
                    strtolower($declaring_property_class) . '::$' . $property_name
                );
            }

            if ($this->collect_locations && $code_location) {
                $this->file_reference_provider->addCallingLocationForClassProperty(
                    $code_location,
                    strtolower($declaring_property_class) . '::$' . $property_name
                );
            }

            return true;
        }

        if ($context && $context->calling_method_id) {
            $this->file_reference_provider->addMethodReferenceToMissingClassMember(
                $context->calling_method_id,
                strtolower($fq_class_name) . '::$' . $property_name
            );
        } elseif ($source) {
            $this->file_reference_provider->addFileReferenceToMissingClassMember(
                $source->getFilePath(),
                strtolower($fq_class_name) . '::$' . $property_name
            );
        }

        return false;
    }
public function propertyExists(
        string $property_id,
        bool $read_mode,
        StatementsSource $source = null,
        Context $context = null,
        CodeLocation $code_location = null
    ) {
        // remove trailing backslash if it exists
        $property_id = preg_replace('/^\\\\/', '', $property_id);

        list($fq_class_name, $property_name) = explode('::$', $property_id);

        if ($this->property_existence_provider->has($fq_class_name)) {
            $property_exists = $this->property_existence_provider->doesPropertyExist(
                $fq_class_name,
                $property_name,
                $read_mode,
                $source,
                $context,
                $code_location
            );

            if ($property_exists !== null) {
                return $property_exists;
            }
        }

        $class_storage = $this->classlike_storage_provider->get($fq_class_name);

        if (isset($class_storage->declaring_property_ids[$property_name])) {
            $declaring_property_class = $class_storage->declaring_property_ids[$property_name];

            if ($context && $context->calling_method_id) {
                $this->file_reference_provider->addMethodReferenceToClassMember(
                    $context->calling_method_id,
                    strtolower($declaring_property_class) . '::$' . $property_name
                );
            } elseif ($source) {
                $this->file_reference_provider->addFileReferenceToClassMember(
                    $source->getFilePath(),
                    strtolower($declaring_property_class) . '::$' . $property_name
                );
            }

            if ($this->collect_locations && $code_location) {
                $this->file_reference_provider->addCallingLocationForClassProperty(
                    $code_location,
                    strtolower($declaring_property_class) . '::$' . $property_name
                );
            }

            return true;
        }

        if ($context && $context->calling_method_id) {
            $this->file_reference_provider->addMethodReferenceToMissingClassMember(
                $context->calling_method_id,
                strtolower($fq_class_name) . '::$' . $property_name
            );
        } elseif ($source) {
            $this->file_reference_provider->addFileReferenceToMissingClassMember(
                $source->getFilePath(),
                strtolower($fq_class_name) . '::$' . $property_name
            );
        }

        return false;
    }
public function propertyExists ( string $ property_id , bool $ read_mode , StatementsSource $ source = null , Context $ context = null , CodeLocation $ code_location = null ) { // remove trailing backslash if it exists $ property_id = preg_replace ( '/^\\\\/' , '' , $ property_id ) ; list ( $ fq_class_name , $ property_name ) = explode ( '::$' , $ property_id ) ; if ( $ this -> property_existence_provider -> has ( $ fq_class_name ) ) { $ property_exists = $ this -> property_existence_provider -> doesPropertyExist ( $ fq_class_name , $ property_name , $ read_mode , $ source , $ context , $ code_location ) ; if ( $ property_exists !== null ) { return $ property_exists ; } } $ class_storage = $ this -> classlike_storage_provider -> get ( $ fq_class_name ) ; if ( isset ( $ class_storage -> declaring_property_ids [ $ property_name ] ) ) { $ declaring_property_class = $ class_storage -> declaring_property_ids [ $ property_name ] ; if ( $ context && $ context -> calling_method_id ) { $ this -> file_reference_provider -> addMethodReferenceToClassMember ( $ context -> calling_method_id , strtolower ( $ declaring_property_class ) . '::$' . $ property_name ) ; } elseif ( $ source ) { $ this -> file_reference_provider -> addFileReferenceToClassMember ( $ source -> getFilePath ( ) , strtolower ( $ declaring_property_class ) . '::$' . $ property_name ) ; } if ( $ this -> collect_locations && $ code_location ) { $ this -> file_reference_provider -> addCallingLocationForClassProperty ( $ code_location , strtolower ( $ declaring_property_class ) . '::$' . $ property_name ) ; } return true ; } if ( $ context && $ context -> calling_method_id ) { $ this -> file_reference_provider -> addMethodReferenceToMissingClassMember ( $ context -> calling_method_id , strtolower ( $ fq_class_name ) . '::$' . $ property_name ) ; } elseif ( $ source ) { $ this -> file_reference_provider -> addFileReferenceToMissingClassMember ( $ source -> getFilePath ( ) , strtolower ( $ fq_class_name ) . '::$' . $ property_name ) ; } return false ; }
Whether or not a given property exists

@return bool
Whether or not a given property exists