public function enterClosureBind(Type $thisType = null, string $scopeClass) : self
{
$variableTypes = $this->getVariableTypes();
if ($thisType !== null) {
$variableTypes['this'] = $thisType;
} else {
unset($variableTypes['this']);
}
if ($scopeClass === 'static') {
$scopeClass = $this->getClass();
}
return new self($this->broker, $this->printer, $this->getFile(), $this->isDeclareStrictTypes(), $this->getClass(), $this->getFunction(), $this->getNamespace(), $variableTypes, $scopeClass, $this->getAnonymousFunctionReturnType(), $this->isInAnonymousClass() ? $this->getAnonymousClass() : null, $this->getInFunctionCall(), $this->isNegated(), $this->moreSpecificTypes);
}