Passed
Push — master ( bbe808...4a0efd )
by Radosław
02:19
created
examples/bing.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 var_dump(($results[5])->toArray());
28 28
 
29 29
 //Traversable
30
-foreach($results as $result){
30
+foreach ($results as $result) {
31 31
     var_dump($result->toArray());
32 32
 }
33 33
 
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 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;
5
+use GuzzleHttp\Client as GuzzleClient;
6
+use Radowoj\Searcher\SearchProvider\Bing;
7 7
 use Radowoj\Searcher\Searcher;
8 8
 
9 9
 $config = require_once('config.php');
Please login to merge, or discard this patch.
tests/SearchProvider/BingTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     protected function getResponseMock($returnValue = null)
41 41
     {
42 42
         if (is_null($returnValue)) {
43
-            $returnValue = (object)[
43
+            $returnValue = (object) [
44 44
                 'webPages' => [
45 45
                     'value' => [],
46 46
                     'totalEstimatedMatches' => 0,
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $guzzleMock = $this->guzzleMockBuilder->setMethods(['request'])->getMock();
96 96
 
97
-        $responseMock = $this->getResponseMock((object)[]);
97
+        $responseMock = $this->getResponseMock((object) []);
98 98
 
99 99
         $guzzleMock->expects($this->once())
100 100
             ->method('request')
Please login to merge, or discard this patch.
src/SearchResult/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     public function __construct(array $items = [], int $totalMatches = 0)
21 21
     {
22
-        foreach($items as $item) {
22
+        foreach ($items as $item) {
23 23
             if (!$item instanceof IItem) {
24 24
                 throw new InvalidArgumentException('Given items must implement Radowoj\Searcher\SearchResult\IItem interface');
25 25
             }
Please login to merge, or discard this patch.
tests/SearchResult/ItemTest.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Radowoj\Searcher\SearchResult;
4 4
 
5
-use PHPUnit\Framework\TestCase;
6
-use Radowoj\Searcher\SearchResult\Item;
5
+use PHPUnit\Framework\TestCase;
6
+use Radowoj\Searcher\SearchResult\Item;
7 7
 use Radowoj\Searcher\SearchResult\IItem;
8 8
 
9 9
 class ItemTest extends TestCase
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         $url = 'http://example.com';
35 35
         $item = new Item(['url' => $url]);
36
-        $this->assertSame($url, (string)$item);
36
+        $this->assertSame($url, (string) $item);
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
src/SearchResult/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     protected function fromArray(array $data)
22 22
     {
23
-        foreach($data as $key => $value) {
23
+        foreach ($data as $key => $value) {
24 24
             if (!property_exists($this, $key)) {
25 25
                 throw new InvalidArgumentException("Invalid search result item property: {$key}");
26 26
             }
Please login to merge, or discard this patch.