function __construct( Profiler $collector, array $params ) {
parent::__construct( $collector, $params );
- $this->thresholdMs = isset( $params['thresholdMs'] )
- ? $params['thresholdMs']
- : 1.0;
+ $this->thresholdMs = $params['thresholdMs'] ?? 1.0;
}
public function log( array $stats ) {
if ( $this->collector->getTemplated() ) {
if ( wfIsCLI() ) {
print "<!--\n{$out}\n-->\n";
} elseif ( $contentType === 'text/html' ) {
- $visible = isset( $this->params['visible'] ) ?
- $this->params['visible'] : false;
+ $visible = $this->params['visible'] ?? false;
if ( $visible ) {
print "<pre>{$out}</pre>";
} else {