Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/94684
Change subject: Some cleanup in TermSqlIndex ...................................................................... Some cleanup in TermSqlIndex Change-Id: I783cec335bba5eac0f47cde6fc621e70bc610e09 --- M lib/includes/store/sql/TermSqlIndex.php 1 file changed, 15 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/84/94684/1 diff --git a/lib/includes/store/sql/TermSqlIndex.php b/lib/includes/store/sql/TermSqlIndex.php index 6a73a23..fad3c07 100644 --- a/lib/includes/store/sql/TermSqlIndex.php +++ b/lib/includes/store/sql/TermSqlIndex.php @@ -1,38 +1,26 @@ <?php namespace Wikibase; -use Iterator, DatabaseBase; + +use DatabaseBase; +use DBAccessBase; +use Iterator; +use MWException; +use ResultWrapper; use Wikibase\DataModel\Entity\BasicEntityIdParser; /** * Term lookup cache. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * * @since 0.1 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > * @author Jens Ohlig < [email protected] > * @author Daniel Kinzler + * @author Denny */ -class TermSqlIndex extends \DBAccessBase implements TermIndex { +class TermSqlIndex extends DBAccessBase implements TermIndex { /** * @since 0.1 @@ -348,7 +336,7 @@ $numericIds = array(); foreach ( $ids as $id ) { if ( $id->getEntityType() !== $entityType ) { - throw new \MWException( "ID " . $id->getPrefixedId() + throw new MWException( "ID " . $id->getPrefixedId() . " does not refer to an entity of type $entityType." ); } @@ -385,7 +373,7 @@ * * @since 0.1 * - * @return \DatabaseBase + * @return DatabaseBase */ public function getReadDb() { return $this->getConnection( DB_SLAVE ); @@ -396,7 +384,7 @@ * * @since 0.4 * - * @return \DatabaseBase + * @return DatabaseBase */ public function getWriteDb() { return $this->getConnection( DB_MASTER ); @@ -755,7 +743,7 @@ * * @since 0.2 * - * @param \Iterator|array $obtainedTerms PHP fails for not having a common iterator/array thing :<0 + * @param Iterator|array $obtainedTerms PHP fails for not having a common iterator/array thing :<0 * * @return array */ @@ -890,12 +878,12 @@ * * @since 0.2 * - * @param \ResultWrapper $obtainedTerms + * @param ResultWrapper $obtainedTerms * @param integer $joinCount * * @return array */ - protected function getNormalizedJoinResult( \ResultWrapper $obtainedTerms, $joinCount ) { + protected function getNormalizedJoinResult( ResultWrapper $obtainedTerms, $joinCount ) { $resultTerms = array(); foreach ( $obtainedTerms as $obtainedTerm ) { @@ -979,6 +967,6 @@ * @return mixed */ public function supportsWeight() { - return !\Wikibase\Settings::get( 'withoutTermWeight' ); + return !Settings::get( 'withoutTermWeight' ); } } -- To view, visit https://gerrit.wikimedia.org/r/94684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I783cec335bba5eac0f47cde6fc621e70bc610e09 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
