}
public function getSize() {
- return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 45;
+ return $this->mParams['size'] ?? 45;
}
public function getSpellCheck() {
- $val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
+ $val = $this->mParams['spellcheck'] ?? null;
if ( is_bool( $val ) ) {
// "spellcheck" attribute literally requires "true" or "false" to work.
return $val === true ? 'true' : 'false';
}
protected function getType( &$attribs ) {
- $type = isset( $attribs['type'] ) ? $attribs['type'] : 'text';
+ $type = $attribs['type'] ?? 'text';
unset( $attribs['type'] );
# Implement tiny differences between some field variants