private inspectUnset ( PhpParser\Node\Stmt\Unset_ $unsetStmt, |
||
$unsetStmt | PhpParser\Node\Stmt\Unset_ | |
$context | ||
리턴 | boolean |
private function inspectUnset(Stmt\Unset_ $unsetStmt, Context $context)
{
$result = false;
foreach ($unsetStmt->vars as $var) {
if ($var->name === 'this') {
$result = true;
$context->notice('unexpected_use.this', 'Can not unset $this.', $var);
}
}
return $result;
}