Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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)
 
 validateFingerprint (TermList $labels, TermList $descriptions, EntityId $entityId, array $languageCodes=null)
 

Private Member Functions

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

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.

◆ validateFingerprint()

Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator::validateFingerprint ( TermList  $labels,
TermList  $descriptions,
EntityId  $entityId,
array  $languageCodes = null 
)
See also
FingerprintValidator::validateFingerprint()
Parameters
TermList$labels
TermList$descriptions
EntityId$entityId
string[] | null$languageCodes
Returns
Result

Implements Wikibase\Repo\Validators\FingerprintValidator.


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