Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368962 )
Change subject: build: Bump mediawiki-codingstandards to 0.10.1 ...................................................................... build: Bump mediawiki-codingstandards to 0.10.1 Change-Id: Ifbfe9c81c6acfd0d7322d77e47a29a920fff254e --- M AdManager.class.php M AdManager.hooks.php M AdManagerZones.class.php M composer.json M specials/SpecialAdManagerZones.php 5 files changed, 21 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AdManager refs/changes/62/368962/1 diff --git a/AdManager.class.php b/AdManager.class.php index b90682e..ec9e457 100644 --- a/AdManager.class.php +++ b/AdManager.class.php @@ -27,7 +27,7 @@ /** * Check if the correct table exists * - * @return boolean + * @return bool */ public static function tableExists() { $dbr = self::getReadDbConnection(); @@ -114,7 +114,7 @@ * Insert an array of ads into the db * * @param array $allAds - * @return boolean + * @return bool */ protected function addAllAds( $allAds = null ) { if ( !$allAds ) { @@ -137,7 +137,7 @@ * * @param string $type either Page or Category * @param array $someAds - * @return boolean + * @return bool */ protected function addSomeAds( $type, $someAds ) { foreach ( $someAds as $adZoneID => $ads ) { @@ -206,18 +206,18 @@ * Get HTML for all ads that should be displayed for this page * * @param Title $title Title of the page - * @return boolean|array false on error or an array with HTML for each ad + * @return bool|array false on error or an array with HTML for each ad */ public static function getAdOutputFor( Title $title ) { - if ( !AdManager::tableExists() ) { + if ( !self::tableExists() ) { return false; } - $adManagerCode = AdManager::getAdManagerCode(); + $adManagerCode = self::getAdManagerCode(); if ( !isset( $adManagerCode ) ) { return false; // TODO: show error } - $thisPageAdZones = AdManager::getAdZonesFor( $title ); + $thisPageAdZones = self::getAdZonesFor( $title ); if ( empty( $thisPageAdZones ) ) { // No zone set for this page or its categories return []; } @@ -282,7 +282,7 @@ * @return array */ public static function getCategoryAdZonesFor( $title ) { - $fullTableName = AdManager::getTableName(); + $fullTableName = self::getTableName(); $dbr = self::getReadDbConnection(); $thisPageAdZones = []; // check if an ad zone was set for any of this page's categories diff --git a/AdManager.hooks.php b/AdManager.hooks.php index c6d715a..1544978 100644 --- a/AdManager.hooks.php +++ b/AdManager.hooks.php @@ -21,7 +21,7 @@ * @global string $wgAdManagerPlacement * @param Skin $skin * @param array $sidebar - * @return boolean + * @return bool */ public static function SkinBuildSidebar( $skin, &$sidebar ) { global $wgAdManagerPlacement; @@ -44,7 +44,7 @@ * @global string $wgAdManagerPlacement * @param OutputPage $out * @param Skin $skin - * @return boolean + * @return bool */ public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) { $out->addModules( 'ext.adManager' ); diff --git a/AdManagerZones.class.php b/AdManagerZones.class.php index b5d4331..6fc4e65 100644 --- a/AdManagerZones.class.php +++ b/AdManagerZones.class.php @@ -16,12 +16,12 @@ private $zonesToRemove = []; /** - * @var boolean $zonesAddedSuccessfully + * @var bool $zonesAddedSuccessfully */ private $zonesAddedSuccessfully; /** - * @var boolean $zonesRemovedSuccessfully + * @var bool $zonesRemovedSuccessfully */ private $zonesRemovedSuccessfully; @@ -79,7 +79,7 @@ * Check if the zone is valid * * @param string $zone - * @return boolean + * @return bool */ public static function isValidZone( $zone ) { if ( empty( $zone ) ) { @@ -95,7 +95,7 @@ * Validate single zone name and throw an error if invalid * * @param string $zone - * @return boolean + * @return bool * @throws ErrorPageError */ public static function validateZone( $zone ) { @@ -110,7 +110,7 @@ * Validate array of zones * * @param array $zones - * @return boolean + * @return bool */ public static function validateZones( $zones ) { foreach ( $zones as $zone ) { @@ -122,7 +122,7 @@ /** * Check if the correct table exists * - * @return boolean + * @return bool */ public static function tableExists() { $dbr = self::getReadDbConnection(); @@ -152,7 +152,7 @@ /** * Add new zones to db and remove the old zones * - * @return boolean Successful if added and removed successfully + * @return bool Successful if added and removed successfully */ public function execute() { $this->zonesAdded = $this->doAddZones(); @@ -164,7 +164,7 @@ /** * Insert an array of zones into the db * - * @return boolean + * @return bool */ protected function doAddZones() { $dbw = $this->getWriteDbConnection(); @@ -181,7 +181,7 @@ /** * Remove zones from the db * - * return Boolean True if all zones were removed + * return bool True if all zones were removed */ protected function doRemoveZones() { $successAll = true; diff --git a/composer.json b/composer.json index 1366381..55507be 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", - "mediawiki/mediawiki-codesniffer": "0.10.0", + "mediawiki/mediawiki-codesniffer": "0.10.1", "jakub-onderka/php-console-highlighter": "0.3.2" }, "scripts": { diff --git a/specials/SpecialAdManagerZones.php b/specials/SpecialAdManagerZones.php index d6bc5b9..bbc9d8f 100644 --- a/specials/SpecialAdManagerZones.php +++ b/specials/SpecialAdManagerZones.php @@ -111,7 +111,7 @@ * Validate a string of text containing zones * * @param string $zonesText Each zone must be delimited by \n - * @return boolean + * @return bool */ public static function validateZonesText( $zonesText ) { $zones = explode( "\n", $zonesText ); -- To view, visit https://gerrit.wikimedia.org/r/368962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbfe9c81c6acfd0d7322d77e47a29a920fff254e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AdManager Gerrit-Branch: master Gerrit-Owner: Jforrester <jforres...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits