The @ sign requires a phpcs:ignore.
\MediaWiki\suppressWarnings() doesn't need a phpcs:ignore.
Bug: T191247
Change-Id: I6ef1e706f4f2a4192dde7a668b3b97086a4a8a68
// TODO replace with clear_last_error when requirements are bumped to PHP7
set_error_handler( function () {
}, 0 );
- // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
- @trigger_error( '' );
+ \MediaWiki\suppressWarnings();
+ trigger_error( '' );
+ \MediaWiki\restoreWarnings();
restore_error_handler();
$readPipes = wfArrayFilterByKey( $pipes, function ( $fd ) use ( $desc ) {