$this->mFlatFields = [];
foreach ( $descriptor as $fieldname => $info ) {
- $section = isset( $info['section'] )
- ? $info['section']
- : '';
+ $section = $info['section'] ?? '';
if ( isset( $info['type'] ) && $info['type'] === 'file' ) {
$this->mUseMultipart = true;
if ( $section === null ) {
return $this->mHeader;
} else {
- return isset( $this->mSectionHeaders[$section] ) ? $this->mSectionHeaders[$section] : '';
+ return $this->mSectionHeaders[$section] ?? '';
}
}
if ( $section === null ) {
return $this->mFooter;
} else {
- return isset( $this->mSectionFooters[$section] ) ? $this->mSectionFooters[$section] : '';
+ return $this->mSectionFooters[$section] ?? '';
}
}
$data = [
'name' => $args[0],
'value' => $args[1],
- 'id' => isset( $args[2] ) ? $args[2] : null,
- 'attribs' => isset( $args[3] ) ? $args[3] : null,
+ 'id' => $args[2] ?? null,
+ 'attribs' => $args[3] ?? null,
];
} else {
if ( !isset( $data['name'] ) ) {