X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXmlSelect.php;h=45002e82f66ee39becf44f0233fef6181b6d26c1;hb=8e0ef3e187b4b8ebe847dbc8ae1ec2b96ed58ae0;hp=89f2f41cb876284d488fd5c6a464d31e6d4b6f2e;hpb=4b73a8b6fbb6da651af850a7d667e6e8d59e6fce;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/XmlSelect.php b/includes/XmlSelect.php index 89f2f41cb8..45002e82f6 100644 --- a/includes/XmlSelect.php +++ b/includes/XmlSelect.php @@ -70,16 +70,12 @@ class XmlSelect { * @return string|null */ public function getAttribute( $name ) { - if ( isset( $this->attributes[$name] ) ) { - return $this->attributes[$name]; - } else { - return null; - } + return $this->attributes[$name] ?? null; } /** * @param string $label - * @param string $value If not given, assumed equal to $label + * @param string|false $value If not given, assumed equal to $label */ public function addOption( $label, $value = false ) { $value = $value !== false ? $value : $label; @@ -103,7 +99,7 @@ class XmlSelect { * label => ( label => value, label => value ) * * @param array $options - * @param string|array $default + * @param string|array|false $default * @return string */ static function formatOptions( $options, $default = false ) {