Passed
Push — master ( 314ee7...e7a650 )
by Radosław
02:20
created
examples/bing.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 require_once(__DIR__ . '/../vendor/autoload.php');
4 4
 
5
-use GuzzleHttp\Client as GuzzleClient;
6
-use Radowoj\Searcher\SearchProvider\Bing;
7
-use Radowoj\Searcher\Searcher;
5
+use GuzzleHttp\Client as GuzzleClient;
6
+use Radowoj\Searcher\SearchProvider\Bing;
7
+use Radowoj\Searcher\Searcher;
8 8
 use Radowoj\Searcher\Exceptions\Exception;
9 9
 
10 10
 $config = require_once('config.php');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     var_dump(($results[5])->toArray());
30 30
 
31 31
     //Traversable
32
-    foreach($results as $result){
32
+    foreach ($results as $result) {
33 33
         var_dump($result->toArray());
34 34
     }
35 35
 
Please login to merge, or discard this patch.
src/SearchProvider/Bing.php 2 patches
Unused Use Statements   +7 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,18 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace Radowoj\Searcher\SearchProvider;
4 4
 
5
-use stdClass;
6
-
7
-use GuzzleHttp\Client as GuzzleClient;
8
-use GuzzleHttp\Psr7\Response as GuzzleResponse;
9
-
10
-use Radowoj\Searcher\SearchResult\Collection;
11
-use Radowoj\Searcher\SearchResult\ICollection;
12
-use Radowoj\Searcher\SearchResult\Item;
13
-use Radowoj\Searcher\SearchResult\IItem;
14
-
15
-use Radowoj\Searcher\Exceptions\Exception;
16
-use Radowoj\Searcher\Exceptions\QuotaExceededException;
5
+use stdClass;
6
+use GuzzleHttp\Client as GuzzleClient;
7
+use GuzzleHttp\Psr7\Response as GuzzleResponse;
8
+use Radowoj\Searcher\SearchResult\Item;
9
+use Radowoj\Searcher\SearchResult\IItem;
10
+use Radowoj\Searcher\Exceptions\Exception;
11
+use Radowoj\Searcher\Exceptions\QuotaExceededException;
17 12
 use Radowoj\Searcher\Exceptions\RateLimitExceededException;
18 13
 
19 14
 class Bing extends SearchProvider implements ISearchProvider
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     protected function handleErrorResponse(GuzzleResponse $result)
72 72
     {
73
-        switch($result->getStatusCode()) {
73
+        switch ($result->getStatusCode()) {
74 74
             case 403:   //Out of call volume quota
75 75
                 throw new QuotaExceededException($result->getReasonPhrase());
76 76
             case 429:   //Rate limit is exceeded
Please login to merge, or discard this patch.