Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/96509
Change subject: Fixed spacing ...................................................................... Fixed spacing - Removed trailing spaces in comments - Removed multiple empty lines - Added space around parenthesis and changed TRUE -> true Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2 --- M includes/Block.php M includes/DefaultSettings.php M includes/GlobalFunctions.php M includes/HTMLForm.php M includes/Setup.php M includes/SpecialPage.php M includes/db/DatabaseMysqlBase.php M includes/filebackend/FileOp.php M includes/filerepo/FileRepo.php M includes/filerepo/file/LocalFile.php M includes/gallery/TraditionalImageGallery.php M includes/installer/WebInstallerOutput.php M includes/job/jobs/PublishStashedFileJob.php M includes/media/Bitmap.php M includes/media/ImageHandler.php M includes/parser/Preprocessor_DOM.php M includes/profiler/ProfilerSimpleUDP.php M includes/resourceloader/ResourceLoader.php M includes/revisiondelete/RevisionDeleter.php M includes/specials/SpecialImport.php M includes/specials/SpecialRandomInCategory.php M includes/upload/UploadBase.php M languages/classes/LanguageBs.php M languages/classes/LanguageOs.php M languages/classes/LanguageTr.php M maintenance/Maintenance.php M maintenance/backupTextPass.inc M maintenance/dumpTextPass.php M maintenance/generateSitemap.php M maintenance/moveBatch.php M maintenance/reassignEdits.php M maintenance/refreshImageMetadata.php M maintenance/runBatchedQuery.php M maintenance/showCacheStats.php M maintenance/storage/checkStorage.php M maintenance/storage/testCompression.php M maintenance/storage/trackBlobs.php M maintenance/userOptions.inc M skins/CologneBlue.php M skins/MonoBook.php M tests/phpunit/MediaWikiPHPUnitCommand.php M tests/phpunit/includes/EditPageTest.php M tests/phpunit/includes/ExceptionTest.php M tests/phpunit/includes/GlobalFunctions/GlobalTest.php M tests/phpunit/includes/PathRouterTest.php M tests/phpunit/includes/RevisionStorageTest.php M tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php M tests/phpunit/includes/RevisionTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/WikiPageTest.php M tests/phpunit/includes/api/ApiUploadTest.php M tests/phpunit/includes/api/RandomImageGenerator.php M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php M tests/phpunit/includes/debug/MWDebugTest.php M tests/phpunit/includes/media/ExifRotationTest.php M tests/phpunit/includes/media/ExifTest.php M tests/phpunit/includes/media/JpegMetadataExtractorTest.php M tests/phpunit/includes/media/JpegTest.php M tests/phpunit/includes/media/PNGMetadataExtractorTest.php M tests/phpunit/includes/upload/UploadBaseTest.php M tests/phpunit/includes/utils/ZipDirectoryReaderTest.php M tests/phpunit/languages/LanguageSrTest.php M tests/phpunit/languages/LanguageTest.php M tests/phpunit/languages/LanguageUzTest.php M tests/phpunit/maintenance/DumpTestCase.php M tests/phpunit/maintenance/MaintenanceTest.php M tests/phpunit/maintenance/backupPrefetchTest.php M tests/phpunit/maintenance/backupTextPassTest.php M tests/phpunit/maintenance/backup_LogTest.php M tests/phpunit/maintenance/backup_PageTest.php M tests/phpunit/maintenance/fetchTextTest.php M tests/phpunit/skins/SideBarTest.php M tests/phpunit/structure/ResourcesTest.php M tests/testHelpers.inc M thumb.php 75 files changed, 9 insertions(+), 121 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/96509/1 diff --git a/includes/Block.php b/includes/Block.php index 34b89e7..9aeb99b 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1083,7 +1083,6 @@ return null; } - /** * Get all blocks that match any IP from an array of IP addresses * diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index fbf838c..8e7e76e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5037,7 +5037,7 @@ * Host for UDP profiler. * * The host should be running a daemon which can be obtained from MediaWiki - * Git at: + * Git at: * http://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile */ $wgUDPProfilerHost = '127.0.0.1'; diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 57877a2..ca0ca41 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -508,7 +508,6 @@ } } - // Analyze $serverUrl to obtain its protocol $bits = wfParseUrl( $serverUrl ); $serverHasProto = $bits && $bits['scheme'] != ''; @@ -2773,9 +2772,9 @@ * @param array $limits optional array with limits(filesize, memory, time, walltime) * this overwrites the global wgShellMax* limits. * @param array $options Array of options: - * - duplicateStderr: Set this to true to duplicate stderr to stdout, + * - duplicateStderr: Set this to true to duplicate stderr to stdout, * including errors from limit.sh - * + * * @return string collected stdout as a string */ function wfShellExec( $cmd, &$retval = null, $environ = array(), @@ -2878,9 +2877,9 @@ $logMsg = false; // According to the documentation, it is possible for stream_select() - // to fail due to EINTR. I haven't managed to induce this in testing - // despite sending various signals. If it did happen, the error - // message would take the form: + // to fail due to EINTR. I haven't managed to induce this in testing + // despite sending various signals. If it did happen, the error + // message would take the form: // // stream_select(): unable to select [4]: Interrupted system call (max_fd=5) // @@ -3513,7 +3512,6 @@ $newSessionId = session_id(); wfRunHooks( 'ResetSessionID', array( $oldSessionId, $newSessionId ) ); } - /** * Initialise php session diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index b60146a..1680fd6 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -745,7 +745,7 @@ $attribs['class'] = array( 'mw-htmlform-submit' ); if ( $this->isVForm() ) { - // mw-ui-block is necessary because the buttons aren't necessarily in an + // mw-ui-block is necessary because the buttons aren't necessarily in an // immediate child div of the vform. array_push( $attribs['class'], 'mw-ui-button', 'mw-ui-big', 'mw-ui-primary', 'mw-ui-block' ); } diff --git a/includes/Setup.php b/includes/Setup.php index 2e083d8..81dada2 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -293,7 +293,6 @@ $wgMetaNamespace = str_replace( ' ', '_', $wgSitename ); } - // Default value is either the suhosin limit or -1 for unlimited if ( $wgResourceLoaderMaxQueryLength === false ) { $maxValueLength = ini_get( 'suhosin.get.max_value_length' ); diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 9fb39da..f70a6dc 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -1460,7 +1460,6 @@ } } - /** * Redirect from Special:PermanentLink/### to index.php?oldid=### */ diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index 6a3ebcb..46f5301 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -1056,8 +1056,6 @@ } - - /** * Utility class. * @ingroup Database diff --git a/includes/filebackend/FileOp.php b/includes/filebackend/FileOp.php index 3c5b7b2..05c0a39 100644 --- a/includes/filebackend/FileOp.php +++ b/includes/filebackend/FileOp.php @@ -84,7 +84,6 @@ } } - /** * Normalize a string if it is a valid storage path * diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 1195d5f..fdb00de 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1717,7 +1717,6 @@ */ protected function assertWritableRepo() {} - /** * Return information about the repository. * diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index b609f43..2cd4f90 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1371,7 +1371,6 @@ $dbw->commit( __METHOD__ ); // commit before anything bad can happen } - wfProfileOut( __METHOD__ . '-edit' ); # Save to cache and purge the squid diff --git a/includes/gallery/TraditionalImageGallery.php b/includes/gallery/TraditionalImageGallery.php index 1f60fa6..c6e6dd3 100644 --- a/includes/gallery/TraditionalImageGallery.php +++ b/includes/gallery/TraditionalImageGallery.php @@ -22,7 +22,6 @@ class TraditionalImageGallery extends ImageGalleryBase { - /** * Return a HTML representation of the image gallery * @@ -167,7 +166,6 @@ ) . "<br />\n" : ''; - $galleryText = $textlink . $text . $fileSize; $galleryText = $this->wrapGalleryText( $galleryText, $thumb ); @@ -184,7 +182,6 @@ return $output; } - /** * Add the wrapper html around the thumb's caption diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index 6178e5b..fd91bcb 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -302,7 +302,6 @@ </div></div> - <div id="mw-panel"> <div class="portal" id="p-logo"> <a style="background-image: url(../skins/common/images/mediawiki.png);" diff --git a/includes/job/jobs/PublishStashedFileJob.php b/includes/job/jobs/PublishStashedFileJob.php index 5a24f93..1276e3c 100644 --- a/includes/job/jobs/PublishStashedFileJob.php +++ b/includes/job/jobs/PublishStashedFileJob.php @@ -51,7 +51,6 @@ return false; } - UploadBase::setSessionStatus( $this->params['filekey'], array( 'result' => 'Poll', 'stage' => 'publish', 'status' => Status::newGood() ) diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 43ba117..4959687 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -708,7 +708,6 @@ imagejpeg( $dst_image, $thumbPath, 95 ); } - /** * Returns whether the current scaler supports rotation (im and gd do) * diff --git a/includes/media/ImageHandler.php b/includes/media/ImageHandler.php index e079003..b6586d0 100644 --- a/includes/media/ImageHandler.php +++ b/includes/media/ImageHandler.php @@ -213,7 +213,6 @@ return $image->getWidth() * $image->getHeight(); } - /** * @param $file File * @return string diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 3138f48..57020a1 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -160,7 +160,6 @@ $xml = $this->preprocessToXml( $text, $flags ); } - // Fail if the number of elements exceeds acceptable limits // Do not attempt to generate the DOM $this->parser->mGeneratedPPNodeCount += substr_count( $xml, '<' ); diff --git a/includes/profiler/ProfilerSimpleUDP.php b/includes/profiler/ProfilerSimpleUDP.php index 418ab12..982c6ae 100644 --- a/includes/profiler/ProfilerSimpleUDP.php +++ b/includes/profiler/ProfilerSimpleUDP.php @@ -23,7 +23,7 @@ /** * ProfilerSimpleUDP class, that sends out messages for 'udpprofile' daemon - * (the one from + * (the one from * http://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile) * @ingroup Profiler */ diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 91acd11..f529568 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -738,7 +738,6 @@ $blobs = array(); } - foreach ( $missing as $name ) { $states[$name] = 'missing'; } diff --git a/includes/revisiondelete/RevisionDeleter.php b/includes/revisiondelete/RevisionDeleter.php index dbcb3d7..02e1dda 100644 --- a/includes/revisiondelete/RevisionDeleter.php +++ b/includes/revisiondelete/RevisionDeleter.php @@ -201,7 +201,6 @@ return call_user_func( array( self::$allowedTypes[$typeName], 'suggestTarget' ), $target, $ids ); } - /** * Checks if a revision still exists in the revision table. * If it doesn't, returns the corresponding ar_timestamp field diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index d7d860d..1bc6c92 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -411,7 +411,6 @@ private $mOriginalPageOutCallback = null; private $mLogItemCount = 0; - /** * @param WikiImporter $importer * @param $upload diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index 0e022bf..14123a8 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -87,7 +87,6 @@ $this->setCategory( $cat ); } - if ( !$this->category && $categoryStr ) { $this->setHeaders(); $this->getOutput()->addWikiMsg( 'randomincategory-invalidcategory', diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index b162de2..183e7f3 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -394,7 +394,6 @@ return true; } - /** * Verifies that it's ok to include the uploaded file * @@ -420,7 +419,6 @@ return array( 'filetype-mime-mismatch', $this->mFinalExtension, $mime ); } } - $handler = MediaHandler::getHandler( $mime ); if ( $handler ) { @@ -1096,7 +1094,6 @@ wfProfileOut( __METHOD__ ); return false; } - /** * Check a whitelist of xml encodings that are known not to be interpreted differently diff --git a/languages/classes/LanguageBs.php b/languages/classes/LanguageBs.php index 3da7711..072e857 100644 --- a/languages/classes/LanguageBs.php +++ b/languages/classes/LanguageBs.php @@ -28,7 +28,6 @@ */ class LanguageBs extends Language { - /** * Convert from the nominative form of a noun to some other case * Invoked with {{GRAMMAR:case|word}} diff --git a/languages/classes/LanguageOs.php b/languages/classes/LanguageOs.php index f37e2d5..7ea67f2 100644 --- a/languages/classes/LanguageOs.php +++ b/languages/classes/LanguageOs.php @@ -67,7 +67,6 @@ # Variable for ending $ending = ''; - # CHecking if the $word is in plural form if ( preg_match( '/тæ$/u', $word ) ) { $word = mb_substr( $word, 0, -1 ); diff --git a/languages/classes/LanguageTr.php b/languages/classes/LanguageTr.php index 887f05c..8d2fe16 100644 --- a/languages/classes/LanguageTr.php +++ b/languages/classes/LanguageTr.php @@ -21,7 +21,6 @@ * @ingroup Language */ - /** * Turkish (Türkçe) * diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 30e93c9..91a027e 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -787,7 +787,6 @@ $this->output( "\n" ); } - // Script specific parameters not defined on construction by // Maintenance::addDefaultParams() $scriptSpecificParams = array_diff_key( diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc index 8fdb958..a51e6ee 100644 --- a/maintenance/backupTextPass.inc +++ b/maintenance/backupTextPass.inc @@ -82,7 +82,6 @@ */ protected $db; - /** * Drop the database connection $this->db and try to get a new one. * @@ -123,7 +122,6 @@ throw new MWException( __METHOD__ . " rotating DB failed to obtain new load balancer (" . $e->getMessage() . ")" ); } - // 2. The Connection, through the load balancer. try { $this->db = $this->lb->getConnection( DB_SLAVE, 'dump' ); @@ -131,7 +129,6 @@ throw new MWException( __METHOD__ . " rotating DB failed to obtain new database (" . $e->getMessage() . ")" ); } } - function initProgress( $history = WikiExporter::FULL ) { parent::initProgress(); @@ -555,7 +552,6 @@ return ""; } - /** * May throw a database error if, say, the server dies during query. diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 5d783cb9..37c2a31 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -29,7 +29,6 @@ require_once __DIR__ . '/commandLine.inc'; require_once __DIR__ . '/backupTextPass.inc'; - $dumper = new TextPassDumper( $argv ); if ( !isset( $options['help'] ) ) { diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index 0b21a1f..ab28c8b 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -125,7 +125,6 @@ */ public $findex; - /** * A resource pointing to a sitemap file * diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index f991c1b..5171b17 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -99,7 +99,6 @@ continue; } - $this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() ); $dbw->begin( __METHOD__ ); $err = $source->moveTo( $dest, false, $reason, !$noredirects ); diff --git a/maintenance/reassignEdits.php b/maintenance/reassignEdits.php index 7e15c09..ee3f709 100644 --- a/maintenance/reassignEdits.php +++ b/maintenance/reassignEdits.php @@ -174,8 +174,6 @@ $user->load(); return $user; } - - } $maintClass = "ReassignEdits"; diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index 7fe5c4c..9f73e49 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -207,6 +207,5 @@ } } - $maintClass = 'RefreshImageMetadata'; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/runBatchedQuery.php b/maintenance/runBatchedQuery.php index 93ba24a..76340cd 100644 --- a/maintenance/runBatchedQuery.php +++ b/maintenance/runBatchedQuery.php @@ -60,6 +60,5 @@ } } - $maintClass = "BatchedQueryRunner"; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/showCacheStats.php b/maintenance/showCacheStats.php index cd9768d..9168d6f 100644 --- a/maintenance/showCacheStats.php +++ b/maintenance/showCacheStats.php @@ -57,7 +57,6 @@ $this->output( sprintf( "without session: %-10d %6.2f%%\n", $noSession, $noSession / $total * 100 ) ); $this->output( sprintf( "total: %-10d %6.2f%%\n", $total, 100 ) ); - $this->output( "\nParser cache\n" ); $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) ); $expired = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_expired' ) ) ); diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index 03dc113..9174d12 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -34,7 +34,6 @@ $cs->check( $fix, $xml ); } - // ---------------------------------------------------------------------------------- /** @@ -330,7 +329,6 @@ printf( "%-30s %10d %5.2f%%\n", $className, $count, $count / $total * 100 ); } } - function error( $type, $msg, $ids ) { if ( is_array( $ids ) && count( $ids ) == 1 ) { diff --git a/maintenance/storage/testCompression.php b/maintenance/storage/testCompression.php index fdc28d9..d693986 100644 --- a/maintenance/storage/testCompression.php +++ b/maintenance/storage/testCompression.php @@ -45,7 +45,6 @@ } $type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob'; - $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( array( 'page', 'revision', 'text' ), diff --git a/maintenance/storage/trackBlobs.php b/maintenance/storage/trackBlobs.php index 7857dd9..c2df0dd 100644 --- a/maintenance/storage/trackBlobs.php +++ b/maintenance/storage/trackBlobs.php @@ -24,7 +24,6 @@ require __DIR__ . '/../commandLine.inc'; - if ( count( $args ) < 1 ) { echo "Usage: php trackBlobs.php <cluster> [... <cluster>]\n"; echo "Adds blobs from a given ES cluster to the blob_tracking table\n"; diff --git a/maintenance/userOptions.inc b/maintenance/userOptions.inc index 51da80d..f198167 100644 --- a/maintenance/userOptions.inc +++ b/maintenance/userOptions.inc @@ -49,7 +49,6 @@ } } - /** * This is used to check options. Only needed on construction * @@ -178,7 +177,6 @@ print "\n"; } } - /** Change our users options */ private function CHANGER() { diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 0370e05..142cb8d 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -169,7 +169,6 @@ $lines[] = $this->getSkin()->getLanguage()->pipeList( array_filter( $element ) ); - // Second row. Privileged actions. $element = array(); @@ -182,7 +181,6 @@ $element[] = $this->processBottomLink( 'move', $content_nav['actions']['move'], 'movethispage' ); $lines[] = $this->getSkin()->getLanguage()->pipeList( array_filter( $element ) ); - // Third row. Language links. $lines[] = $this->otherLanguages(); @@ -467,7 +465,6 @@ $bar = $this->sidebarAdditions( $bar ); } - // Fill out special sidebar items with content $orig_bar = $bar; $bar = array(); @@ -480,7 +477,6 @@ $bar[$heading] = $data; } } - // Output the sidebar // CologneBlue uses custom messages for some portlets, but we should keep the ids for consistency diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 6d66cac..f7fb0d8 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -321,5 +321,3 @@ <?php } } // end of class - - diff --git a/tests/phpunit/MediaWikiPHPUnitCommand.php b/tests/phpunit/MediaWikiPHPUnitCommand.php index 042956a..cc49fde 100644 --- a/tests/phpunit/MediaWikiPHPUnitCommand.php +++ b/tests/phpunit/MediaWikiPHPUnitCommand.php @@ -100,16 +100,13 @@ print <<<EOT ParserTest-specific options: - --regex="<regex>" Only run parser tests that match the given regex --file="<filename>" File describing parser tests --keep-uploads Re-use the same upload directory for each test, don't delete it - Database options: --use-normal-tables Use normal DB tables. --reuse-db Init DB only if tables are missing and keep after finish. - Debugging options: --debug-tests Log testing activity to the PHPUnitCommand log channel. diff --git a/tests/phpunit/includes/EditPageTest.php b/tests/phpunit/includes/EditPageTest.php index 7d2b04f..0dee6b0 100644 --- a/tests/phpunit/includes/EditPageTest.php +++ b/tests/phpunit/includes/EditPageTest.php @@ -202,7 +202,6 @@ "expected article not being created if empty" ); - $this->assertEdit( 'MediaWiki:January', null, diff --git a/tests/phpunit/includes/ExceptionTest.php b/tests/phpunit/includes/ExceptionTest.php index 63fff6e..e2a3711 100644 --- a/tests/phpunit/includes/ExceptionTest.php +++ b/tests/phpunit/includes/ExceptionTest.php @@ -38,7 +38,6 @@ ); } - /** * Lame JSON schema validation. * diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index 868090e..df633b4 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -141,7 +141,6 @@ $this->assertEquals( $result, wfArrayToCgi( $array ) ); } - /** * @covers ::wfArrayToCgi */ diff --git a/tests/phpunit/includes/PathRouterTest.php b/tests/phpunit/includes/PathRouterTest.php index 8fea8cc..e60dc54 100644 --- a/tests/phpunit/includes/PathRouterTest.php +++ b/tests/phpunit/includes/PathRouterTest.php @@ -240,7 +240,6 @@ $this->assertEquals( $matches, array( 'title' => "Lorem_ipsum_dolor_sit_amet,_consectetur_adipisicing_elit,_sed_do_eiusmod_tempor_incididunt_ut_labore_et_dolore_magna_aliqua._Ut_enim_ad_minim_veniam,_quis_nostrud_exercitation_ullamco_laboris_nisi_ut_aliquip_ex_ea_commodo_consequat._Duis_aute_irure_dolor_in_reprehenderit_in_voluptate_velit_esse_cillum_dolore_eu_fugiat_nulla_pariatur._Excepteur_sint_occaecat_cupidatat_non_proident,_sunt_in_culpa_qui_officia_deserunt_mollit_anim_id_est_laborum." ) ); } - /** * Ensure that the php passed site of parameter values are not urldecoded */ diff --git a/tests/phpunit/includes/RevisionStorageTest.php b/tests/phpunit/includes/RevisionStorageTest.php index e17c7b0..90ef553 100644 --- a/tests/phpunit/includes/RevisionStorageTest.php +++ b/tests/phpunit/includes/RevisionStorageTest.php @@ -170,7 +170,6 @@ $this->assertRevEquals( $orig, $rev ); } - /** * @covers Revision::newFromArchiveRow */ diff --git a/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php b/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php index 4e83e35..f830e36 100644 --- a/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php +++ b/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php @@ -57,7 +57,6 @@ } } - /** * @covers Revision::getContentFormat */ diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index b5819ff..fc23919 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -325,7 +325,6 @@ $this->assertEquals( $expectedText, $rev->getRawText( $audience ) ); } - public function dataGetSize() { return array( array( "hello world.", CONTENT_MODEL_WIKITEXT, 12 ), @@ -427,7 +426,6 @@ $content2->setText( "bla bla" ); $this->assertEquals( "bar", $content->getText() ); // clones should be independent } - /** * Tests whether $rev->getContent() returns the same object repeatedly if appropriate. diff --git a/tests/phpunit/includes/StatusTest.php b/tests/phpunit/includes/StatusTest.php index 08a5495..376009d 100644 --- a/tests/phpunit/includes/StatusTest.php +++ b/tests/phpunit/includes/StatusTest.php @@ -228,7 +228,7 @@ */ public function testCleanParams( $cleanCallback, $params, $expected ) { $method = new ReflectionMethod( 'Status', 'cleanParams' ); - $method->setAccessible(TRUE); + $method->setAccessible( true ); $status = new Status(); $status->cleanCallback = $cleanCallback; diff --git a/tests/phpunit/includes/WikiPageTest.php b/tests/phpunit/includes/WikiPageTest.php index 1258eb1..796adf3 100644 --- a/tests/phpunit/includes/WikiPageTest.php +++ b/tests/phpunit/includes/WikiPageTest.php @@ -576,7 +576,6 @@ ); } - /** * @dataProvider provideIsCountable * @covers WikiPage::isCountable @@ -677,7 +676,6 @@ == foo == more stuff "; - public function dataReplaceSection() { //NOTE: assume the Help namespace to contain wikitext diff --git a/tests/phpunit/includes/api/ApiUploadTest.php b/tests/phpunit/includes/api/ApiUploadTest.php index 1540af5..b089894 100644 --- a/tests/phpunit/includes/api/ApiUploadTest.php +++ b/tests/phpunit/includes/api/ApiUploadTest.php @@ -95,7 +95,6 @@ $this->assertTrue( $exception, "Got exception" ); } - /** * @depends testLogin */ @@ -147,7 +146,6 @@ unlink( $filePath ); } - /** * @depends testLogin */ @@ -184,7 +182,6 @@ $this->deleteFileByFilename( $fileName ); unlink( $filePath ); } - /** * @depends testLogin @@ -256,7 +253,6 @@ unlink( $filePaths[0] ); unlink( $filePaths[1] ); } - /** * @depends testLogin diff --git a/tests/phpunit/includes/api/RandomImageGenerator.php b/tests/phpunit/includes/api/RandomImageGenerator.php index 59756b2..13b751b 100644 --- a/tests/phpunit/includes/api/RandomImageGenerator.php +++ b/tests/phpunit/includes/api/RandomImageGenerator.php @@ -66,7 +66,6 @@ ) ); - public function __construct( $options = array() ) { foreach ( array( 'dictionaryFile', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'shapesToDraw' ) as $property ) { if ( isset( $options[$property] ) ) { @@ -111,7 +110,6 @@ return $filenames; } - /** * Figure out how we write images. This is a factor of both format and the local system @@ -158,7 +156,6 @@ return $filenames; } - /** * Generate data representing an image of random size (within limits), @@ -354,7 +351,6 @@ 'y' => $x * $matrix[1][0] + $y * $matrix[1][1] ); } - /** * Based on an image specification, write such an image to disk, using the command line ImageMagick program ('convert'). diff --git a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php index 58f2014..16dac94 100644 --- a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php +++ b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php @@ -68,7 +68,6 @@ $this->assertEquals( $expected, $quoted ); } - /** * Feeds testAddIdentifierQuotes * diff --git a/tests/phpunit/includes/debug/MWDebugTest.php b/tests/phpunit/includes/debug/MWDebugTest.php index df73000..91399be 100644 --- a/tests/phpunit/includes/debug/MWDebugTest.php +++ b/tests/phpunit/includes/debug/MWDebugTest.php @@ -2,7 +2,6 @@ class MWDebugTest extends MediaWikiTestCase { - protected function setUp() { parent::setUp(); // Make sure MWDebug class is enabled diff --git a/tests/phpunit/includes/media/ExifRotationTest.php b/tests/phpunit/includes/media/ExifRotationTest.php index 64276d9..f4f4154 100644 --- a/tests/phpunit/includes/media/ExifRotationTest.php +++ b/tests/phpunit/includes/media/ExifRotationTest.php @@ -210,7 +210,6 @@ ); } - const TEST_WIDTH = 100; const TEST_HEIGHT = 200; diff --git a/tests/phpunit/includes/media/ExifTest.php b/tests/phpunit/includes/media/ExifTest.php index 4cd2e8e..667c078 100644 --- a/tests/phpunit/includes/media/ExifTest.php +++ b/tests/phpunit/includes/media/ExifTest.php @@ -16,8 +16,6 @@ $this->mediaPath = __DIR__ . '/../../data/media/'; - - $this->setMwGlobals( 'wgShowEXIF', true ); } diff --git a/tests/phpunit/includes/media/JpegMetadataExtractorTest.php b/tests/phpunit/includes/media/JpegMetadataExtractorTest.php index 6d1d681..7ffde3b 100644 --- a/tests/phpunit/includes/media/JpegMetadataExtractorTest.php +++ b/tests/phpunit/includes/media/JpegMetadataExtractorTest.php @@ -80,7 +80,6 @@ $this->assertEquals( $expected, $res['XMP'] ); } - public function testIPTCHashComparisionNoHash() { $segments = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-xmp-psir.jpg' ); $res = JpegMetadataExtractor::doPSIR( $segments['PSIR'][0] ); diff --git a/tests/phpunit/includes/media/JpegTest.php b/tests/phpunit/includes/media/JpegTest.php index 5157228..bff64bb 100644 --- a/tests/phpunit/includes/media/JpegTest.php +++ b/tests/phpunit/includes/media/JpegTest.php @@ -14,7 +14,6 @@ $this->filePath = __DIR__ . '/../../data/media/'; - $this->setMwGlobals( 'wgShowEXIF', true ); $this->backend = new FSFileBackend( array( diff --git a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php index 33a03a2..84deb1b 100644 --- a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php +++ b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php @@ -121,7 +121,6 @@ $this->assertEquals( 1, $meta['bitDepth'] ); } - public function testPngIndexColour() { $meta = PNGMetadataExtractor::getMetadata( $this->filePath . 'Png-native-test.png' ); diff --git a/tests/phpunit/includes/upload/UploadBaseTest.php b/tests/phpunit/includes/upload/UploadBaseTest.php index 982b46b..4f17601 100644 --- a/tests/phpunit/includes/upload/UploadBaseTest.php +++ b/tests/phpunit/includes/upload/UploadBaseTest.php @@ -26,7 +26,6 @@ parent::tearDown(); } - /** * First checks the return code * of UploadBase::getTitle() and then the actual returned title diff --git a/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php b/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php index f0203d4..34ffb53 100644 --- a/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php +++ b/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php @@ -67,7 +67,6 @@ 'Wrong CD start disk error' ); } - public function testCentralDirectoryGap() { $this->readZipAssertError( 'cd-gap.zip', 'zip-bad', 'CD gap error' ); diff --git a/tests/phpunit/languages/LanguageSrTest.php b/tests/phpunit/languages/LanguageSrTest.php index ab4d4ab..f551248 100644 --- a/tests/phpunit/languages/LanguageSrTest.php +++ b/tests/phpunit/languages/LanguageSrTest.php @@ -225,7 +225,6 @@ $this->assertConverted( $text, 'sr-ec', $msg ); } - /** Wrapper for converter::convertTo() method*/ protected function convertTo( $text, $variant ) { return $this->getLang() diff --git a/tests/phpunit/languages/LanguageTest.php b/tests/phpunit/languages/LanguageTest.php index aa09def..f1babf5 100644 --- a/tests/phpunit/languages/LanguageTest.php +++ b/tests/phpunit/languages/LanguageTest.php @@ -1134,7 +1134,6 @@ ); } - /** * @dataProvider provideFormatDuration * @covers Language::formatDuration diff --git a/tests/phpunit/languages/LanguageUzTest.php b/tests/phpunit/languages/LanguageUzTest.php index 13f57c1..8cd3a6a 100644 --- a/tests/phpunit/languages/LanguageUzTest.php +++ b/tests/phpunit/languages/LanguageUzTest.php @@ -105,7 +105,6 @@ $this->assertConverted( $text, 'uz-cyrl', $msg ); } - /** Wrapper for converter::convertTo() method*/ protected function convertTo( $text, $variant ) { return $this->getLang()->mConverter->convertTo( $text, $variant ); diff --git a/tests/phpunit/maintenance/DumpTestCase.php b/tests/phpunit/maintenance/DumpTestCase.php index 83d8c71..6950fa3 100644 --- a/tests/phpunit/maintenance/DumpTestCase.php +++ b/tests/phpunit/maintenance/DumpTestCase.php @@ -48,7 +48,6 @@ throw new MWException( "Could not determine revision id (" . $status->getWikiText() . ")" ); } - /** * gunzips the given file and stores the result in the original file name * @@ -109,7 +108,6 @@ $this->assertRegExp( "/$timestamp_re: .* \(ID [0-9]+\) [0-9]* pages .*, [0-9]* revs .*, ETA/", $line ); } } - /** * Step the current XML reader until node end of given name is found. @@ -229,7 +227,6 @@ $this->assertTrue( $this->xml->read(), "Skipping past end tag" ); } } - /** * Asserts that the xml reader is at an element of given tag that contains a given text, diff --git a/tests/phpunit/maintenance/MaintenanceTest.php b/tests/phpunit/maintenance/MaintenanceTest.php index 83d7701..2a5bd5f 100644 --- a/tests/phpunit/maintenance/MaintenanceTest.php +++ b/tests/phpunit/maintenance/MaintenanceTest.php @@ -111,7 +111,6 @@ $this->testCase = $testCase; } - // --- Making protected functions visible for test public function output( $out, $channel = null ) { @@ -121,7 +120,6 @@ // receive at runtime. return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() ); } - // --- Requirements for getting instance of abstract class @@ -135,14 +133,12 @@ */ class MaintenanceTest extends MediaWikiTestCase { - /** * The main Maintenance instance that is used for testing. * * @var MaintenanceFixup */ private $m; - protected function setUp() { parent::setUp(); @@ -156,7 +152,6 @@ } parent::tearDown(); } - /** * asserts the output before and after simulating shutdown @@ -181,7 +176,6 @@ $postShutdownOutput = $preShutdownOutput . ( $expectNLAppending ? "\n" : "" ); $this->expectOutputString( $postShutdownOutput ); } - // Although the following tests do not seem to be too consistent (compare for // example the newlines within the test.*StringString tests, or the diff --git a/tests/phpunit/maintenance/backupPrefetchTest.php b/tests/phpunit/maintenance/backupPrefetchTest.php index 0f36bc4..adf026c 100644 --- a/tests/phpunit/maintenance/backupPrefetchTest.php +++ b/tests/phpunit/maintenance/backupPrefetchTest.php @@ -137,7 +137,6 @@ $this->assertPrefetchEquals( "BackupDumperTestP2Text1", 2, 2 ); } - /** * Constructs a temporary file that can be used for prefetching * diff --git a/tests/phpunit/maintenance/backupTextPassTest.php b/tests/phpunit/maintenance/backupTextPassTest.php index 15a928e..8a297b1 100644 --- a/tests/phpunit/maintenance/backupTextPassTest.php +++ b/tests/phpunit/maintenance/backupTextPassTest.php @@ -418,7 +418,6 @@ $this->checkpointHelper( "gzip" ); } - /** * Creates a stub file that is used for testing the text pass of dumps * diff --git a/tests/phpunit/maintenance/backup_LogTest.php b/tests/phpunit/maintenance/backup_LogTest.php index 438281d..5640b8d 100644 --- a/tests/phpunit/maintenance/backup_LogTest.php +++ b/tests/phpunit/maintenance/backup_LogTest.php @@ -8,7 +8,6 @@ */ class BackupDumperLoggerTest extends DumpTestCase { - // We'll add several log entries and users for this test. The following // variables hold the corresponding ids. private $userId1, $userId2; @@ -84,7 +83,6 @@ $this->exceptionFromAddDBData = $e; } } - /** * asserts that the xml reader is at the beginning of a log entry and skips over diff --git a/tests/phpunit/maintenance/backup_PageTest.php b/tests/phpunit/maintenance/backup_PageTest.php index c6094d9..6963601 100644 --- a/tests/phpunit/maintenance/backup_PageTest.php +++ b/tests/phpunit/maintenance/backup_PageTest.php @@ -272,7 +272,6 @@ $this->assertDumpEnd(); } - function testXmlDumpsBackupUseCase() { // xmldumps-backup typically performs a single dump that that writes // out three files diff --git a/tests/phpunit/maintenance/fetchTextTest.php b/tests/phpunit/maintenance/fetchTextTest.php index 42792d5..dd80840 100644 --- a/tests/phpunit/maintenance/fetchTextTest.php +++ b/tests/phpunit/maintenance/fetchTextTest.php @@ -25,7 +25,6 @@ */ private $mockInvocations = array( 'getStdin' => 0 ); - /** * Data for the fake stdin * @@ -82,7 +81,6 @@ private $textId4; private $textId5; - /** * @var Exception|null As the current MediaWikiTestCase::run is not * robust enough to recover from thrown exceptions directly, we cannot @@ -119,7 +117,6 @@ throw new MWException( "Could not determine text id" ); } - function addDBData() { $this->tablesUsed[] = 'page'; $this->tablesUsed[] = 'revision'; @@ -145,7 +142,6 @@ } } - protected function setUp() { parent::setUp(); @@ -156,7 +152,6 @@ $this->fetchText = new SemiMockedFetchText(); } - /** * Helper to relate FetchText's input and output @@ -169,7 +164,6 @@ "getStdin invocation counter" ); $this->expectOutputString( $expectedOutput ); } - // Instead of the following functions, a data provider would be great. // However, as data providers are evaluated /before/ addDBData, a data diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php index a385320..fc06ee4 100644 --- a/tests/phpunit/skins/SideBarTest.php +++ b/tests/phpunit/skins/SideBarTest.php @@ -144,7 +144,6 @@ ); } - #### Attributes for external links ########################## private function getAttribs() { # Sidebar text we will use everytime diff --git a/tests/phpunit/structure/ResourcesTest.php b/tests/phpunit/structure/ResourcesTest.php index 746cb70..cce1b7e 100644 --- a/tests/phpunit/structure/ResourcesTest.php +++ b/tests/phpunit/structure/ResourcesTest.php @@ -193,7 +193,6 @@ } } - return $cases; } } diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index 88e5885..f4433f4 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -527,7 +527,6 @@ return false; } - /** * Clear section name and its data */ diff --git a/thumb.php b/thumb.php index 35ab9f2..ad5239e 100644 --- a/thumb.php +++ b/thumb.php @@ -180,7 +180,6 @@ return; } - // Check the source file storage path if ( !$img->exists() ) { $redirectedLocation = false; @@ -246,7 +245,6 @@ unset( $params['r'] ); // ignore 'r' because we unconditionally pass File::RENDER unset( $params['f'] ); // We're done with 'f' parameter. - // Get the normalized thumbnail name from the parameters... try { -- To view, visit https://gerrit.wikimedia.org/r/96509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits