@@ -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 ); |
@@ -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 ) { |
@@ -133,6 +133,9 @@ |
||
133 | 133 | ); |
134 | 134 | } |
135 | 135 | |
136 | + /** |
|
137 | + * @param string $subject |
|
138 | + */ |
|
136 | 139 | private function newBrowseBySubject( $subject, $asRawMode = false ) { |
137 | 140 | |
138 | 141 | $instance = new BrowseBySubject( |
@@ -116,6 +116,10 @@ |
||
116 | 116 | ->run(); |
117 | 117 | } |
118 | 118 | |
119 | + /** |
|
120 | + * @param string $name |
|
121 | + * @param string $condition |
|
122 | + */ |
|
119 | 123 | protected function createConceptPage( $name, $condition ) { |
120 | 124 | |
121 | 125 | $this->pageCreator |
@@ -166,6 +166,9 @@ discard block |
||
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
169 | + /** |
|
170 | + * @param \SMW\SemanticData $semanticData |
|
171 | + */ |
|
169 | 172 | protected function assertThatSemanticDataValuesForPropertyAreSet( $expected, $semanticData ) { |
170 | 173 | |
171 | 174 | $runValueAssert = false; |
@@ -186,6 +189,10 @@ discard block |
||
186 | 189 | // $this->assertTrue( $runValueAssert, __METHOD__ ); |
187 | 190 | } |
188 | 191 | |
192 | + /** |
|
193 | + * @param string $source |
|
194 | + * @param string $target |
|
195 | + */ |
|
189 | 196 | protected function createPageWithRedirectFor( $source, $target ) { |
190 | 197 | |
191 | 198 | $this->pageCreator |
@@ -195,6 +202,9 @@ discard block |
||
195 | 202 | return $this->pageCreator->getPage(); |
196 | 203 | } |
197 | 204 | |
205 | + /** |
|
206 | + * @param string $target |
|
207 | + */ |
|
198 | 208 | protected function movePageToTargetRedirect( $page, $target ) { |
199 | 209 | |
200 | 210 | $moveToTargetTitle = Title::newFromText( $target ); |
@@ -216,6 +216,9 @@ |
||
216 | 216 | |
217 | 217 | } |
218 | 218 | |
219 | + /** |
|
220 | + * @param \SMW\SemanticData $semanticData |
|
221 | + */ |
|
219 | 222 | protected function assertBatchesOfDateValues( $assertionBatches, $semanticData ) { |
220 | 223 | foreach ( $assertionBatches as $singleAssertionBatch ) { |
221 | 224 | $this->assertThatDateValuesAreSet( $singleAssertionBatch, $semanticData ); |
@@ -163,6 +163,9 @@ |
||
163 | 163 | $this->assertPropertyCount( $expected['poAfter'], $expected['storeAfter'], $parserData ); |
164 | 164 | } |
165 | 165 | |
166 | + /** |
|
167 | + * @param ParserData $parserData |
|
168 | + */ |
|
166 | 169 | protected function assertPropertyCount( $poExpected, $storeExpected, $parserData ) { |
167 | 170 | $this->semanticDataValidator->assertThatSemanticDataHasPropertyCountOf( |
168 | 171 | $poExpected['count'], |
@@ -111,6 +111,9 @@ |
||
111 | 111 | ); |
112 | 112 | } |
113 | 113 | |
114 | + /** |
|
115 | + * @param string $categoryName |
|
116 | + */ |
|
114 | 117 | private function searchForResultsThatCompareEqualToClassOf( $categoryName ) { |
115 | 118 | |
116 | 119 | $propertyValue = new PropertyValue( '__pro' ); |