From: Kunal Mehta Date: Wed, 7 Dec 2016 05:25:56 +0000 (-0800) Subject: HtmlArmor: Document that null is an acceptable value X-Git-Tag: 1.31.0-rc.0~4635^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=b1f117532b51cca1bbdd9a4a551461667be603e4;p=lhc%2Fweb%2Fwiklou.git HtmlArmor: Document that null is an acceptable value And that you'll get null back. Change-Id: Ibd74e6af16b51796b46c2e23b7442740f5f69a0f --- diff --git a/includes/libs/HtmlArmor.php b/includes/libs/HtmlArmor.php index 4ba1bc316b..1c141ab0bb 100644 --- a/includes/libs/HtmlArmor.php +++ b/includes/libs/HtmlArmor.php @@ -28,12 +28,12 @@ class HtmlArmor { /** - * @var string + * @var string|null */ private $value; /** - * @param string $value + * @param string|null $value */ public function __construct( $value ) { $this->value = $value; @@ -44,7 +44,8 @@ class HtmlArmor { * and get safe HTML back * * @param string|HtmlArmor $input - * @return string safe for usage in HTML + * @return string|null safe for usage in HTML, or null + * if the HtmlArmor instance was wrapping null. */ public static function getHtml( $input ) { if ( $input instanceof HtmlArmor ) {