/** * 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 }