@@ -162,8 +162,8 @@ |
||
| 162 | 162 | /** |
| 163 | 163 | * @see QueryPage::reallyDoQuery |
| 164 | 164 | * |
| 165 | - * @param int|bool $limit |
|
| 166 | - * @param int|bool $offset |
|
| 165 | + * @param integer $limit |
|
| 166 | + * @param integer $offset |
|
| 167 | 167 | * |
| 168 | 168 | * @return ResultWrapper |
| 169 | 169 | */ |
@@ -210,7 +210,7 @@ |
||
| 210 | 210 | /** |
| 211 | 211 | * Returns a map of namespace names to URIs |
| 212 | 212 | * |
| 213 | - * @return array |
|
| 213 | + * @return string[] |
|
| 214 | 214 | */ |
| 215 | 215 | public function getNamespaces() { |
| 216 | 216 | return $this->vocabulary->getNamespaces(); |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | /** |
| 184 | 184 | * @see Store::getLabelConflictFinder |
| 185 | 185 | * |
| 186 | - * @return LabelConflictFinder |
|
| 186 | + * @return TermIndex |
|
| 187 | 187 | */ |
| 188 | 188 | public function getLabelConflictFinder() { |
| 189 | 189 | return $this->getTermIndex(); |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | * @param int|bool $baseRevId |
| 185 | 185 | * |
| 186 | 186 | * @throws StorageException |
| 187 | - * @return Revision The new revision (or the latest one, in case of a null edit). |
|
| 187 | + * @return EntityDocument The new revision (or the latest one, in case of a null edit). |
|
| 188 | 188 | */ |
| 189 | 189 | private function saveEntityContent( |
| 190 | 190 | EntityContent $entityContent, |
@@ -18,6 +18,9 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class ApiJsonFormatTest extends ApiFormatTestCase { |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param string $moduleIdentifier |
|
| 23 | + */ |
|
| 21 | 24 | private function getExpectedJson( $moduleIdentifier ) { |
| 22 | 25 | $json = file_get_contents( __DIR__ . '/../../data/api/' . $moduleIdentifier . '.json' ); |
| 23 | 26 | $json = json_decode( $json, true ); |
@@ -58,6 +58,9 @@ |
||
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $attribute |
|
| 63 | + */ |
|
| 61 | 64 | public function doTestSetTerm( $attribute, $params, $expected ) { |
| 62 | 65 | // -- set any defaults ------------------------------------ |
| 63 | 66 | $params['action'] = self::$testAction; |
@@ -110,6 +110,9 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string|null $statementGuid |
|
| 115 | + */ |
|
| 113 | 116 | protected function makeValidRequest( $statementGuid, array $hashes ) { |
| 114 | 117 | $params = array( |
| 115 | 118 | 'action' => 'wbremovereferences', |
@@ -125,6 +128,9 @@ discard block |
||
| 125 | 128 | $this->makeInvalidRequest( $statementGuid, $hashes, 'no-such-reference' ); |
| 126 | 129 | } |
| 127 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $expectedError |
|
| 133 | + */ |
|
| 128 | 134 | protected function makeInvalidRequest( $statementGuid, array $hashes, $expectedError = null ) { |
| 129 | 135 | $params = array( |
| 130 | 136 | 'action' => 'wbremovereferences', |
@@ -161,6 +161,10 @@ |
||
| 161 | 161 | $this->makeSetQualifierRequest( $guid, $hash, $newQualifier, $item->getId() ); |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | + /** |
|
| 165 | + * @param string|null $statementGuid |
|
| 166 | + * @param null|string $snakhash |
|
| 167 | + */ |
|
| 164 | 168 | protected function makeSetQualifierRequest( $statementGuid, $snakhash, Snak $qualifier, EntityId $entityId ) { |
| 165 | 169 | $params = array( |
| 166 | 170 | 'action' => 'wbsetqualifier', |
@@ -230,6 +230,12 @@ |
||
| 230 | 230 | return $serializedReference; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | + /** |
|
| 234 | + * @param string|null $referenceHash |
|
| 235 | + * @param string $snaksJson |
|
| 236 | + * @param string $snaksOrderJson |
|
| 237 | + * @param string $expectedErrorCode |
|
| 238 | + */ |
|
| 233 | 239 | protected function makeInvalidRequest( |
| 234 | 240 | $statementGuid, |
| 235 | 241 | $referenceHash, |