Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/191014
Change subject: Private by default in TermSqlIndex
......................................................................
Private by default in TermSqlIndex
This class does not have subclasses. Protected is meaningless and can
be replaced with private. Should be the default anyway.
Change-Id: I97c961cb3ec032f7e41d38f2b192432d8750172c
---
M lib/includes/store/sql/TermSqlIndex.php
1 file changed, 8 insertions(+), 20 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/14/191014/1
diff --git a/lib/includes/store/sql/TermSqlIndex.php
b/lib/includes/store/sql/TermSqlIndex.php
index f586785..12fe7f3 100644
--- a/lib/includes/store/sql/TermSqlIndex.php
+++ b/lib/includes/store/sql/TermSqlIndex.php
@@ -30,30 +30,26 @@
class TermSqlIndex extends DBAccessBase implements TermIndex,
LabelConflictFinder {
/**
- * @since 0.1
- *
* @var string
*/
- protected $tableName;
+ private $tableName;
/**
* @var StringNormalizer
*/
- protected $stringNormalizer;
+ private $stringNormalizer;
/**
* @var int
*/
- protected $maxConflicts = 10;
+ private $maxConflicts = 10;
/**
* Maps table fields to TermIndex interface field names.
*
- * @since 0.2
- *
* @var array
*/
- protected $termFieldMap = array(
+ private $termFieldMap = array(
'term_entity_type' => 'entityType',
'term_type' => 'termType',
'term_language' => 'termLanguage',
@@ -309,13 +305,11 @@
*
* TODO Should be moved to its own object and be added via dependency
injection
*
- * @since 0.4
- *
* @param EntityDocument $entity
*
* @return float weight
*/
- protected function getWeight( EntityDocument $entity ) {
+ private function getWeight( EntityDocument $entity ) {
// FIXME: OCP violation. No support for new types of entities
can be registered
if ( $entity instanceof Item ) {
@@ -328,13 +322,11 @@
/**
* Returns an array with the database table fields for the provided
term.
*
- * @since 0.2
- *
* @param Term $term
*
* @return array
*/
- protected function getTermFields( Term $term ) {
+ private function getTermFields( Term $term ) {
$fields = array(
'term_language' => $term->getLanguage(),
'term_type' => $term->getType(),
@@ -691,8 +683,6 @@
}
/**
- * @since 0.5
- *
* @param DatabaseBase $db
* @param Term $term
* @param string|null $termType
@@ -701,7 +691,7 @@
*
* @return array
*/
- protected function termMatchConditions(
+ private function termMatchConditions(
DatabaseBase $db,
Term $term,
$termType,
@@ -776,13 +766,11 @@
* Modifies the provided terms to use the field names expected by the
interface
* rather then the table field names. Also ensures the values are of
the correct type.
*
- * @since 0.2
- *
* @param Iterator|array $obtainedTerms PHP fails for not having a
common iterator/array thing :<0
*
* @return Term[]
*/
- protected function buildTermResult( $obtainedTerms ) {
+ private function buildTermResult( $obtainedTerms ) {
wfProfileIn( __METHOD__ );
$matchingTerms = array();
--
To view, visit https://gerrit.wikimedia.org/r/191014
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97c961cb3ec032f7e41d38f2b192432d8750172c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits