@@ -559,12 +559,12 @@ |
||
559 | 559 | /** |
560 | 560 | * @see ContentHandler::getUndoContent |
561 | 561 | * |
562 | - * @param Revision|Content $latest The current text |
|
563 | - * @param Revision|Content $newer The revision to undo |
|
564 | - * @param Revision|Content $older Must be an earlier revision than $newer |
|
562 | + * @param EntityContent $latest The current text |
|
563 | + * @param EntityContent $newer The revision to undo |
|
564 | + * @param EntityContent $older Must be an earlier revision than $newer |
|
565 | 565 | * @param bool $undoIsLatest Set to true if $newer is from the current revision (since 1.32) |
566 | 566 | * |
567 | - * @return EntityContent|bool Content on success, false on failure |
|
567 | + * @return null|Content Content on success, false on failure |
|
568 | 568 | */ |
569 | 569 | public function getUndoContent( $latest, $newer, $older, $undoIsLatest = false ) { |
570 | 570 | $latestContent = ( $latest instanceof Revision ) ? $latest->getContent() : $latest; |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Html; |
8 | 8 | use PageImages\PageImages; |
9 | 9 | use Title; |
10 | - |
|
11 | 10 | use Wikibase\Client\RepoLinker; |
12 | 11 | use Wikibase\Client\WikibaseClient; |
13 | 12 | use Wikibase\DataModel\Entity\EntityDocument; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * @return RecentChangesFinder|MockObject |
|
90 | + * @return RecentChangesFinder |
|
91 | 91 | */ |
92 | 92 | private function getRCDupeDetectorMock() { |
93 | 93 | $rcDupeDetector = $this->getMockBuilder( RecentChangesFinder::class ) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param string $text |
118 | 118 | * @param int $id |
119 | 119 | * |
120 | - * @return Title|MockObject |
|
120 | + * @return \Wikibase\DataModel\Entity\EntityId |
|
121 | 121 | */ |
122 | 122 | private function getTitleMock( $text, $id = 23 ) { |
123 | 123 | $title = $this->getMockBuilder( Title::class ) |
@@ -26,6 +26,9 @@ |
||
26 | 26 | yield 'default not matching type' => [ false, EntityUrlLookup::class, [], new stdClass() ]; |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param stdClass $fakeServiceToReturn |
|
31 | + */ |
|
29 | 32 | private function getSomeServiceReturningCallback( $fakeServiceToReturn = null ) { |
30 | 33 | return function () use ( $fakeServiceToReturn ) { |
31 | 34 | return $fakeServiceToReturn ?? new stdClass(); |
@@ -335,7 +335,7 @@ |
||
335 | 335 | * @param Title|null $currentTitle |
336 | 336 | * @param RequestContext $context |
337 | 337 | * |
338 | - * @return bool |
|
338 | + * @return null|boolean |
|
339 | 339 | */ |
340 | 340 | private function shouldConvert( ?Title $currentTitle, RequestContext $context ) { |
341 | 341 | static $shouldConvert = null; |
@@ -170,6 +170,7 @@ discard block |
||
170 | 170 | * |
171 | 171 | * @param int $ns Namespace ID |
172 | 172 | * @param bool &$movable |
173 | + * @param boolean $movable |
|
173 | 174 | */ |
174 | 175 | public static function onNamespaceIsMovable( $ns, &$movable ) { |
175 | 176 | if ( self::isNamespaceUsedByLocalEntities( $ns ) ) { |
@@ -177,6 +178,9 @@ discard block |
||
177 | 178 | } |
178 | 179 | } |
179 | 180 | |
181 | + /** |
|
182 | + * @param integer $namespace |
|
183 | + */ |
|
180 | 184 | private static function isNamespaceUsedByLocalEntities( $namespace ) { |
181 | 185 | $wikibaseRepo = WikibaseRepo::getDefaultInstance(); |
182 | 186 | $namespaceLookup = $wikibaseRepo->getEntityNamespaceLookup(); |
@@ -774,6 +778,7 @@ discard block |
||
774 | 778 | * @param string $contentModel |
775 | 779 | * @param LinkTarget $title Actually a Title object, but we only require getNamespace |
776 | 780 | * @param bool &$ok |
781 | + * @param boolean $ok |
|
777 | 782 | * |
778 | 783 | * @return bool |
779 | 784 | */ |
@@ -852,7 +857,7 @@ discard block |
||
852 | 857 | /** |
853 | 858 | * Helper for onAPIQuerySiteInfoStatisticsInfo |
854 | 859 | * |
855 | - * @param object $row |
|
860 | + * @param \stdClass|null $row |
|
856 | 861 | * @return array |
857 | 862 | */ |
858 | 863 | private static function formatDispatchRow( $row ) { |
@@ -111,6 +111,9 @@ discard block |
||
111 | 111 | ->getEntityParserOutputGenerator( Language::factory( 'en' ) ); |
112 | 112 | } |
113 | 113 | |
114 | + /** |
|
115 | + * @param string $id |
|
116 | + */ |
|
114 | 117 | private function saveItem( $id ) { |
115 | 118 | $this->entityStore->saveEntity( |
116 | 119 | new Item( new ItemId( $id ) ), |
@@ -119,6 +122,9 @@ discard block |
||
119 | 122 | ); |
120 | 123 | } |
121 | 124 | |
125 | + /** |
|
126 | + * @param string $id |
|
127 | + */ |
|
122 | 128 | private function saveProperty( $id ) { |
123 | 129 | $this->entityStore->saveEntity( |
124 | 130 | new Property( new PropertyId( $id ), null, 'wikibase-item' ), |
@@ -127,7 +127,6 @@ |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
130 | - * @param Title $title |
|
131 | 130 | * @param array|null $currentUsages |
132 | 131 | * |
133 | 132 | * @return UsageLookup |
@@ -65,6 +65,8 @@ |
||
65 | 65 | * @param array &$query_options Array of options for the database request |
66 | 66 | * @param array &$join_conds Join conditions for the tables |
67 | 67 | * @param \FormOptions $opts FormOptions for this request |
68 | + * @param string[] $tables |
|
69 | + * @param string[] $fields |
|
68 | 70 | */ |
69 | 71 | public function onChangesListSpecialPageQuery( $name, &$tables, &$fields, |
70 | 72 | &$conds, &$query_options, &$join_conds, $opts ) { |