Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator Class Reference
+ Inheritance diagram for Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator:
+ Collaboration diagram for Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator:

Public Member Functions

 validateEntity (EntityDocument $entity)
 
 validateLabelAndDescription (TermList $labels, TermList $descriptions, array $languageCodes=null)
 

Private Member Functions

 detectLabelDescriptionEqual (array $labels, array $descriptions)
 Detects when labels and descriptions are equal. More...
 

Detailed Description

Author
Greta Doci

Member Function Documentation

◆ detectLabelDescriptionEqual()

Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator::detectLabelDescriptionEqual ( array  $labels,
array  $descriptions 
)
private

Detects when labels and descriptions are equal.

A conflict arises when an entity has the same combination of label and non-empty description for a given language as is present in the $label and $description parameters.

Parameters
string[]$labelsAn associative array of labels, with language codes as the keys.
string[]$descriptionsAn associative array of descriptions, with language codes as the keys.
Returns
Result

◆ validateEntity()

Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator::validateEntity ( EntityDocument  $entity)
See also
EntityValidator::validate()
Parameters
EntityDocument$entity
Returns
Result PhanUndeclaredMethod Phan is confused by intersection types

Implements Wikibase\Repo\Validators\EntityValidator.

◆ validateLabelAndDescription()

Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator::validateLabelAndDescription ( TermList  $labels,
TermList  $descriptions,
array  $languageCodes = null 
)
Parameters
TermList$labels
TermList$descriptions
string[] | null$languageCodes
Returns
Result

The documentation for this class was generated from the following file: