@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $this->guzzleMock |
59 | 59 | ->shouldReceive('createRequest') |
60 | 60 | ->once() |
61 | - ->with('GET', 'http://foo.com/', m::on(function ($arg) { |
|
61 | + ->with('GET', 'http://foo.com/', m::on(function($arg) { |
|
62 | 62 | |
63 | 63 | // array_diff_assoc() will sometimes trigger error on child-arrays |
64 | 64 | if (['X-foo' => 'bar'] !== $arg['headers']) { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->guzzleMock |
108 | 108 | ->shouldReceive('createRequest') |
109 | 109 | ->once() |
110 | - ->with('GET', 'http://foo.com/', m::on(function ($arg) { |
|
110 | + ->with('GET', 'http://foo.com/', m::on(function($arg) { |
|
111 | 111 | |
112 | 112 | // array_diff_assoc() will sometimes trigger error on child-arrays |
113 | 113 | if ([] !== $arg['headers']) { |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $this->streamMock |
60 | 60 | ->shouldReceive('streamContextCreate') |
61 | 61 | ->once() |
62 | - ->with(m::on(function ($arg) { |
|
62 | + ->with(m::on(function($arg) { |
|
63 | 63 | if (!isset($arg['http']) || !isset($arg['ssl'])) { |
64 | 64 | return false; |
65 | 65 | } |
@@ -55,16 +55,16 @@ |
||
55 | 55 | public function httpClientsProvider() |
56 | 56 | { |
57 | 57 | $clients = [ |
58 | - ['guzzle', self::COMMON_NAMESPACE . 'FacebookGuzzleHttpClient'], |
|
59 | - ['stream', self::COMMON_NAMESPACE . 'FacebookStreamHttpClient'], |
|
60 | - [new Client(), self::COMMON_NAMESPACE . 'FacebookGuzzleHttpClient'], |
|
61 | - [new FacebookGuzzleHttpClient(), self::COMMON_NAMESPACE . 'FacebookGuzzleHttpClient'], |
|
62 | - [new FacebookStreamHttpClient(), self::COMMON_NAMESPACE . 'FacebookStreamHttpClient'], |
|
58 | + ['guzzle', self::COMMON_NAMESPACE.'FacebookGuzzleHttpClient'], |
|
59 | + ['stream', self::COMMON_NAMESPACE.'FacebookStreamHttpClient'], |
|
60 | + [new Client(), self::COMMON_NAMESPACE.'FacebookGuzzleHttpClient'], |
|
61 | + [new FacebookGuzzleHttpClient(), self::COMMON_NAMESPACE.'FacebookGuzzleHttpClient'], |
|
62 | + [new FacebookStreamHttpClient(), self::COMMON_NAMESPACE.'FacebookStreamHttpClient'], |
|
63 | 63 | [null, self::COMMON_INTERFACE], |
64 | 64 | ]; |
65 | 65 | if (extension_loaded('curl')) { |
66 | - $clients[] = ['curl', self::COMMON_NAMESPACE . 'FacebookCurlHttpClient']; |
|
67 | - $clients[] = [new FacebookCurlHttpClient(), self::COMMON_NAMESPACE . 'FacebookCurlHttpClient']; |
|
66 | + $clients[] = ['curl', self::COMMON_NAMESPACE.'FacebookCurlHttpClient']; |
|
67 | + $clients[] = [new FacebookCurlHttpClient(), self::COMMON_NAMESPACE.'FacebookCurlHttpClient']; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return $clients; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $srTwo = new SignedRequest($this->app, $rawSignedRequest); |
60 | 60 | $payload = $srTwo->getPayload(); |
61 | 61 | |
62 | - $expectedRawSignedRequest = $this->rawSignature . '.' . $this->rawPayload; |
|
62 | + $expectedRawSignedRequest = $this->rawSignature.'.'.$this->rawPayload; |
|
63 | 63 | $this->assertEquals($expectedRawSignedRequest, $rawSignedRequest); |
64 | 64 | $this->assertEquals($this->payloadData, $payload); |
65 | 65 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function testAnImproperlyEncodedSignatureWillThrowAnException() |
95 | 95 | { |
96 | - new SignedRequest($this->app, 'foo_sig.' . $this->rawPayload); |
|
96 | + new SignedRequest($this->app, 'foo_sig.'.$this->rawPayload); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function testAnImproperlyEncodedPayloadWillThrowAnException() |
103 | 103 | { |
104 | - new SignedRequest($this->app, $this->rawSignature . '.foo_payload'); |
|
104 | + new SignedRequest($this->app, $this->rawSignature.'.foo_payload'); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | public function testAsRawSignedRequestCanBeValidatedAndDecoded() |
122 | 122 | { |
123 | - $rawSignedRequest = $this->rawSignature . '.' . $this->rawPayload; |
|
123 | + $rawSignedRequest = $this->rawSignature.'.'.$this->rawPayload; |
|
124 | 124 | $sr = new SignedRequest($this->app, $rawSignedRequest); |
125 | 125 | |
126 | 126 | $this->assertEquals($this->payloadData, $sr->getPayload()); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | public function testARawSignedRequestCanBeValidatedAndDecoded() |
130 | 130 | { |
131 | - $rawSignedRequest = $this->rawSignature . '.' . $this->rawPayload; |
|
131 | + $rawSignedRequest = $this->rawSignature.'.'.$this->rawPayload; |
|
132 | 132 | $sr = new SignedRequest($this->app, $rawSignedRequest); |
133 | 133 | |
134 | 134 | $this->assertEquals($sr->getPayload(), $this->payloadData); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $accessToken = $fb->getDefaultAccessToken(); |
208 | 208 | |
209 | 209 | $this->assertInstanceOf('Facebook\Authentication\AccessToken', $accessToken); |
210 | - $this->assertEquals('foo_token', (string)$accessToken); |
|
210 | + $this->assertEquals('foo_token', (string) $accessToken); |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | public function testAnAccessTokenCanBeSetAsAnAccessTokenEntity() |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $accessToken = $fb->getDefaultAccessToken(); |
218 | 218 | |
219 | 219 | $this->assertInstanceOf('Facebook\Authentication\AccessToken', $accessToken); |
220 | - $this->assertEquals('bar_token', (string)$accessToken); |
|
220 | + $this->assertEquals('bar_token', (string) $accessToken); |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $request = $fb->request('FOO_VERB', '/foo'); |
318 | 318 | $this->assertEquals('1337', $request->getApp()->getId()); |
319 | 319 | $this->assertEquals('foo_secret', $request->getApp()->getSecret()); |
320 | - $this->assertEquals('foo_token', (string)$request->getAccessToken()); |
|
320 | + $this->assertEquals('foo_token', (string) $request->getAccessToken()); |
|
321 | 321 | $this->assertEquals('v1337', $request->getGraphVersion()); |
322 | 322 | $this->assertEquals( |
323 | 323 | FacebookClient::BASE_GRAPH_URL_BETA, |
@@ -53,14 +53,14 @@ |
||
53 | 53 | public function persistentDataHandlerProviders() |
54 | 54 | { |
55 | 55 | $handlers = [ |
56 | - ['memory', self::COMMON_NAMESPACE . 'FacebookMemoryPersistentDataHandler'], |
|
57 | - [new FacebookMemoryPersistentDataHandler(), self::COMMON_NAMESPACE . 'FacebookMemoryPersistentDataHandler'], |
|
58 | - [new FacebookSessionPersistentDataHandler(false), self::COMMON_NAMESPACE . 'FacebookSessionPersistentDataHandler'], |
|
56 | + ['memory', self::COMMON_NAMESPACE.'FacebookMemoryPersistentDataHandler'], |
|
57 | + [new FacebookMemoryPersistentDataHandler(), self::COMMON_NAMESPACE.'FacebookMemoryPersistentDataHandler'], |
|
58 | + [new FacebookSessionPersistentDataHandler(false), self::COMMON_NAMESPACE.'FacebookSessionPersistentDataHandler'], |
|
59 | 59 | [null, self::COMMON_INTERFACE], |
60 | 60 | ]; |
61 | 61 | |
62 | 62 | if (session_status() === PHP_SESSION_ACTIVE) { |
63 | - $handlers[] = ['session', self::COMMON_NAMESPACE . 'FacebookSessionPersistentDataHandler']; |
|
63 | + $handlers[] = ['session', self::COMMON_NAMESPACE.'FacebookSessionPersistentDataHandler']; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | return $handlers; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | public function setUp() |
33 | 33 | { |
34 | - $this->testFile = __DIR__ . '/../foo.txt'; |
|
34 | + $this->testFile = __DIR__.'/../foo.txt'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function testCanOpenAndReadAndCloseAFile() |
@@ -57,13 +57,13 @@ |
||
57 | 57 | [null, self::COMMON_INTERFACE], |
58 | 58 | ]; |
59 | 59 | if (function_exists('mcrypt_create_iv')) { |
60 | - $providers[] = ['mcrypt', self::COMMON_NAMESPACE . 'McryptPseudoRandomStringGenerator']; |
|
60 | + $providers[] = ['mcrypt', self::COMMON_NAMESPACE.'McryptPseudoRandomStringGenerator']; |
|
61 | 61 | } |
62 | 62 | if (function_exists('openssl_random_pseudo_bytes')) { |
63 | - $providers[] = ['openssl', self::COMMON_NAMESPACE . 'OpenSslPseudoRandomStringGenerator']; |
|
63 | + $providers[] = ['openssl', self::COMMON_NAMESPACE.'OpenSslPseudoRandomStringGenerator']; |
|
64 | 64 | } |
65 | 65 | if (!ini_get('open_basedir') && is_readable('/dev/urandom')) { |
66 | - $providers[] = ['urandom', self::COMMON_NAMESPACE . 'UrandomPseudoRandomStringGenerator']; |
|
66 | + $providers[] = ['urandom', self::COMMON_NAMESPACE.'UrandomPseudoRandomStringGenerator']; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | return $providers; |
@@ -175,11 +175,11 @@ discard block |
||
175 | 175 | $fbRequests = [ |
176 | 176 | new FacebookRequest($this->fbApp, 'token', 'POST', '/photo', [ |
177 | 177 | 'message' => 'foobar', |
178 | - 'source' => new FacebookFile(__DIR__ . '/foo.txt'), |
|
178 | + 'source' => new FacebookFile(__DIR__.'/foo.txt'), |
|
179 | 179 | ]), |
180 | 180 | new FacebookRequest($this->fbApp, 'token', 'POST', '/video', [ |
181 | 181 | 'message' => 'foobar', |
182 | - 'source' => new FacebookVideo(__DIR__ . '/foo.txt'), |
|
182 | + 'source' => new FacebookVideo(__DIR__.'/foo.txt'), |
|
183 | 183 | ]), |
184 | 184 | ]; |
185 | 185 | $fbBatchRequest = new FacebookBatchRequest($this->fbApp, $fbRequests); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | list($url, $method, $headers, $body) = $this->fbClient->prepareRequestMessage($fbBatchRequest); |
189 | 189 | |
190 | - $this->assertEquals(FacebookClient::BASE_GRAPH_VIDEO_URL . '/' . Facebook::DEFAULT_GRAPH_VERSION, $url); |
|
190 | + $this->assertEquals(FacebookClient::BASE_GRAPH_VIDEO_URL.'/'.Facebook::DEFAULT_GRAPH_VERSION, $url); |
|
191 | 191 | $this->assertEquals('POST', $method); |
192 | 192 | $this->assertContains('multipart/form-data; boundary=', $headers['Content-Type']); |
193 | 193 | $this->assertContains('Content-Disposition: form-data; name="batch"', $body); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | public function testARequestWithFilesWillBeMultipart() |
211 | 211 | { |
212 | - $myFile = new FacebookFile(__DIR__ . '/foo.txt'); |
|
212 | + $myFile = new FacebookFile(__DIR__.'/foo.txt'); |
|
213 | 213 | $fbRequest = new FacebookRequest($this->fbApp, 'token', 'POST', '/foo', ['file' => $myFile]); |
214 | 214 | $response = $this->fbClient->sendRequest($fbRequest); |
215 | 215 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $this->initializeTestApp(); |
235 | 235 | |
236 | 236 | // Create a test user |
237 | - $testUserPath = '/' . FacebookTestCredentials::$appId . '/accounts/test-users'; |
|
237 | + $testUserPath = '/'.FacebookTestCredentials::$appId.'/accounts/test-users'; |
|
238 | 238 | $params = [ |
239 | 239 | 'installed' => true, |
240 | 240 | 'name' => 'Foo Phpunit User', |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | static::$testFacebookApp, |
273 | 273 | static::$testFacebookApp->getAccessToken(), |
274 | 274 | 'DELETE', |
275 | - '/' . $testUserId |
|
275 | + '/'.$testUserId |
|
276 | 276 | ); |
277 | 277 | $graphNode = static::$testFacebookClient->sendRequest($request)->getGraphNode(); |
278 | 278 | |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | |
282 | 282 | public function initializeTestApp() |
283 | 283 | { |
284 | - if (!file_exists(__DIR__ . '/FacebookTestCredentials.php')) { |
|
284 | + if (!file_exists(__DIR__.'/FacebookTestCredentials.php')) { |
|
285 | 285 | throw new FacebookSDKException( |
286 | 286 | 'You must create a FacebookTestCredentials.php file from FacebookTestCredentials.php.dist' |
287 | 287 | ); |