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