X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmwdocgen.php;h=dc2eccd080ab125d4c22ee8a359721a7163e1e4c;hb=9f1b11a9dcfda33f5904dbab972a660b6e136561;hp=49eae4a539a0b44885eb0f44fa1b8d09095102ff;hpb=8c087b9fd13d9302ec1be2176ef1ae344b3f8273;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 49eae4a539..dc2eccd080 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -46,7 +46,7 @@ class MWDocGen extends Maintenance { */ public function __construct() { parent::__construct(); - $this->mDescription = 'Build doxygen documentation'; + $this->addDescription( 'Build doxygen documentation' ); $this->addOption( 'doxygen', 'Path to doxygen', @@ -86,16 +86,15 @@ class MWDocGen extends Maintenance { $this->output = $this->getOption( 'output', "$IP/docs" ); - $this->inputFilter = wfShellWikiCmd( - $IP . '/maintenance/mwdoc-filter.php' ); + $this->inputFilter = wfShellWikiCmd( $IP . '/maintenance/mwdoc-filter.php' ); $this->template = $IP . '/maintenance/Doxyfile'; - $this->excludes = array( + $this->excludes = [ 'vendor', 'node_modules', 'images', 'static', - ); - $this->excludePatterns = array(); + ]; + $this->excludePatterns = []; if ( $this->hasOption( 'no-extensions' ) ) { $this->excludePatterns[] = 'extensions'; } @@ -118,7 +117,7 @@ class MWDocGen extends Maintenance { $excludePatterns = implode( ' ', $this->excludePatterns ); $conf = strtr( file_get_contents( $this->template ), - array( + [ '{{OUTPUT_DIRECTORY}}' => $this->output, '{{STRIP_FROM_PATH}}' => $IP, '{{CURRENT_VERSION}}' => $this->mwVersion, @@ -128,7 +127,7 @@ class MWDocGen extends Maintenance { '{{HAVE_DOT}}' => $this->doDot ? 'YES' : 'NO', '{{GENERATE_MAN}}' => $this->doMan ? 'YES' : 'NO', '{{INPUT_FILTER}}' => $this->inputFilter, - ) + ] ); $tmpFile = tempnam( wfTempDir(), 'MWDocGen-' );