PHPSA\Definition\ClassMethod::addNewType PHP Method

addNewType() public method

public addNewType ( integer $newType )
$newType integer
    public function addNewType($newType)
    {
        if ($this->returnType != CompiledExpression::VOID) {
            $this->returnType = $this->returnType | $newType;
        } else {
            $this->returnType = $newType;
        }
    }