X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftidy%2FRaggettExternal.php;h=0b485c7cc6cef76da087ff7092c05acd85e41dec;hb=6d4f11c2e3de50b41bd6df0bce125f0800c6d991;hp=c21bcf83de9c35a6481aa5583771238183cd0817;hpb=8d1c5a70f753fe6b7d2533a30b07fe03e6583a1d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/tidy/RaggettExternal.php b/includes/tidy/RaggettExternal.php index c21bcf83de..0b485c7cc6 100644 --- a/includes/tidy/RaggettExternal.php +++ b/includes/tidy/RaggettExternal.php @@ -2,6 +2,9 @@ namespace MediaWiki\Tidy; +/** + * @deprecated since 1.32, use RemexDriver + */ class RaggettExternal extends RaggettBase { /** * Spawn an external HTML tidy process and get corrected markup back from it. @@ -9,7 +12,7 @@ class RaggettExternal extends RaggettBase { * * @param string $text HTML to check * @param bool $stderr Whether to read result from STDERR rather than STDOUT - * @param int &$retval Exit code (-1 on internal error) + * @param int|null &$retval Exit code (-1 on internal error) * @return string|null */ protected function cleanWrapped( $text, $stderr = false, &$retval = null ) { @@ -17,21 +20,21 @@ class RaggettExternal extends RaggettBase { $opts = ' -utf8'; if ( $stderr ) { - $descriptorspec = array( - 0 => array( 'pipe', 'r' ), - 1 => array( 'file', wfGetNull(), 'a' ), - 2 => array( 'pipe', 'w' ) - ); + $descriptorspec = [ + 0 => [ 'pipe', 'r' ], + 1 => [ 'file', wfGetNull(), 'a' ], + 2 => [ 'pipe', 'w' ] + ]; } else { - $descriptorspec = array( - 0 => array( 'pipe', 'r' ), - 1 => array( 'pipe', 'w' ), - 2 => array( 'file', wfGetNull(), 'a' ) - ); + $descriptorspec = [ + 0 => [ 'pipe', 'r' ], + 1 => [ 'pipe', 'w' ], + 2 => [ 'file', wfGetNull(), 'a' ] + ]; } $readpipe = $stderr ? 2 : 1; - $pipes = array(); + $pipes = []; $process = proc_open( "{$this->config['tidyBin']} -config {$this->config['tidyConfigFile']} " .