@@ -54,9 +54,8 @@ |
||
54 | 54 | /** |
55 | 55 | * @since 2.5 |
56 | 56 | * |
57 | - * @param SQLStore $store |
|
58 | 57 | * |
59 | - * @return SearchTable |
|
58 | + * @return TextSanitizer |
|
60 | 59 | */ |
61 | 60 | public function newTextSanitizer() { |
62 | 61 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @since 2.5 |
32 | 32 | * |
33 | - * @param LanguageJsonFileContentsReader $LanguageJsonFileContentsReader |
|
33 | + * @param LanguageJsonFileContentsReader $languageJsonFileContentsReader |
|
34 | 34 | */ |
35 | 35 | public function __construct( LanguageJsonFileContentsReader $languageJsonFileContentsReader ) { |
36 | 36 | $this->languageJsonFileContentsReader = $languageJsonFileContentsReader; |
@@ -100,7 +100,6 @@ discard block |
||
100 | 100 | * @since 2.5 |
101 | 101 | * |
102 | 102 | * @param string $languageCode |
103 | - * @param boolean $readFromFile |
|
104 | 103 | * |
105 | 104 | * @return boolean |
106 | 105 | */ |
@@ -163,6 +162,10 @@ discard block |
||
163 | 162 | return self::$contents[$languageCode]; |
164 | 163 | } |
165 | 164 | |
165 | + /** |
|
166 | + * @param string $languageCode |
|
167 | + * @param string $cacheKey |
|
168 | + */ |
|
166 | 169 | protected function doReadJsonContentsFromFileBy( $languageCode, $cacheKey ) { |
167 | 170 | |
168 | 171 | $contents = json_decode( |
@@ -189,6 +192,9 @@ discard block |
||
189 | 192 | throw new RuntimeException( "Expected a {$file} file" ); |
190 | 193 | } |
191 | 194 | |
195 | + /** |
|
196 | + * @param string $languageCode |
|
197 | + */ |
|
192 | 198 | private function getCacheKeyFrom( $languageCode ) { |
193 | 199 | return $this->cachePrefix . ':' . $languageCode . ':' . md5( $this->ttl . $this->getModificationTimeByLanguageCode( $languageCode ) ); |
194 | 200 | } |
@@ -402,6 +402,10 @@ |
||
402 | 402 | ) . $suffix ); |
403 | 403 | } |
404 | 404 | |
405 | + /** |
|
406 | + * @param string $id |
|
407 | + * @param DIWikiPage $subject |
|
408 | + */ |
|
405 | 409 | private function appendToList( $id, $subject ) { |
406 | 410 | |
407 | 411 | // Store the id with the main subject |
@@ -232,6 +232,9 @@ |
||
232 | 232 | } |
233 | 233 | } |
234 | 234 | |
235 | + /** |
|
236 | + * @param DIWikiPage|null $subject |
|
237 | + */ |
|
235 | 238 | private function doMatchSubproperty( &$subjects, $subject, DIProperty $property ) { |
236 | 239 | |
237 | 240 | $subproperties = array(); |
@@ -13,8 +13,6 @@ |
||
13 | 13 | use SMW\Query\Language\SomeProperty; |
14 | 14 | use SMW\Query\Language\ThingDescription; |
15 | 15 | use SMW\Query\Language\ValueDescription; |
16 | -use SMW\Store; |
|
17 | -use SMWQuery as Query; |
|
18 | 16 | use SMWQueryResult as QueryResult; |
19 | 17 | |
20 | 18 | /** |
@@ -79,7 +79,8 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * @since 2.5 |
81 | 81 | * |
82 | - * @return boolean |
|
82 | + * @param integer $expiryInSeconds |
|
83 | + * @return boolean|null |
|
83 | 84 | */ |
84 | 85 | public function setExpiryInSeconds( $expiryInSeconds ) { |
85 | 86 | $this->expiryInSeconds = $expiryInSeconds; |
@@ -88,7 +89,7 @@ discard block |
||
88 | 89 | /** |
89 | 90 | * @since 2.5 |
90 | 91 | * |
91 | - * @return boolean |
|
92 | + * @return boolean|null |
|
92 | 93 | */ |
93 | 94 | public function isEnabled( $isEnabled ) { |
94 | 95 | $this->isEnabled = $isEnabled; |
@@ -280,6 +281,7 @@ discard block |
||
280 | 281 | /** |
281 | 282 | * Cached content is serialized in an associative array following: |
282 | 283 | * { 'revId' => $revisionId, 'text' => (...) } |
284 | + * @param string $key |
|
283 | 285 | */ |
284 | 286 | private function saveToCache( $key, array $content ) { |
285 | 287 |
@@ -119,6 +119,10 @@ discard block |
||
119 | 119 | $this->setNearbySearch(); |
120 | 120 | } |
121 | 121 | |
122 | + /** |
|
123 | + * @param string $value |
|
124 | + * @param boolean $escaped |
|
125 | + */ |
|
122 | 126 | private function getValue( $value, $escaped ) { |
123 | 127 | |
124 | 128 | $this->value = DataValueFactory::getInstance()->newDataValueByProperty( |
@@ -131,6 +135,9 @@ discard block |
||
131 | 135 | return $this->value->isValid() ? $this->value->getWikiValue() : $value; |
132 | 136 | } |
133 | 137 | |
138 | + /** |
|
139 | + * @return string |
|
140 | + */ |
|
134 | 141 | private function unescape( $value, $escaped ) { |
135 | 142 | |
136 | 143 | if ( $this->value instanceof NumberValue ) { |
@@ -4,11 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use SMW\DataValueFactory; |
6 | 6 | use SMW\DataValues\TelephoneUriValue; |
7 | -use SMWUriValue as UriValue; |
|
8 | 7 | use SMW\UrlEncoder; |
9 | 8 | use SMWNumberValue as NumberValue; |
10 | 9 | use SMWPropertyValue as PropertyValue; |
11 | -use SMWStringValue as TextValue; |
|
12 | 10 | |
13 | 11 | /** |
14 | 12 | * @license GNU GPL v2+ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @param integer $mode a constant defining what to printout |
70 | 70 | * @param string $label the string label to describe this printout |
71 | 71 | * @param mixed $data optional data for specifying some request, might be a property object, title, or something else; interpretation depends on $mode |
72 | - * @param mixed $outputformat optional string for specifying an output format, e.g. an output unit |
|
72 | + * @param string $outputformat optional string for specifying an output format, e.g. an output unit |
|
73 | 73 | * @param array|null $params optional array of further, named parameters for the print request |
74 | 74 | */ |
75 | 75 | public function __construct( $mode, $label, $data = null, $outputformat = false, array $params = null ) { |
@@ -137,6 +137,7 @@ discard block |
||
137 | 137 | |
138 | 138 | /** |
139 | 139 | * Convenience method for accessing the text in either HTML or Wiki format. |
140 | + * @param integer $outputMode |
|
140 | 141 | */ |
141 | 142 | public function getText( $outputMode, $linker = null ) { |
142 | 143 | return Formatter::format( $this, $linker, $outputMode ); |
@@ -239,7 +240,7 @@ discard block |
||
239 | 240 | /** |
240 | 241 | * Sets a print request parameter. |
241 | 242 | * |
242 | - * @param $key string Name of the parameter |
|
243 | + * @param string $key string Name of the parameter |
|
243 | 244 | * @param $value string Value for the parameter |
244 | 245 | */ |
245 | 246 | public function setParameter( $key, $value ) { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace SMW\Query; |
4 | 4 | |
5 | 5 | use InvalidArgumentException; |
6 | -use SMW\Localizer; |
|
7 | 6 | use SMWDataValue; |
8 | 7 | use SMWPropertyValue as PropertyValue; |
9 | 8 | use SMW\DataValues\PropertyChainValue; |
@@ -156,6 +156,9 @@ discard block |
||
156 | 156 | return $options; |
157 | 157 | } |
158 | 158 | |
159 | + /** |
|
160 | + * @param DataItem $dataItem |
|
161 | + */ |
|
159 | 162 | private function getResultsForProperty( $dataItem ) { |
160 | 163 | |
161 | 164 | $content = $this->getResultContent( |
@@ -212,6 +215,9 @@ discard block |
||
212 | 215 | return $content; |
213 | 216 | } |
214 | 217 | |
218 | + /** |
|
219 | + * @param string $parameter |
|
220 | + */ |
|
215 | 221 | private function isMultiValueWithParameter( $parameter ) { |
216 | 222 | return strpos( $this->printRequest->getTypeID(), '_rec' ) !== false && $this->printRequest->getParameter( $parameter ) !== false; |
217 | 223 | } |