@@ -161,6 +161,9 @@ discard block |
||
161 | 161 | return array( str_replace( '_', ' ', $resultMessage ), $resultList, $exactCount ); |
162 | 162 | } |
163 | 163 | |
164 | + /** |
|
165 | + * @param integer $exactCount |
|
166 | + */ |
|
164 | 167 | private function getNearbyResults( $exactResults, $exactCount ) { |
165 | 168 | |
166 | 169 | $resultList = ''; |
@@ -290,6 +293,9 @@ discard block |
||
290 | 293 | return "<ul>$html</ul>"; |
291 | 294 | } |
292 | 295 | |
296 | + /** |
|
297 | + * @param integer $exactCount |
|
298 | + */ |
|
293 | 299 | private function canQueryNearbyResults( $exactCount ) { |
294 | 300 | return $exactCount < ( $this->pageRequestOptions->limit / 3 ) && $this->pageRequestOptions->nearbySearch && $this->pageRequestOptions->valueString !== ''; |
295 | 301 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * @since 2.1 |
39 | 39 | * |
40 | - * @param QueryOptions $pageRequestOptions |
|
40 | + * @param PageRequestOptions $pageRequestOptions |
|
41 | 41 | * |
42 | 42 | * @return array of array(SMWWikiPageValue, SMWDataValue) with the |
43 | 43 | * first being the entity, and the second the value |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * on the property, ordered, and sorted by ending with the smallest |
75 | 75 | * one. |
76 | 76 | * |
77 | - * @param QueryOptions $pageRequestOptions |
|
77 | + * @param PageRequestOptions $pageRequestOptions |
|
78 | 78 | * @param integer $count How many entities have the exact same value on the property? |
79 | 79 | * @param integer $greater Should the values be bigger? Set false for smaller values. |
80 | 80 | * |
@@ -3,9 +3,6 @@ |
||
3 | 3 | namespace SMW\MediaWiki\Specials\SearchByProperty; |
4 | 4 | |
5 | 5 | use SMW\DataValueFactory; |
6 | -use SMW\Query\Language\SomeProperty; |
|
7 | -use SMW\Query\Language\ThingDescription; |
|
8 | -use SMW\Query\Language\ValueDescription; |
|
9 | 6 | use SMW\Query\PrintRequest as PrintRequest; |
10 | 7 | use SMW\Store; |
11 | 8 | use SMWQuery as Query; |
@@ -99,6 +99,10 @@ |
||
99 | 99 | return SMW_CATEGORY_QUERY; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param integer $maxsize |
|
104 | + * @param integer $maxdepth |
|
105 | + */ |
|
102 | 106 | public function prune( &$maxsize, &$maxdepth, &$log ) { |
103 | 107 | |
104 | 108 | if ( $maxsize >= $this->getSize() ) { |
@@ -73,7 +73,7 @@ |
||
73 | 73 | /** |
74 | 74 | * Get the number of rows in the result object. |
75 | 75 | * |
76 | - * @return interger number of result rows |
|
76 | + * @return integer number of result rows |
|
77 | 77 | */ |
78 | 78 | public function numRows() { |
79 | 79 | return count( $this->data ); |
@@ -126,6 +126,9 @@ |
||
126 | 126 | ); |
127 | 127 | } |
128 | 128 | |
129 | + /** |
|
130 | + * @param string $xmlResultData |
|
131 | + */ |
|
129 | 132 | private function parseXml( $xmlResultData ) { |
130 | 133 | return xml_parse( $this->parser, $xmlResultData, true ); |
131 | 134 | } |
@@ -403,7 +403,7 @@ |
||
403 | 403 | * |
404 | 404 | * @param string $connectionTypeId |
405 | 405 | * |
406 | - * @return mixed |
|
406 | + * @return RepositoryConnection |
|
407 | 407 | */ |
408 | 408 | public function getConnection( $connectionTypeId = 'sparql' ) { |
409 | 409 |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * @since 2.3 |
72 | 72 | * |
73 | - * @param integer $chunkSize |
|
73 | + * @param integer $triplesChunkSize |
|
74 | 74 | */ |
75 | 75 | public function setTriplesChunkSize( $triplesChunkSize ) { |
76 | 76 | $this->triplesChunkSize = (int)$triplesChunkSize; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | /** |
149 | 149 | * @since 2.0 |
150 | 150 | * |
151 | - * @return boolean |
|
151 | + * @return null|boolean |
|
152 | 152 | */ |
153 | 153 | public function hasTriplesForUpdate() { |
154 | 154 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * @since 2.0 |
164 | 164 | * |
165 | - * @return boolean |
|
165 | + * @return boolean|null |
|
166 | 166 | */ |
167 | 167 | public static function reset() { |
168 | 168 | TurtleSerializer::reset(); |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | * @since 1.6 |
306 | 306 | * @param ExpData $expData object containing the update data |
307 | 307 | * @param $auxiliaryExpData array of SMWExpData |
308 | - * @param $expandSubject boolean controls if redirects/auxiliary data should also be sought for subject |
|
308 | + * @param boolean $expandSubject boolean controls if redirects/auxiliary data should also be sought for subject |
|
309 | 309 | * |
310 | 310 | * @return ExpData |
311 | 311 | */ |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @param ListLookup $listLookup |
53 | 53 | * @param Cache $cache |
54 | - * @param stdClass $cacheOptions |
|
54 | + * @param \stdClass $cacheOptions |
|
55 | 55 | */ |
56 | 56 | public function __construct( ListLookup $listLookup, Cache $cache, \stdClass $cacheOptions ) { |
57 | 57 | $this->listLookup = $listLookup; |
@@ -149,6 +149,10 @@ discard block |
||
149 | 149 | $this->cache->delete( $id ); |
150 | 150 | } |
151 | 151 | |
152 | + /** |
|
153 | + * @param string $key |
|
154 | + * @param string $optionsKey |
|
155 | + */ |
|
152 | 156 | private function tryFetchFromCache( $key, $optionsKey ) { |
153 | 157 | |
154 | 158 | if ( !$this->cache->contains( $key ) ) { |
@@ -167,6 +171,11 @@ discard block |
||
167 | 171 | return $data['list']; |
168 | 172 | } |
169 | 173 | |
174 | + /** |
|
175 | + * @param string $key |
|
176 | + * @param string $optionsKey |
|
177 | + * @param integer $time |
|
178 | + */ |
|
170 | 179 | private function saveToCache( $key, $optionsKey, $list, $time, $ttl ) { |
171 | 180 | |
172 | 181 | $this->timestamp = $time; |
@@ -185,6 +194,9 @@ discard block |
||
185 | 194 | $this->cache->save( $optionsKey, serialize( $data ), $ttl ); |
186 | 195 | } |
187 | 196 | |
197 | + /** |
|
198 | + * @param string $id |
|
199 | + */ |
|
188 | 200 | private function getCacheKey( $id ) { |
189 | 201 | |
190 | 202 | $optionsKey = ''; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @param Store $store |
42 | 42 | * @param PropertyStatisticsStore $propertyStatisticsStore |
43 | - * @param RequestOptions $requestOptions|null |
|
43 | + * @param RequestOptions $requestOptions |
|
44 | 44 | */ |
45 | 45 | public function __construct( Store $store, PropertyStatisticsStore $propertyStatisticsStore, RequestOptions $requestOptions = null ) { |
46 | 46 | $this->store = $store; |