Skip to content

Commit

Permalink
Append switched to variadic
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Apr 18, 2019
1 parent 3950ea5 commit 83a17d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SafeHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public function getContent()
}

/**
* @param $html
* @param ...$toAppend
*
* @return $this
* @throws \Exception
*/
public function append($html /* , ... */)
public function append(...$toAppend)
{
foreach(func_get_args() as $html)
foreach($toAppend as $html)
{
$this->content .= self::escape($html);
}
Expand Down Expand Up @@ -104,7 +104,7 @@ public static function escape($input, $arrayGlue = ' ')
* infix URI components, use @{function:phutil_escape_uri_path_component}
* instead.
*
* @param string $string Some string.
* @param string $string Some string.
*
* @return string URI encoded string, except for '/'.
*/
Expand All @@ -128,7 +128,7 @@ public static function escapeUri($string)
* the
* application.
*
* @param string $string Some string.
* @param string $string Some string.
*
* @return string URI encoded string that is safe for infix composition.
*/
Expand Down

0 comments on commit 83a17d1

Please sign in to comment.