Simplify MWTidy
authorOri Livneh <ori@wikimedia.org>
Tue, 2 Dec 2014 01:10:52 +0000 (17:10 -0800)
committerOri Livneh <ori@wikimedia.org>
Wed, 10 Dec 2014 00:43:08 +0000 (16:43 -0800)
commit98c2703f81083125a76c84a2721305dab6225907
tree066c53c07bf57428e32d3986597bf8e6aa0d0936
parenta0b52295b68ba7eb7196547e1aa59ff0b5c1febf
Simplify MWTidy

* Make the internal MWTidy::*clean() functions always return an array of two
  elements: the output buffer and the error buffer.
* Make MWTidy::externalTidy() always read both stdout and stderr. We can read
  stderr after stdout because tidy.c produces output in the same order.
* Remove the $stderr parameter from the private MWTidy::*clean() methods, since
  error output is always returned.
* Merge MWTidy::phpClean and MWTidy::hhvmClean, since the difference between
  them is now small enough that splitting them up is not warranted.
* On HHVM, MWTidy::internalTidy() always returns an empty string for the error
  buffer.

Change-Id: I178b42d6ebdd1a5b9bd5921eb093a6c5014ffa49
includes/parser/MWTidy.php