From b1f117532b51cca1bbdd9a4a551461667be603e4 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 6 Dec 2016 21:25:56 -0800 Subject: [PATCH] HtmlArmor: Document that null is an acceptable value And that you'll get null back. Change-Id: Ibd74e6af16b51796b46c2e23b7442740f5f69a0f --- includes/libs/HtmlArmor.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 ) { -- 2.20.1