Completed
Pull Request — develop (#25)
by
unknown
04:17 queued 02:14
created
src/API/AbstractBridge.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Exception;
6 6
 use GroupByInc\API\Util\SerializerFactory;
7
-use GroupByInc\API\Util\UriBuilder;
8 7
 use Httpful\Mime;
9 8
 use Httpful\Request;
10 9
 use Httpful\Response;
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/API/Query.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use GroupByInc\API\Request\RefinementsRequest;
17 17
 use GroupByInc\API\Request\Request;
18 18
 use GroupByInc\API\Request\RestrictNavigation;
19
-use GroupByInc\API\Request\SelectedRefinement;
20 19
 use GroupByInc\API\Request\SelectedRefinementRange;
21 20
 use GroupByInc\API\Request\SelectedRefinementValue;
22 21
 use GroupByInc\API\Request\Sort as RSort;
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -428,6 +428,9 @@  discard block
 block discarded – undo
428 428
     array_push($this->customUrlParams, $param);
429 429
   }
430 430
 
431
+  /**
432
+   * @param string|null $refinementString
433
+   */
431 434
   public function splitRefinements($refinementString)
432 435
   {
433 436
     if (StringUtils::isNotBlank($refinementString)) {
@@ -875,7 +878,7 @@  discard block
 block discarded – undo
875 878
   /**
876 879
    * @param MBias $bias
877 880
    *
878
-   * @return Bias
881
+   * @return MBias
879 882
    */
880 883
   protected static function convertBias($bias)
881 884
   {
Please login to merge, or discard this patch.
src/API/Url/UrlBeautifier.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use GroupByInc\API\Model\Navigation;
6 6
 use GroupByInc\API\Model\Refinement\Type;
7
-use GroupByInc\API\Model\SelectedRefinement;
8 7
 use GroupByInc\API\Model\SelectedRefinementValue;
9 8
 use GroupByInc\API\Query;
10 9
 use GroupByInc\API\Symbol;
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -342,6 +342,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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];
Please login to merge, or discard this patch.
src/API/Url/UrlReplacement.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
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
   {
Please login to merge, or discard this patch.
src/API/Util/StringBuilder.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -71,6 +71,10 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/API/Url/UrlReplacementRule.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace GroupByInc\API\Url;
4 4
 
5
-use GroupByInc\API\Model\SelectedRefinement;
6 5
 use GroupByInc\API\Util\StringBuilder;
7 6
 
8 7
 class UrlReplacementRule
Please login to merge, or discard this patch.
tests/API/Expectation/Object.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 use GroupByInc\API\Model\RichContentZone;
19 19
 use GroupByInc\API\Model\Sort;
20 20
 use GroupByInc\API\Model\Template;
21
-use GroupByInc\API\Model\Zone;
22 21
 use GroupByInc\API\Request\Bias;
23 22
 use GroupByInc\API\Request\Bias\Strength;
24 23
 use GroupByInc\API\Request\Biasing;
Please login to merge, or discard this patch.
tests/API/Url/UrlBeautifierTest.php 1 patch
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
tests/API/Url/UrlReplacementTest.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -121,6 +121,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.