@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | public function getBody() |
26 | 26 | { |
27 | - return json_decode((string)$this->response->getBody()); |
|
27 | + return json_decode((string) $this->response->getBody()); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function wasSuccessful() |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $stack->push( |
38 | 38 | Middleware::mapRequest( |
39 | - function (RequestInterface $request) use ($apikey) { |
|
39 | + function(RequestInterface $request) use ($apikey) { |
|
40 | 40 | return $request->withUri( |
41 | 41 | Uri::withQueryValue( |
42 | 42 | $request->getUri(), 'apikey', $apikey |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | ); |
48 | 48 | |
49 | 49 | $stack->push(Middleware::mapResponse( |
50 | - function (ResponseInterface $response) { |
|
50 | + function(ResponseInterface $response) { |
|
51 | 51 | |
52 | 52 | try { |
53 | - $body = json_decode((string)$response->getBody(), true); |
|
53 | + $body = json_decode((string) $response->getBody(), true); |
|
54 | 54 | } catch (\Exception $error) { |
55 | 55 | throw new ElasticEmailException('Unable to decode JSON response.'); |
56 | 56 | } |
@@ -4,8 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use ElasticEmail\Client; |
6 | 6 | use ElasticEmail\ElasticEmailException; |
7 | -use Tests\TestCase; |
|
8 | -use TypeError; |
|
9 | 7 | |
10 | 8 | class ClientTest extends UnitTestCase |
11 | 9 | { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $client = new Client('api_key'); |
16 | 16 | |
17 | - $actualBaseUri = (string)$client->getConfig('base_uri'); |
|
17 | + $actualBaseUri = (string) $client->getConfig('base_uri'); |
|
18 | 18 | |
19 | 19 | $this->assertEquals(Client::$baseUri, $actualBaseUri); |
20 | 20 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
16 | - $dotenv = Dotenv::createImmutable(__DIR__ . '/../..'); |
|
16 | + $dotenv = Dotenv::createImmutable(__DIR__.'/../..'); |
|
17 | 17 | $dotenv->load(); |
18 | 18 | } |
19 | 19 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $status = new Status($client); |
16 | 16 | |
17 | 17 | $actual = $status->request('message-id')->getBody(); |
18 | - $expected = (object)['success' => true, 'data' => 'mocked-data']; |
|
18 | + $expected = (object) ['success' => true, 'data' => 'mocked-data']; |
|
19 | 19 | |
20 | 20 | $this->assertEquals($expected, $actual); |
21 | 21 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | /** @var Request $request */ |
48 | 48 | $request = $container[0]['request']; |
49 | 49 | |
50 | - $actual = (string)$request->getBody(); |
|
50 | + $actual = (string) $request->getBody(); |
|
51 | 51 | $expected = http_build_query($expected); |
52 | 52 | $this->assertSame($expected, $actual); |
53 | 53 | } |