[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: Type hint against IDatabase instead of Database
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/401723 ) Change subject: Type hint against IDatabase instead of Database .. Type hint against IDatabase instead of Database Change-Id: Ibb067ca33fd71464d48c0144470df3d082a97cbe --- M includes/ArticleStore.php M includes/Events/EventStore.php M includes/Store/CourseStore.php M includes/UPCUserCourseFinder.php M includes/pagers/RevisionPager.php M includes/rows/ORMRow.php M includes/tables/IORMTable.php M includes/tables/ORMTable.php 8 files changed, 36 insertions(+), 36 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ArticleStore.php b/includes/ArticleStore.php index f08a676..9d57eb8 100644 --- a/includes/ArticleStore.php +++ b/includes/ArticleStore.php @@ -3,7 +3,7 @@ namespace EducationProgram; use InvalidArgumentException; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * Store for EPArticle objects. @@ -84,7 +84,7 @@ * * @since 0.3 * -* @return Database +* @return IDatabase */ protected function getReadConnection() { return wfGetDB( $this->readConnectionId ); @@ -96,7 +96,7 @@ * * @since 0.3 * -* @return Database +* @return IDatabase */ protected function getWriteConnection() { return wfGetDB( DB_MASTER ); diff --git a/includes/Events/EventStore.php b/includes/Events/EventStore.php index 507031e..b1dd839 100644 --- a/includes/Events/EventStore.php +++ b/includes/Events/EventStore.php @@ -3,7 +3,7 @@ namespace EducationProgram\Events; use InvalidArgumentException; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * Service via which EducationProgram events can be saved and queried. @@ -66,7 +66,7 @@ /** * @since 0.3 * -* @return Database +* @return IDatabase */ private function getReadConnection() { return wfGetDB( $this->readConnectionId ); @@ -75,7 +75,7 @@ /** * @since 0.3 * -* @return Database +* @return IDatabase */ private function getWriteConnection() { return wfGetDB( DB_MASTER ); diff --git a/includes/Store/CourseStore.php b/includes/Store/CourseStore.php index 4e8d236..c934b1c 100644 --- a/includes/Store/CourseStore.php +++ b/includes/Store/CourseStore.php @@ -6,7 +6,7 @@ use EducationProgram\CourseNotFoundException; use EducationProgram\CourseTitleNotFoundException; use EducationProgram\Courses; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * This program is free software; you can redistribute it and/or modify @@ -40,11 +40,11 @@ private $tableName; /** -* @var Database +* @var IDatabase */ private $readDatabase; - public function __construct( $tableName, Database $readDatabase ) { + public function __construct( $tableName, IDatabase $readDatabase ) { $this->readDatabase = $readDatabase; $this->tableName = $tableName; } diff --git a/includes/UPCUserCourseFinder.php b/includes/UPCUserCourseFinder.php index f5e0cf8..2296869 100644 --- a/includes/UPCUserCourseFinder.php +++ b/includes/UPCUserCourseFinder.php @@ -2,7 +2,7 @@ namespace EducationProgram; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * Implementation of the UserCourseFinder interface that works by doing @@ -39,16 +39,16 @@ /** * @since 0.3 * -* @var Database +* @var IDatabase */ private $db; /** * @since 0.3 * -* @param Database $db +* @param IDatabase $db */ - public function __construct( Database $db ) { + public function __construct( IDatabase $db ) { $this->db = $db; } diff --git a/includes/pagers/RevisionPager.php b/includes/pagers/RevisionPager.php index de96c04..a0bcab0 100644 --- a/includes/pagers/RevisionPager.php +++ b/includes/pagers/RevisionPager.php @@ -173,8 +173,8 @@ * This function should be overridden to provide all parameters * needed for the main paged query. It returns an associative * array with the following elements: -* tables => Table(s) for passing to Database::select() -* fields => Field(s) for passing to Database::select(), may be * +* tables => Table(s) for passing to IDatabase::select() +* fields => Field(s) for passing to IDatabase::select(), may be * * conds => WHERE conditions * options => option array * join_conds => JOIN conditions diff --git a/includes/rows/ORMRow.php
[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: Type hint against IDatabase instead of Database
Thiemo Kreuz (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401723 ) Change subject: Type hint against IDatabase instead of Database .. Type hint against IDatabase instead of Database Change-Id: Ibb067ca33fd71464d48c0144470df3d082a97cbe --- M includes/ArticleStore.php M includes/Events/EventStore.php M includes/Store/CourseStore.php M includes/UPCUserCourseFinder.php M includes/pagers/RevisionPager.php M includes/rows/ORMRow.php M includes/tables/IORMTable.php M includes/tables/ORMTable.php 8 files changed, 36 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/23/401723/1 diff --git a/includes/ArticleStore.php b/includes/ArticleStore.php index f08a676..9d57eb8 100644 --- a/includes/ArticleStore.php +++ b/includes/ArticleStore.php @@ -3,7 +3,7 @@ namespace EducationProgram; use InvalidArgumentException; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * Store for EPArticle objects. @@ -84,7 +84,7 @@ * * @since 0.3 * -* @return Database +* @return IDatabase */ protected function getReadConnection() { return wfGetDB( $this->readConnectionId ); @@ -96,7 +96,7 @@ * * @since 0.3 * -* @return Database +* @return IDatabase */ protected function getWriteConnection() { return wfGetDB( DB_MASTER ); diff --git a/includes/Events/EventStore.php b/includes/Events/EventStore.php index 507031e..b1dd839 100644 --- a/includes/Events/EventStore.php +++ b/includes/Events/EventStore.php @@ -3,7 +3,7 @@ namespace EducationProgram\Events; use InvalidArgumentException; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * Service via which EducationProgram events can be saved and queried. @@ -66,7 +66,7 @@ /** * @since 0.3 * -* @return Database +* @return IDatabase */ private function getReadConnection() { return wfGetDB( $this->readConnectionId ); @@ -75,7 +75,7 @@ /** * @since 0.3 * -* @return Database +* @return IDatabase */ private function getWriteConnection() { return wfGetDB( DB_MASTER ); diff --git a/includes/Store/CourseStore.php b/includes/Store/CourseStore.php index 4e8d236..c934b1c 100644 --- a/includes/Store/CourseStore.php +++ b/includes/Store/CourseStore.php @@ -6,7 +6,7 @@ use EducationProgram\CourseNotFoundException; use EducationProgram\CourseTitleNotFoundException; use EducationProgram\Courses; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * This program is free software; you can redistribute it and/or modify @@ -40,11 +40,11 @@ private $tableName; /** -* @var Database +* @var IDatabase */ private $readDatabase; - public function __construct( $tableName, Database $readDatabase ) { + public function __construct( $tableName, IDatabase $readDatabase ) { $this->readDatabase = $readDatabase; $this->tableName = $tableName; } diff --git a/includes/UPCUserCourseFinder.php b/includes/UPCUserCourseFinder.php index f5e0cf8..2296869 100644 --- a/includes/UPCUserCourseFinder.php +++ b/includes/UPCUserCourseFinder.php @@ -2,7 +2,7 @@ namespace EducationProgram; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; /** * Implementation of the UserCourseFinder interface that works by doing @@ -39,16 +39,16 @@ /** * @since 0.3 * -* @var Database +* @var IDatabase */ private $db; /** * @since 0.3 * -* @param Database $db +* @param IDatabase $db */ - public function __construct( Database $db ) { + public function __construct( IDatabase $db ) { $this->db = $db; } diff --git a/includes/pagers/RevisionPager.php b/includes/pagers/RevisionPager.php index de96c04..a0bcab0 100644 --- a/includes/pagers/RevisionPager.php +++ b/includes/pagers/RevisionPager.php @@ -173,8 +173,8 @@ * This function should be overridden to provide all parameters * needed for the main paged query. It returns an associative * array with the following elements: -* tables => Table(s) for passing to Database::select() -* fields => Field(s) for passing to Database::select(), may be * +* tables => Table(s) for passing to IDatabase::select() +* fields => Field(s) for passing to IDatabase::select(), may be * * conds => WHERE conditions * options => option array * join_conds => JOIN conditions diff --git