Ejegg has submitted this change and it was merged. Change subject: Use IDatabase in function signatures ......................................................................
Use IDatabase in function signatures See Aaron Schulz's comment on Id4e46b65355. Change-Id: Ib2c96195b360b1cbfb0c18ebe66f04163efe0f0c --- M includes/Banner.php 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Banner.php b/includes/Banner.php index e8c981f..031e1c4 100644 --- a/includes/Banner.php +++ b/includes/Banner.php @@ -362,18 +362,18 @@ /** * Helper function to initializeDbForNewBanner() * - * @param DatabaseBase $db + * @param IDatabase $db */ - protected function initializeDbBasicData( $db ) { + protected function initializeDbBasicData( IDatabase $db ) { $db->insert( 'cn_templates', array( 'tmp_name' => $this->name ), __METHOD__ ); $this->id = $db->insertId(); } /** * Helper function to saveBannerInternal() for saving basic banner metadata - * @param DatabaseBase $db + * @param IDatabase $db */ - protected function saveBasicData( $db ) { + protected function saveBasicData( IDatabase $db ) { if ( $this->dirtyFlags['basic'] ) { $db->update( 'cn_templates', array( @@ -482,9 +482,9 @@ /** * Helper function to saveBannerInternal() * - * @param DatabaseBase $db + * @param IDatabase $db */ - protected function saveDeviceTargetData( $db ) { + protected function saveDeviceTargetData( IDatabase $db ) { if ( $this->dirtyFlags['devices'] ) { // Remove all entries from the table for this banner $db->delete( 'cn_template_devices', array( 'tmp_id' => $this->getId() ), __METHOD__ ); @@ -586,9 +586,9 @@ } /** - * @param DatabaseBase $db + * @param IDatabase $db */ - protected function saveMixinData( $db ) { + protected function saveMixinData( IDatabase $db ) { if ( $this->dirtyFlags['mixins'] ) { $db->delete( 'cn_template_mixins', array( 'tmp_id' => $this->getId() ), @@ -971,9 +971,9 @@ * being saved. Intended to create all table rows required such that any * additional operation can be an UPDATE statement. * - * @param DatabaseBase $db + * @param IDatabase $db */ - protected function initializeDbForNewBanner( $db ) { + protected function initializeDbForNewBanner( IDatabase $db ) { $this->initializeDbBasicData( $db ); } @@ -987,11 +987,11 @@ * * Dirty flags are not globally reset until after this function is called. * - * @param DatabaseBase $db + * @param IDatabase $db * * @throws BannerExistenceException */ - protected function saveBannerInternal( $db ) { + protected function saveBannerInternal( IDatabase $db ) { $this->saveBasicData( $db ); $this->saveDeviceTargetData( $db ); $this->saveMixinData( $db ); -- To view, visit https://gerrit.wikimedia.org/r/312073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2c96195b360b1cbfb0c18ebe66f04163efe0f0c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com> Gerrit-Reviewer: Awight <awi...@wikimedia.org> Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org> Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org> Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits