diff --git a/inc/Form/TagCloseElement.php b/inc/Form/TagCloseElement.php index dc0264c21ee676a772ffdedfdbd27132cfc83576..252c1af776aac158380428292e81678e689f1d87 100644 --- a/inc/Form/TagCloseElement.php +++ b/inc/Form/TagCloseElement.php @@ -34,11 +34,15 @@ class TagCloseElement extends ValueElement { * do not call this * * @param $id - * @return void + * @return string * @throws \BadMethodCallException */ public function id($id = null) { - throw new \BadMethodCallException('You can\t add ID to closing tag'); + if ($id === null) { + return ''; + } else { + throw new \BadMethodCallException('You can\t add ID to closing tag'); + } } /** @@ -46,22 +50,30 @@ class TagCloseElement extends ValueElement { * * @param $name * @param $value - * @return void + * @return string * @throws \BadMethodCallException */ public function attr($name, $value = null) { - throw new \BadMethodCallException('You can\t add attributes to closing tag'); + if ($value === null) { + return ''; + } else { + throw new \BadMethodCallException('You can\t add attributes to closing tag'); + } } /** * do not call this * * @param $attributes - * @return void + * @return array * @throws \BadMethodCallException */ public function attrs($attributes = null) { - throw new \BadMethodCallException('You can\t add attributes to closing tag'); + if ($attributes === null) { + return array(); + } else { + throw new \BadMethodCallException('You can\t add attributes to closing tag'); + } } /**