Phan\Language\Element\Clazz::getConstantWithName PHP Method

getConstantWithName() public method

public getConstantWithName ( CodeBase $code_base, string $name ) : ClassConstant
$code_base Phan\CodeBase
$name string
return ClassConstant The class constant with the given name.
    public function getConstantWithName(CodeBase $code_base, string $name) : ClassConstant
    {
        return $code_base->getClassConstantByFQSEN(FullyQualifiedClassConstantName::make($this->getFQSEN(), $name));
    }