Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
[lhc/web/wiklou.git] / includes / changes / ChangesList.php
index ac029a2..d7e9052 100644 (file)
@@ -236,7 +236,7 @@ class ChangesList extends ContextSource {
                                $flagInfos[$key]['letter'] = $value['letter'];
                                $flagInfos[$key]['title'] = $value['title'];
                                // Allow customized class name, fall back to flag name
-                               $flagInfos[$key]['class'] = isset( $value['class'] ) ? $value['class'] : $key;
+                               $flagInfos[$key]['class'] = $value['class'] ?? $key;
                        }
                }
 
@@ -646,7 +646,7 @@ class ChangesList extends ContextSource {
                                        'id' => $rc->mAttribs['rc_this_oldid'],
                                        'user' => $rc->mAttribs['rc_user'],
                                        'user_text' => $rc->mAttribs['rc_user_text'],
-                                       'actor' => isset( $rc->mAttribs['rc_actor'] ) ? $rc->mAttribs['rc_actor'] : null,
+                                       'actor' => $rc->mAttribs['rc_actor'] ?? null,
                                        'deleted' => $rc->mAttribs['rc_deleted']
                                ] );
                                $s .= ' ' . Linker::generateRollback( $rev, $this->getContext() );