Change use of AtEase to at operator

Change-Id: I0c92ba1ca00d43b3e7d636872372dd451f372a29
This commit is contained in:
Dringsim 2024-04-12 01:19:23 +08:00 committed by jenkins-bot
parent 72167d97b7
commit 8307c6b328

View file

@ -6,7 +6,6 @@ use Exception;
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaEngine; use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaEngine;
use MediaWiki\Logger\LoggerFactory; use MediaWiki\Logger\LoggerFactory;
use MediaWiki\Parser\ParserOutput; use MediaWiki\Parser\ParserOutput;
use Wikimedia\AtEase\AtEase;
class LuaStandaloneEngine extends LuaEngine { class LuaStandaloneEngine extends LuaEngine {
/** @var int|null */ /** @var int|null */
@ -85,9 +84,8 @@ class LuaStandaloneEngine extends LuaEngine {
*/ */
protected function getClockTick() { protected function getClockTick() {
if ( self::$clockTick === null ) { if ( self::$clockTick === null ) {
AtEase::suppressWarnings(); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
self::$clockTick = intval( shell_exec( 'getconf CLK_TCK' ) ); self::$clockTick = intval( @shell_exec( 'getconf CLK_TCK' ) );
AtEase::restoreWarnings();
if ( !self::$clockTick ) { if ( !self::$clockTick ) {
self::$clockTick = 100; self::$clockTick = 100;
} }