private function inspectTryCatch(Stmt\TryCatch $tryCatchStmt, Context $context)
{
$result = false;
/** @var Stmt\Catch_ $catch */
foreach ($tryCatchStmt->catches as $catch) {
if ($catch->var === 'this') {
$result = true;
$context->notice('unexpected_use.this', 'Catch block can not have a catch variable named "this".', $catch);
}
}
return $result;
}