@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * |
186 | 186 | * @param string $identifer |
187 | 187 | * |
188 | - * @return false|integer |
|
188 | + * @return string |
|
189 | 189 | */ |
190 | 190 | public static function getIdByAbbreviation( $identifer ) { |
191 | 191 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | * |
209 | 209 | * @param integer $identifer |
210 | 210 | * |
211 | - * @return false|string |
|
211 | + * @return string |
|
212 | 212 | */ |
213 | 213 | public static function getTimezoneLiteralById( $identifer ) { |
214 | 214 | |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | * @since 2.5 |
351 | 351 | * |
352 | 352 | * @param DateTime &$dateTime |
353 | - * @param string|integer $identifer |
|
353 | + * @param integer $identifer |
|
354 | 354 | * |
355 | 355 | * @return string |
356 | 356 | */ |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SMW\Tests\DataValues\Time; |
4 | 4 | |
5 | -use SMW\DataItemFactory; |
|
6 | 5 | use SMW\DataValues\Time\Timezone; |
7 | 6 | |
8 | 7 | /** |
@@ -108,7 +108,6 @@ discard block |
||
108 | 108 | * |
109 | 109 | * @since 2.5 |
110 | 110 | * |
111 | - * @param string $text |
|
112 | 111 | */ |
113 | 112 | public function canHighlight( $canHighlight ) { |
114 | 113 | $this->canHighlight = strpos( strtolower( $canHighlight ), '-hl' ) !== false; |
@@ -131,6 +130,10 @@ discard block |
||
131 | 130 | return $this->doHighlight( $text, $type, array_keys( $this->tokens ) ); |
132 | 131 | } |
133 | 132 | |
133 | + /** |
|
134 | + * @param string $text |
|
135 | + * @param string $type |
|
136 | + */ |
|
134 | 137 | private function doHighlight( $text, $type, $tokens ) { |
135 | 138 | |
136 | 139 | if ( $type === self::HL_BOLD ) { |
@@ -150,6 +153,9 @@ discard block |
||
150 | 153 | return preg_replace( $pattern, $replacement, $text ); |
151 | 154 | } |
152 | 155 | |
156 | + /** |
|
157 | + * @param string $text |
|
158 | + */ |
|
153 | 159 | private function addTokensFromText( $text ) { |
154 | 160 | |
155 | 161 | // Remove query related chars |
@@ -153,6 +153,9 @@ discard block |
||
153 | 153 | $this->doRunQueryTests( $jsonTestCaseFileHandler ); |
154 | 154 | } |
155 | 155 | |
156 | + /** |
|
157 | + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler |
|
158 | + */ |
|
156 | 159 | private function prepareTest( $jsonTestCaseFileHandler ) { |
157 | 160 | |
158 | 161 | $permittedSettings = array( |
@@ -206,6 +209,9 @@ discard block |
||
206 | 209 | ); |
207 | 210 | } |
208 | 211 | |
212 | + /** |
|
213 | + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler |
|
214 | + */ |
|
209 | 215 | private function doRunBeforeTest( $jsonTestCaseFileHandler ) { |
210 | 216 | |
211 | 217 | foreach ( $jsonTestCaseFileHandler->findTaskBeforeTestExecutionByType( 'maintenance-run' ) as $runner => $options ) { |
@@ -224,6 +230,9 @@ discard block |
||
224 | 230 | } |
225 | 231 | } |
226 | 232 | |
233 | + /** |
|
234 | + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler |
|
235 | + */ |
|
227 | 236 | private function doRunParserTests( $jsonTestCaseFileHandler ) { |
228 | 237 | |
229 | 238 | $this->parserTestCaseProcessor->setDebugMode( |
@@ -240,6 +249,9 @@ discard block |
||
240 | 249 | } |
241 | 250 | } |
242 | 251 | |
252 | + /** |
|
253 | + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler |
|
254 | + */ |
|
243 | 255 | private function doRunSpecialTests( $jsonTestCaseFileHandler ) { |
244 | 256 | |
245 | 257 | $this->specialPageTestCaseProcessor->setDebugMode( |
@@ -256,6 +268,9 @@ discard block |
||
256 | 268 | } |
257 | 269 | } |
258 | 270 | |
271 | + /** |
|
272 | + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler |
|
273 | + */ |
|
259 | 274 | private function doRunRdfTests( $jsonTestCaseFileHandler ) { |
260 | 275 | |
261 | 276 | // For some reason there are some random failures where |
@@ -276,6 +291,9 @@ discard block |
||
276 | 291 | } |
277 | 292 | } |
278 | 293 | |
294 | + /** |
|
295 | + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler |
|
296 | + */ |
|
279 | 297 | private function doRunQueryTests( $jsonTestCaseFileHandler ) { |
280 | 298 | |
281 | 299 | // Set query parser late to ensure that expected settings are adjusted |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use SMW\PropertySpecificationLookup; |
9 | 9 | use SMW\Tests\JsonTestCaseScriptRunner; |
10 | 10 | use SMW\Tests\JsonTestCaseFileHandler; |
11 | -use SMW\Tests\Utils\UtilityFactory; |
|
12 | 11 | |
13 | 12 | /** |
14 | 13 | * @group semantic-mediawiki |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @param string $text |
45 | 45 | * |
46 | - * @return text |
|
46 | + * @return string |
|
47 | 47 | */ |
48 | 48 | public static function removeLinkObfuscation( $text ) { |
49 | 49 | return str_replace( |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @param string $text |
60 | 60 | * |
61 | - * @return text |
|
61 | + * @return string |
|
62 | 62 | */ |
63 | 63 | public static function encodeLinks( $text ) { |
64 | 64 | return str_replace( |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @param string $text |
75 | 75 | * |
76 | - * @return text |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | public static function decodeSquareBracket( $text ) { |
79 | 79 | return str_replace( array( '%5B', '%5D' ), array( '[', ']' ), $text ); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * |
85 | 85 | * @param string $text |
86 | 86 | * |
87 | - * @return text |
|
87 | + * @return string |
|
88 | 88 | */ |
89 | 89 | public static function obfuscateAnnotation( $text ) { |
90 | 90 | return preg_replace_callback( |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * |
102 | 102 | * @param string $text |
103 | 103 | * |
104 | - * @return text |
|
104 | + * @return string |
|
105 | 105 | */ |
106 | 106 | public static function removeAnnotation( $text ) { |
107 | 107 | |
@@ -153,6 +153,10 @@ discard block |
||
153 | 153 | return $caption !== false ? $caption : $value; |
154 | 154 | } |
155 | 155 | |
156 | + /** |
|
157 | + * @param string $text |
|
158 | + * @param InTextAnnotationParser $parser |
|
159 | + */ |
|
156 | 160 | private static function doObfuscate( $text, $parser ) { |
157 | 161 | |
158 | 162 | /** |
@@ -108,7 +108,6 @@ discard block |
||
108 | 108 | |
109 | 109 | /** |
110 | 110 | * @param integer $id |
111 | - * @param User|null $use |
|
112 | 111 | */ |
113 | 112 | private function doDispose( $id ) { |
114 | 113 | |
@@ -123,6 +122,9 @@ discard block |
||
123 | 122 | $manualEntryLogger->log( 'admin', $this->user, 'Special:SMWAdmin', 'Forced removal of ID '. $id ); |
124 | 123 | } |
125 | 124 | |
125 | + /** |
|
126 | + * @param integer $id |
|
127 | + */ |
|
126 | 128 | private function getForm( $webRequest, $id ) { |
127 | 129 | |
128 | 130 | $message = $this->getIdInfoAsJson( $webRequest, $id ); |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use SMW\MediaWiki\Renderer\HtmlFormRenderer; |
7 | 7 | use SMW\Store; |
8 | 8 | use SMW\Message; |
9 | -use SMW\NamespaceManager; |
|
10 | 9 | use Html; |
11 | 10 | use WebRequest; |
12 | 11 |
@@ -2,9 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace SMW\MediaWiki\Specials\Admin; |
4 | 4 | |
5 | -use SMW\ApplicationFactory; |
|
6 | 5 | use SMW\MediaWiki\Renderer\HtmlFormRenderer; |
7 | -use SMW\Message; |
|
8 | 6 | use WebRequest; |
9 | 7 | use Html; |
10 | 8 |
@@ -79,6 +79,9 @@ discard block |
||
79 | 79 | */ |
80 | 80 | protected $queryParameters = array(); |
81 | 81 | |
82 | + /** |
|
83 | + * @param string $typeid |
|
84 | + */ |
|
82 | 85 | public function __construct( $typeid ) { |
83 | 86 | parent::__construct( $typeid ); |
84 | 87 | switch ( $typeid ) { |
@@ -692,6 +695,9 @@ discard block |
||
692 | 695 | return $dvWikiPage; |
693 | 696 | } |
694 | 697 | |
698 | + /** |
|
699 | + * @param DataItem $subject |
|
700 | + */ |
|
695 | 701 | private function findDisplayTitleFor( $subject ) { |
696 | 702 | |
697 | 703 | $displayTitle = ''; |
@@ -69,6 +69,7 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @since 1.9 |
71 | 71 | * |
72 | + * @param boolean $mode |
|
72 | 73 | * @return AskParserFunction |
73 | 74 | */ |
74 | 75 | public function setShowMode( $mode ) { |
@@ -218,6 +219,9 @@ discard block |
||
218 | 219 | return $result; |
219 | 220 | } |
220 | 221 | |
222 | + /** |
|
223 | + * @param Query $query |
|
224 | + */ |
|
221 | 225 | private function addQueryProfile( $query, $format ) { |
222 | 226 | |
223 | 227 | $settings = $this->applicationFactory->getSettings(); |