@@ -4,8 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Nekland\PlacesApi\Api\Search; |
6 | 6 | use PhpSpec\ObjectBehavior; |
7 | -use Prophecy\Argument; |
|
8 | -use Symfony\Bridge\Twig\Tests\Node\SearchAndRenderBlockNodeTest; |
|
9 | 7 | |
10 | 8 | class SearchIteratorSpec extends ObjectBehavior |
11 | 9 | { |
@@ -153,7 +153,7 @@ |
||
153 | 153 | public function getMatchers() |
154 | 154 | { |
155 | 155 | return [ |
156 | - 'containsResult' => function ($subject) { |
|
156 | + 'containsResult' => function($subject) { |
|
157 | 157 | return !empty($subject['results']); |
158 | 158 | } |
159 | 159 | ]; |
@@ -145,7 +145,7 @@ |
||
145 | 145 | public function getMatchers() |
146 | 146 | { |
147 | 147 | return [ |
148 | - 'containsPlaceId' => function ($subject, $param) { |
|
148 | + 'containsPlaceId' => function($subject, $param) { |
|
149 | 149 | return isset($subject[0]) && $subject[0]['place_id'] == $param; |
150 | 150 | } |
151 | 151 | ]; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | $this->httpClient = $this->prophesize('Nekland\BaseApi\Http\AbstractHttpClient'); |
27 | 27 | |
28 | - $this->httpClient->send(Argument::that(function ($arg) { |
|
28 | + $this->httpClient->send(Argument::that(function($arg) { |
|
29 | 29 | if (!$arg instanceof Request) { |
30 | 30 | return false; |
31 | 31 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | $iterator = $this->searchApi->getSearchIterator('12,23', '100'); |
47 | 47 | |
48 | - foreach($iterator as $key => $value) { |
|
48 | + foreach ($iterator as $key => $value) { |
|
49 | 49 | if ($key === 0 && $value['results'][0]['id'] !== 'foobaz') { |
50 | 50 | throw new \Exception('Test fails: the first page is not what it should looks like.'); |
51 | 51 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | $result = $this->get(self::URL, $body); |
28 | 28 | |
29 | - switch($result['status']) { |
|
29 | + switch ($result['status']) { |
|
30 | 30 | case 'OK': |
31 | 31 | return $result['predictions']; |
32 | 32 |