public function __unset($name)
{
switch ($name) {
case 'contentType':
case 'document':
case 'length':
case 'xpath':
throw new \BadMethodCallException(sprintf('Can not unset property %s::$%s', get_class($this), $name));
}
throw new \BadMethodCallException(sprintf('Can not unset non existing property %s::$%s', get_class($this), $name));
}
/** * Throws an exception if somebody tries to unset one * of the dynamic properties * * @param string $name * @throws \BadMethodCallException */ public function __unset($name) { switch ($name) { case 'attr': case 'css': case 'data': throw new \BadMethodCallException(sprintf('Can not unset property %s::$%s', get_class($this), $name)); } parent::__unset($name); // @codeCoverageIgnoreStart }