@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace SMW; |
4 | 4 | |
5 | 5 | use Onoi\EventDispatcher\EventListenerCollection; |
6 | -use Onoi\EventDispatcher\EventDispatcherFactory; |
|
7 | 6 | use SMWExporter as Exporter; |
8 | 7 | use SMW\Query\QueryComparator; |
9 | 8 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @since 2.2 |
31 | 31 | * |
32 | 32 | * @param integer $dataItemType |
33 | - * @param Closure $dataItemEncoder |
|
33 | + * @param \Closure $dataItemEncoder |
|
34 | 34 | */ |
35 | 35 | public function registerDataItemEncoder( $dataItemType, \Closure $dataItemEncoder ) { |
36 | 36 | $this->dataItemEncoderMap[$dataItemType] = $dataItemEncoder; |
@@ -61,6 +61,9 @@ discard block |
||
61 | 61 | throw new RuntimeException( 'Encoder did not return a valid element' ); |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param DataItem $dataItem |
|
66 | + */ |
|
64 | 67 | private function tryToEncodeDataItem( $dataItem ) { |
65 | 68 | |
66 | 69 | foreach ( $this->dataItemEncoderMap as $dataItemType => $dataItemEncoder ) { |
@@ -3,8 +3,6 @@ |
||
3 | 3 | namespace SMW\Exporter; |
4 | 4 | |
5 | 5 | use SMW\Exporter\Element\ExpResource; |
6 | -use SMW\Exporter\Element\ExpNsResource; |
|
7 | -use SMW\Exporter\Element\ExpElement; |
|
8 | 6 | use SMW\Exporter\Element\ExpLiteral; |
9 | 7 | use SMW\Exporter\Element; |
10 | 8 | use SMWExporter as Exporter; |
@@ -10,13 +10,9 @@ |
||
10 | 10 | use SMW\DIProperty; |
11 | 11 | use SMW\Store; |
12 | 12 | use SMW\DataValueFactory; |
13 | -use SMW\ApplicationFactory; |
|
14 | -use Onoi\Cache\Cache; |
|
15 | - |
|
16 | 13 | use SMWExporter as Exporter; |
17 | 14 | use SMWDataItem as DataItem; |
18 | 15 | use RuntimeException; |
19 | -use Title; |
|
20 | 16 | |
21 | 17 | /** |
22 | 18 | * @license GNU GPL v2+ |
@@ -177,6 +177,10 @@ discard block |
||
177 | 177 | return $resource; |
178 | 178 | } |
179 | 179 | |
180 | + /** |
|
181 | + * @param DIWikiPage $diWikiPage |
|
182 | + * @param string $modifier |
|
183 | + */ |
|
180 | 184 | private function newExpNsResource( $diWikiPage, $modifier ) { |
181 | 185 | |
182 | 186 | $importDataItem = $this->tryToFindImportDataItem( $diWikiPage, $modifier ); |
@@ -254,6 +258,9 @@ discard block |
||
254 | 258 | ); |
255 | 259 | } |
256 | 260 | |
261 | + /** |
|
262 | + * @return DataItem |
|
263 | + */ |
|
257 | 264 | private function tryToFindImportDataItem( DIWikiPage $diWikiPage, $modifier ) { |
258 | 265 | |
259 | 266 | $importDataItems = null; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @since 1.9 |
46 | 46 | * |
47 | 47 | * @param Cache|null $cache |
48 | - * @param stdClass $cacheOptions |
|
48 | + * @param \stdClass $cacheOptions |
|
49 | 49 | */ |
50 | 50 | public function __construct( Cache $cache = null, \stdClass $cacheOptions ) { |
51 | 51 | $this->cache = $cache; |
@@ -251,6 +251,7 @@ discard block |
||
251 | 251 | /** |
252 | 252 | * Cached content is serialized in an associative array following: |
253 | 253 | * { 'revId' => $revisionId, 'text' => (...) } |
254 | + * @param string $key |
|
254 | 255 | */ |
255 | 256 | private function saveToCache( $key, array $content ) { |
256 | 257 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * |
137 | 137 | * @since 1.9 |
138 | 138 | * |
139 | - * @return string|null |
|
139 | + * @return string |
|
140 | 140 | */ |
141 | 141 | public function getContent() { |
142 | 142 | return $this->content; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @since 1.9 |
195 | 195 | * |
196 | - * @return array |
|
196 | + * @return string[] |
|
197 | 197 | */ |
198 | 198 | protected function getModules() { |
199 | 199 | return array( |
@@ -211,9 +211,10 @@ discard block |
||
211 | 211 | * |
212 | 212 | * @since 1.9 |
213 | 213 | * |
214 | - * @return integer $showFactbox |
|
214 | + * @param string|null $showFactbox |
|
215 | + * @return string $showFactbox |
|
215 | 216 | * |
216 | - * @return string|null |
|
217 | + * @return string |
|
217 | 218 | */ |
218 | 219 | protected function fetchContent( $showFactbox = SMW_FACTBOX_NONEMPTY ) { |
219 | 220 | |
@@ -270,7 +271,7 @@ discard block |
||
270 | 271 | * |
271 | 272 | * @param SMWSemanticData $semanticData |
272 | 273 | * |
273 | - * @return string|null |
|
274 | + * @return string |
|
274 | 275 | */ |
275 | 276 | protected function createTable( SemanticData $semanticData ) { |
276 | 277 |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use SMW\MediaWiki\HtmlTableRenderer; |
12 | 12 | use SMW\MediaWiki\MessageBuilder; |
13 | 13 | use SMW\ParserData; |
14 | -use SMW\Profiler; |
|
15 | 14 | use SMW\SemanticData; |
16 | 15 | use SMW\Store; |
17 | 16 | use SMWInfolink; |
@@ -97,7 +97,7 @@ |
||
97 | 97 | * |
98 | 98 | * @param string |
99 | 99 | * |
100 | - * @return DIWikiPage|null |
|
100 | + * @return DIWikiPage |
|
101 | 101 | */ |
102 | 102 | public static function newDiWikiPageFromHash( $hash ) { |
103 | 103 |
@@ -199,6 +199,9 @@ discard block |
||
199 | 199 | return $skip; |
200 | 200 | } |
201 | 201 | |
202 | + /** |
|
203 | + * @return string |
|
204 | + */ |
|
202 | 205 | private function performAction( Title $title, DIConcept $concept ) { |
203 | 206 | $this->reportMessage( "($this->lines) " ); |
204 | 207 | |
@@ -256,6 +259,9 @@ discard block |
||
256 | 259 | return $titleLookup->selectByIdRange( $this->startId, $endId ); |
257 | 260 | } |
258 | 261 | |
262 | + /** |
|
263 | + * @param string $key |
|
264 | + */ |
|
259 | 265 | private function hasOption( $key ) { |
260 | 266 | return isset( $this->options[$key] ); |
261 | 267 | } |
@@ -266,6 +272,9 @@ discard block |
||
266 | 272 | } |
267 | 273 | } |
268 | 274 | |
275 | + /** |
|
276 | + * @param integer $date |
|
277 | + */ |
|
269 | 278 | private function getCacheDateInfo( $date ) { |
270 | 279 | return date( 'Y-m-d H:i:s', $date ) . ' (' . floor( ( strtotime( 'now' ) - $date ) / 60 ) . ' minutes old), '; |
271 | 280 | } |
@@ -160,6 +160,9 @@ discard block |
||
160 | 160 | return $this->rebuildCount; |
161 | 161 | } |
162 | 162 | |
163 | + /** |
|
164 | + * @param string $message |
|
165 | + */ |
|
163 | 166 | private function doRebuildPagesFor( $message ) { |
164 | 167 | |
165 | 168 | $this->reportMessage( $message . "\n" ); |
@@ -305,6 +308,9 @@ discard block |
||
305 | 308 | return true; |
306 | 309 | } |
307 | 310 | |
311 | + /** |
|
312 | + * @param double $byIdDataRebuildDispatcher |
|
313 | + */ |
|
308 | 314 | private function deleteMarkedSubjects( $byIdDataRebuildDispatcher ) { |
309 | 315 | |
310 | 316 | $matches = array(); |
@@ -338,6 +344,9 @@ discard block |
||
338 | 344 | $this->reportMessage( "\n\n{$matchesCount} IDs removed.\n\n" ); |
339 | 345 | } |
340 | 346 | |
347 | + /** |
|
348 | + * @param string $startIdFile |
|
349 | + */ |
|
341 | 350 | private function idFileIsWritable( $startIdFile ) { |
342 | 351 | |
343 | 352 | if ( !is_writable( file_exists( $startIdFile ) ? $startIdFile : dirname( $startIdFile ) ) ) { |
@@ -354,7 +363,7 @@ discard block |
||
354 | 363 | } |
355 | 364 | |
356 | 365 | /** |
357 | - * @param array $options |
|
366 | + * @param Options $options |
|
358 | 367 | */ |
359 | 368 | private function setFiltersFromOptions( Options $options ) { |
360 | 369 | $this->filters = array(); |
@@ -439,6 +448,10 @@ discard block |
||
439 | 448 | } |
440 | 449 | } |
441 | 450 | |
451 | + /** |
|
452 | + * @param boolean $verbose |
|
453 | + * @param string $progress |
|
454 | + */ |
|
442 | 455 | private function doPrintDotProgressIndicator( $verbose, $progress ) { |
443 | 456 | |
444 | 457 | if ( ( $this->rebuildCount - 1 ) % 60 === 0 ) { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | * |
73 | 73 | * @since 1.9 |
74 | 74 | * |
75 | - * @return ObjectDictionary |
|
75 | + * @return SimpleDictionary |
|
76 | 76 | */ |
77 | 77 | protected function formatAskArgs() { |
78 | 78 |