@@ -123,7 +123,7 @@ |
||
123 | 123 | |
124 | 124 | /** |
125 | 125 | * @param Title[] $titles |
126 | - * @param int|null $continue |
|
126 | + * @param integer $continue |
|
127 | 127 | * |
128 | 128 | * @return array |
129 | 129 | */ |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | } |
559 | 559 | |
560 | 560 | /** |
561 | - * @return TermBuffer|AliasTermBuffer |
|
561 | + * @return null|TermBuffer |
|
562 | 562 | */ |
563 | 563 | public function getTermBuffer() { |
564 | 564 | if ( !$this->termBuffer ) { |
@@ -1675,6 +1675,9 @@ discard block |
||
1675 | 1675 | return $this->propertyLabelResolver; |
1676 | 1676 | } |
1677 | 1677 | |
1678 | + /** |
|
1679 | + * @param string $cacheKey |
|
1680 | + */ |
|
1678 | 1681 | private function getCachedDatabasePropertyLabelResolver( |
1679 | 1682 | $languageCode, |
1680 | 1683 | $cache, |
@@ -1709,6 +1712,9 @@ discard block |
||
1709 | 1712 | return $lbFactory->getMainLB( $this->getDatabaseDomainForPropertySource() ); |
1710 | 1713 | } |
1711 | 1714 | |
1715 | + /** |
|
1716 | + * @return boolean|string |
|
1717 | + */ |
|
1712 | 1718 | private function getDatabaseDomainForPropertySource() { |
1713 | 1719 | $dataAccessSettings = $this->getDataAccessSettings(); |
1714 | 1720 | $propertySource = $this->getPropertySource( $dataAccessSettings ); |
@@ -89,7 +89,7 @@ |
||
89 | 89 | /** |
90 | 90 | * @param User $user the user performing the edit |
91 | 91 | * @param EntityId|null $entityId the id of the entity to edit |
92 | - * @param bool|int|null $baseRevId the base revision ID for conflict checking. |
|
92 | + * @param integer $baseRevId the base revision ID for conflict checking. |
|
93 | 93 | * Use 0 to indicate that the current revision should be used as the base revision, |
94 | 94 | * effectively disabling conflict detections. true and false will be accepted for |
95 | 95 | * backwards compatibility, but both will be treated like 0. Note that the behavior |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * @param string $termType |
125 | 125 | * @param string $languageCode |
126 | 126 | * |
127 | - * @return string|false|null |
|
127 | + * @return string|null |
|
128 | 128 | */ |
129 | 129 | public function getPrefetchedTerm( EntityId $entityId, $termType, $languageCode ) { |
130 | 130 | $termBuffer = $this->getTermBufferForRepository( $entityId->getRepositoryName() ); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * @param string $repository |
154 | 154 | * |
155 | - * @return TermBuffer|AliasTermBuffer |
|
155 | + * @return TermBuffer|null |
|
156 | 156 | */ |
157 | 157 | private function getTermBufferForRepository( $repository ) { |
158 | 158 | return $this->termBuffers[$repository] ?? null; |
@@ -17,9 +17,9 @@ |
||
17 | 17 | private $buffer; |
18 | 18 | |
19 | 19 | /** |
20 | - * @param array $entityIds |
|
21 | - * @param array|null $termTypes if null, defaults to labels and descriptions only |
|
22 | - * @param array|null $languageCodes if null, defaults to de and en |
|
20 | + * @param \Wikibase\DataModel\Entity\ItemId[] $entityIds |
|
21 | + * @param string[] $termTypes if null, defaults to labels and descriptions only |
|
22 | + * @param string[] $languageCodes if null, defaults to de and en |
|
23 | 23 | */ |
24 | 24 | public function prefetchTerms( array $entityIds, array $termTypes, array $languageCodes ) { |
25 | 25 | if ( $termTypes === null ) { |
@@ -100,8 +100,8 @@ |
||
100 | 100 | * Loads a set of terms into the buffer. |
101 | 101 | * The source from which to fetch would typically be supplied to the buffer's constructor. |
102 | 102 | * @param EntityId[] $entityIds |
103 | - * @param string[]|null $termTypes |
|
104 | - * @param string[]|null $languageCodes |
|
103 | + * @param string[] $termTypes |
|
104 | + * @param string[] $languageCodes |
|
105 | 105 | * |
106 | 106 | * @throws StorageException |
107 | 107 | */ |
@@ -68,8 +68,8 @@ |
||
68 | 68 | * The source from which to fetch would typically be supplied to the buffer's constructor. |
69 | 69 | * |
70 | 70 | * @param EntityId[] $entityIds |
71 | - * @param string[]|null $termTypes The desired term types; null means all. |
|
72 | - * @param string[]|null $languageCodes The desired languages; null means all. |
|
71 | + * @param string[] $termTypes The desired term types; null means all. |
|
72 | + * @param string[] $languageCodes The desired languages; null means all. |
|
73 | 73 | */ |
74 | 74 | public function prefetchTerms( array $entityIds, array $termTypes, array $languageCodes ) { |
75 | 75 | if ( count( $entityIds ) > TermLookupSearcher::MAX_TITLES_PER_QUERY ) { |
@@ -59,8 +59,8 @@ |
||
59 | 59 | * Loads a set of terms into the buffer. |
60 | 60 | * The source from which to fetch would typically be supplied to the buffer's constructor. |
61 | 61 | * @param EntityId[] $entityIds |
62 | - * @param string[]|null $termTypes The desired term types; null means all. |
|
63 | - * @param string[]|null $languageCodes The desired languages; null means all. |
|
62 | + * @param string[] $termTypes The desired term types; null means all. |
|
63 | + * @param string[] $languageCodes The desired languages; null means all. |
|
64 | 64 | */ |
65 | 65 | public function prefetchTerms( array $entityIds, array $termTypes, array $languageCodes ) { |
66 | 66 | Assert::parameterElementType( ItemId::class, $entityIds, '$entityIds' ); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @param EntityId $entityId |
85 | 85 | * |
86 | 86 | * @throws LabelDescriptionLookupException |
87 | - * @return TermFallback|null |
|
87 | + * @return null|\Wikibase\DataModel\Term\Term |
|
88 | 88 | */ |
89 | 89 | public function getDescription( EntityId $entityId ) { |
90 | 90 | $languageCodes = $this->languageFallbackChain->getFetchLanguageCodes(); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param EntityId $entityId |
100 | 100 | * |
101 | 101 | * @throws LabelDescriptionLookupException |
102 | - * @return TermFallback|null |
|
102 | + * @return null|\Wikibase\DataModel\Term\Term |
|
103 | 103 | */ |
104 | 104 | public function getLabel( EntityId $entityId ) { |
105 | 105 | $languageCodes = $this->languageFallbackChain->getFetchLanguageCodes(); |
@@ -109,6 +109,9 @@ discard block |
||
109 | 109 | return $label; |
110 | 110 | } |
111 | 111 | |
112 | + /** |
|
113 | + * @param string $languageCode |
|
114 | + */ |
|
112 | 115 | private function getTerm( EntityId $entityId, $languageCode, $termName = self::LABEL ) { |
113 | 116 | $resolutionResult = $this->redirectResolvingRevisionLookup->lookupLatestRevisionResolvingRedirect( $entityId ); |
114 | 117 | if ( $resolutionResult === null ) { |