diff options
Diffstat (limited to 'lib/classes/sidebar/LinkElement.php')
| -rw-r--r-- | lib/classes/sidebar/LinkElement.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/classes/sidebar/LinkElement.php b/lib/classes/sidebar/LinkElement.php index 0376a47..4b87337 100644 --- a/lib/classes/sidebar/LinkElement.php +++ b/lib/classes/sidebar/LinkElement.php @@ -15,7 +15,7 @@ class LinkElement extends WidgetElement implements ArrayAccess * @return LinkElement Link element from parsed html * @throws Exception if html can not be parsed */ - public static function fromHTML($html, \Icon $icon = null) + public static function fromHTML($html, ?\Icon $icon = null) { $matched = preg_match('~(<a(?P<attributes>(?:\s+\w+=".*?")+)>\s*(?P<label>.*?)\s*</a>)~s', $html, $match); if (!$matched) { @@ -72,7 +72,7 @@ class LinkElement extends WidgetElement implements ArrayAccess * @param Icon $icon Icon for the link * @param array $attributes HTML-attributes for the a-tag in an associative array. */ - public function __construct($label, $url, \Icon $icon = null, $attributes = []) + public function __construct($label, $url, ?\Icon $icon = null, $attributes = []) { parent::__construct(); |
