@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | /** |
148 | 148 | * @param Response $response |
149 | 149 | * |
150 | - * @return bool|string |
|
150 | + * @return string|false |
|
151 | 151 | */ |
152 | 152 | private function getContentEncoding($response) |
153 | 153 | { |
@@ -161,6 +161,10 @@ discard block |
||
161 | 161 | return false; |
162 | 162 | } |
163 | 163 | |
164 | + /** |
|
165 | + * @param string $json |
|
166 | + * @param string $class |
|
167 | + */ |
|
164 | 168 | private function deserialize($json, $class) |
165 | 169 | { |
166 | 170 | $object = null; |
@@ -342,6 +342,9 @@ discard block |
||
342 | 342 | return $lastSegment; |
343 | 343 | } |
344 | 344 | |
345 | + /** |
|
346 | + * @param string $pathSegmentLookup |
|
347 | + */ |
|
345 | 348 | private function removeUnusedPathSegments(array &$pathSegments, $pathSegmentLookup) |
346 | 349 | { |
347 | 350 | while (count($pathSegments) > strlen($pathSegmentLookup)) { |
@@ -389,6 +392,9 @@ discard block |
||
389 | 392 | } |
390 | 393 | } |
391 | 394 | |
395 | + /** |
|
396 | + * @param string $token |
|
397 | + */ |
|
392 | 398 | private function getFieldName($token) |
393 | 399 | { |
394 | 400 | $mapping = $this->tokenToName[$token]; |
@@ -149,7 +149,7 @@ |
||
149 | 149 | |
150 | 150 | /** |
151 | 151 | * @param UrlReplacement[] $replacements |
152 | - * @return string |
|
152 | + * @return StringBuilder |
|
153 | 153 | */ |
154 | 154 | public static function buildQueryString(array $replacements) |
155 | 155 | { |
@@ -71,6 +71,10 @@ |
||
71 | 71 | $this->string = $front . $back; |
72 | 72 | } |
73 | 73 | |
74 | + /** |
|
75 | + * @param integer $index |
|
76 | + * @param integer $length |
|
77 | + */ |
|
74 | 78 | public function delete($index, $length = null) |
75 | 79 | { |
76 | 80 | if ($length != null) { |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | $this->beautifier->clearSavedFields(); |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $identifier |
|
23 | + */ |
|
21 | 24 | private function getBeautifier($identifier) |
22 | 25 | { |
23 | 26 | $beautifiers = UrlBeautifier::getUrlBeautifiers(); |
@@ -203,6 +206,10 @@ discard block |
||
203 | 206 | $this->assertNavigation("height", "=20in", $navigations[1]); |
204 | 207 | } |
205 | 208 | |
209 | + /** |
|
210 | + * @param string $expectedNavName |
|
211 | + * @param string $expectedValue |
|
212 | + */ |
|
206 | 213 | public function assertNavigation($expectedNavName, $expectedValue, Navigation $navigation) |
207 | 214 | { |
208 | 215 | $this->assertEquals($expectedNavName, $navigation->getName()); |
@@ -284,6 +291,10 @@ discard block |
||
284 | 291 | $this->assertFromUrl("/aoeu/laptop/MAGNOLIA+HOME+THEATRE/qd/index.html", null, "MAGNOLIA HOME THEATRE"); |
285 | 292 | } |
286 | 293 | |
294 | + /** |
|
295 | + * @param string $url |
|
296 | + * @param null|string $searchString |
|
297 | + */ |
|
287 | 298 | private function assertFromUrl($url, $searchString) |
288 | 299 | { |
289 | 300 | $query = $this->beautifier->fromUrl($url); |
@@ -324,6 +335,10 @@ discard block |
||
324 | 335 | ->setAppend("/index.html"); |
325 | 336 | } |
326 | 337 | |
338 | + /** |
|
339 | + * @param string|null $searchString |
|
340 | + * @param null|string $refinementString |
|
341 | + */ |
|
327 | 342 | private function assertToAndFromUrl($searchString, $refinementString) |
328 | 343 | { |
329 | 344 | $url = $this->beautifier->toUrl($searchString, $refinementString); |
@@ -377,6 +392,9 @@ discard block |
||
377 | 392 | $this->assertFailingQuery("/black+decker/q/index.html?z=2-B--"); |
378 | 393 | } |
379 | 394 | |
395 | + /** |
|
396 | + * @param string $uri |
|
397 | + */ |
|
380 | 398 | private function assertFailingQuery($uri) |
381 | 399 | { |
382 | 400 | try { |
@@ -121,6 +121,9 @@ discard block |
||
121 | 121 | $this->assertBadApply("abc12", new UrlReplacement(6, "3", OperationType::Insert)); |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param string $input |
|
126 | + */ |
|
124 | 127 | private function assertBadApply($input, UrlReplacement $replacement) |
125 | 128 | { |
126 | 129 | $builder = new StringBuilder($input); |
@@ -128,6 +131,10 @@ discard block |
||
128 | 131 | $this->assertEquals($input, $builder); |
129 | 132 | } |
130 | 133 | |
134 | + /** |
|
135 | + * @param string $input |
|
136 | + * @param string $expected |
|
137 | + */ |
|
131 | 138 | private function assertApply($input, $expected, UrlReplacement $replacement) |
132 | 139 | { |
133 | 140 | $builder = new StringBuilder($input); |
@@ -156,6 +163,9 @@ discard block |
||
156 | 163 | } |
157 | 164 | } |
158 | 165 | |
166 | + /** |
|
167 | + * @param string $replacementString |
|
168 | + */ |
|
159 | 169 | private function assertToAndFromString($replacementString) |
160 | 170 | { |
161 | 171 | $replacement1 = UrlReplacement::fromString($replacementString); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @param recordLimitReached Whether the total record count is actually greater than the returned record count |
27 | - * @return This ResultsMetadata object |
|
27 | + * @return ResultsMetadata ResultsMetadata object |
|
28 | 28 | */ |
29 | 29 | public function setRecordLimitReached($recordLimitReached) |
30 | 30 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param totalTime The total time spent in milliseconds to generate results |
45 | - * @return This ResultsMetadata object |
|
45 | + * @return ResultsMetadata ResultsMetadata object |
|
46 | 46 | */ |
47 | 47 | public function setTotalTime($totalTime) |
48 | 48 | { |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Set the name of this Numeric Boost |
32 | 32 | * |
33 | - * @param name The string to be the name of this Numeric Boost |
|
34 | - * @return This Numeric Boost |
|
33 | + * @param name string string to be the name of this Numeric Boost |
|
34 | + * @return NumericBoost Numeric Boost |
|
35 | 35 | */ |
36 | 36 | public function setName($name) |
37 | 37 | { |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Set this Numeric Boost to inverted |
52 | 52 | * |
53 | - * @param inverted True if this is to be an iverted Numeric Boost, false otherwise |
|
54 | - * @return This Numeric Boost |
|
53 | + * @param inverted boolean if this is to be an iverted Numeric Boost, false otherwise |
|
54 | + * @return NumericBoost Numeric Boost |
|
55 | 55 | */ |
56 | 56 | public function setInverted($inverted) |
57 | 57 | { |
@@ -71,7 +71,8 @@ discard block |
||
71 | 71 | * Set the strength of this Numeric Boost |
72 | 72 | * |
73 | 73 | * @param double The value to be the strength of this Numeric Boost |
74 | - * @return This Numeric Boost |
|
74 | + * @param double $strength |
|
75 | + * @return NumericBoost Numeric Boost |
|
75 | 76 | */ |
76 | 77 | public function setStrength($strength) |
77 | 78 | { |
@@ -430,6 +430,9 @@ |
||
430 | 430 | array_push($this->customUrlParams, $param); |
431 | 431 | } |
432 | 432 | |
433 | + /** |
|
434 | + * @param string|null $refinementString |
|
435 | + */ |
|
433 | 436 | public function splitRefinements($refinementString) |
434 | 437 | { |
435 | 438 | if (StringUtils::isNotBlank($refinementString)) { |