@@ -85,6 +85,7 @@ |
||
| 85 | 85 | * @since 2.2 |
| 86 | 86 | * |
| 87 | 87 | * @param &$querySegmentList |
| 88 | + * @param QuerySegment[] $querySegmentList |
|
| 88 | 89 | */ |
| 89 | 90 | public function setQuerySegmentList( &$querySegmentList ) { |
| 90 | 91 | $this->querySegmentList =& $querySegmentList; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * |
| 133 | 133 | * @since 1.8 |
| 134 | 134 | * @param array $data array of SMWDataItem objects |
| 135 | - * @param SMWRequestOptions|null $requestoptions |
|
| 135 | + * @param null|RequestOptions $requestOptions |
|
| 136 | 136 | * |
| 137 | 137 | * @return SMWDataItem[] |
| 138 | 138 | */ |
@@ -170,6 +170,9 @@ discard block |
||
| 170 | 170 | return $result; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | + /** |
|
| 174 | + * @param boolean $keepDataValue |
|
| 175 | + */ |
|
| 173 | 176 | private function applyStringConditions( $requestOptions, $label, $keepDataValue ) { |
| 174 | 177 | |
| 175 | 178 | foreach ( $requestOptions->getStringConditions() as $strcond ) { // apply string conditions |
@@ -189,6 +192,9 @@ discard block |
||
| 189 | 192 | return $keepDataValue; |
| 190 | 193 | } |
| 191 | 194 | |
| 195 | + /** |
|
| 196 | + * @param boolean $isNumeric |
|
| 197 | + */ |
|
| 192 | 198 | private function applyBoundaryConditions( $requestOptions, $value, $isNumeric ) { |
| 193 | 199 | $keepDataValue = true; // keep datavalue only if this remains true |
| 194 | 200 | |
@@ -229,6 +235,9 @@ discard block |
||
| 229 | 235 | return array( $label, $value ); |
| 230 | 236 | } |
| 231 | 237 | |
| 238 | + /** |
|
| 239 | + * @param boolean $isNumeric |
|
| 240 | + */ |
|
| 232 | 241 | private function applySortRestriction( $requestOptions, &$result, $sortres, $isNumeric ) { |
| 233 | 242 | |
| 234 | 243 | if ( !$requestOptions->sort ) { |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | /** |
| 46 | 46 | * @since 1.0 |
| 47 | 47 | * |
| 48 | - * @param srting $string |
|
| 48 | + * @param string $string |
|
| 49 | 49 | * @param integer $condition |
| 50 | 50 | * @param boolean $asDisjunctiveCondition |
| 51 | 51 | */ |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * @since 2.1 |
| 85 | 85 | * |
| 86 | - * @return integer |
|
| 86 | + * @return double |
|
| 87 | 87 | */ |
| 88 | 88 | public function getSum() { |
| 89 | 89 | return $this->round( array_sum( $this->container ) ); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | /** |
| 93 | 93 | * @since 2.1 |
| 94 | 94 | * |
| 95 | - * @return integer |
|
| 95 | + * @return double |
|
| 96 | 96 | */ |
| 97 | 97 | public function getMean() { |
| 98 | 98 | return $this->round( $this->getSum() / count( $this->container ) ); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | /** |
| 121 | 121 | * @since 2.1 |
| 122 | 122 | * |
| 123 | - * @return integer |
|
| 123 | + * @return double |
|
| 124 | 124 | */ |
| 125 | 125 | public function getStandardDeviation() { |
| 126 | 126 | return $this->round( (float)sqrt( $this->getVariance() ) ); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | * |
| 132 | 132 | * @param integer $basis |
| 133 | 133 | * |
| 134 | - * @return integer |
|
| 134 | + * @return double |
|
| 135 | 135 | */ |
| 136 | 136 | public function getStandardScoreBy( $basis = 0 ) { |
| 137 | 137 | return $this->round( ( $basis - $this->getMean() ) / $this->getStandardDeviation() ); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * |
| 143 | 143 | * @param integer $basis |
| 144 | 144 | * |
| 145 | - * @return integer |
|
| 145 | + * @return double |
|
| 146 | 146 | */ |
| 147 | 147 | public function getNormalizedValueBy( $basis = 1 ) { |
| 148 | 148 | return $this->round( $this->getMean() / $basis ); |
@@ -210,6 +210,9 @@ |
||
| 210 | 210 | return $queryResult; |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | + /** |
|
| 214 | + * @param QueryResult $queryResult |
|
| 215 | + */ |
|
| 213 | 216 | private function benchmarkQueryResultSerialization( $queryResult ) { |
| 214 | 217 | |
| 215 | 218 | if ( !$queryResult instanceof QueryResult || $queryResult->getCount() == 0 ) { |
@@ -86,6 +86,9 @@ discard block |
||
| 86 | 86 | parent::tearDown(); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + /** |
|
| 90 | + * @return string |
|
| 91 | + */ |
|
| 89 | 92 | abstract protected function getTestCaseLocation(); |
| 90 | 93 | |
| 91 | 94 | /** |
@@ -201,6 +204,9 @@ discard block |
||
| 201 | 204 | } |
| 202 | 205 | } |
| 203 | 206 | |
| 207 | + /** |
|
| 208 | + * @param string $key |
|
| 209 | + */ |
|
| 204 | 210 | protected function changeGlobalSettingTo( $key, $value ) { |
| 205 | 211 | |
| 206 | 212 | if ( $key === '' || $value === '' ) { |
@@ -85,6 +85,9 @@ |
||
| 85 | 85 | ); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param UriValue $instance |
|
| 90 | + */ |
|
| 88 | 91 | private function assertOutputFormatting( $instance, $linker, $expected ) { |
| 89 | 92 | |
| 90 | 93 | $this->assertEquals( |
@@ -280,6 +280,9 @@ discard block |
||
| 280 | 280 | return $this->buildDataProvider( 'wgExtensionMessagesFiles', $modules, '' ); |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | + /** |
|
| 284 | + * @param string $target |
|
| 285 | + */ |
|
| 283 | 286 | private function assertArrayEntryExists( $target, $entry, $config, $type = 'class' ) { |
| 284 | 287 | |
| 285 | 288 | $config = $config + $this->defaultConfig; |
@@ -305,6 +308,9 @@ discard block |
||
| 305 | 308 | } |
| 306 | 309 | |
| 307 | 310 | /** |
| 311 | + * @param string $id |
|
| 312 | + * @param string[] $definitions |
|
| 313 | + * @param string $default |
|
| 308 | 314 | * @return array |
| 309 | 315 | */ |
| 310 | 316 | private function buildDataProvider( $id, $definitions, $default ) { |
@@ -42,6 +42,9 @@ |
||
| 42 | 42 | * @param Store |
| 43 | 43 | * @param SemanticDataValidator |
| 44 | 44 | * @param StringValidator |
| 45 | + * @param \SMW\Store $store |
|
| 46 | + * @param \SMW\Tests\Utils\Validators\SemanticDataValidator $semanticDataValidator |
|
| 47 | + * @param \SMW\Tests\Utils\Validators\StringValidator $stringValidator |
|
| 45 | 48 | */ |
| 46 | 49 | public function __construct( $store, $semanticDataValidator, $stringValidator ) { |
| 47 | 50 | $this->store = $store; |