Skip to content

Commit

Permalink
Missing getters for existing setters, missing 'public' modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
sad-spirit committed Nov 2, 2023
1 parent fa1c7ff commit b52681d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
12 changes: 11 additions & 1 deletion HTML/QuickForm2/Element/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,22 @@ public function toggleFrozen($freeze = null)
*
* @return $this
*/
function setContent($content)
public function setContent($content)
{
$this->data['content'] = $content;
return $this;
}

/**
* Returns the contents of the button element
*
* @return string
*/
public function getContent()
{
return $this->data['content'];
}

/**
* Button's value cannot be set via this method
*
Expand Down
14 changes: 12 additions & 2 deletions HTML/QuickForm2/Element/Static.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function toggleFrozen($freeze = null)
*
* @return $this
*/
function setContent($content)
public function setContent($content)
{
$this->data['content'] = $content;
return $this;
Expand All @@ -157,7 +157,7 @@ function setContent($content)
*
* @return string|null
*/
function getContent()
public function getContent()
{
return $this->data['content'];
}
Expand Down Expand Up @@ -258,5 +258,15 @@ public function setTagName($name, $forceClosing = true)

return $this;
}

/**
* Returns the name of an HTML tag to wrap around the element's content
*
* @return string|null
*/
public function getTagName()
{
return $this->tagName;
}
}
?>

0 comments on commit b52681d

Please sign in to comment.