@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | if (!function_exists('mcrypt_create_iv')) { |
| 43 | 43 | throw new FacebookSDKException( |
| 44 | - static::ERROR_MESSAGE . |
|
| 44 | + static::ERROR_MESSAGE. |
|
| 45 | 45 | 'The function mcrypt_create_iv() does not exist.' |
| 46 | 46 | ); |
| 47 | 47 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | if ($binaryString === false) { |
| 60 | 60 | throw new FacebookSDKException( |
| 61 | - static::ERROR_MESSAGE . |
|
| 61 | + static::ERROR_MESSAGE. |
|
| 62 | 62 | 'mcrypt_create_iv() returned an error.' |
| 63 | 63 | ); |
| 64 | 64 | } |
@@ -42,14 +42,14 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | if (ini_get('open_basedir')) { |
| 44 | 44 | throw new FacebookSDKException( |
| 45 | - static::ERROR_MESSAGE . |
|
| 45 | + static::ERROR_MESSAGE. |
|
| 46 | 46 | 'There is an open_basedir constraint that prevents access to /dev/urandom.' |
| 47 | 47 | ); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | if (!is_readable('/dev/urandom')) { |
| 51 | 51 | throw new FacebookSDKException( |
| 52 | - static::ERROR_MESSAGE . |
|
| 52 | + static::ERROR_MESSAGE. |
|
| 53 | 53 | 'Unable to read from /dev/urandom.' |
| 54 | 54 | ); |
| 55 | 55 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $stream = fopen('/dev/urandom', 'rb'); |
| 66 | 66 | if (!is_resource($stream)) { |
| 67 | 67 | throw new FacebookSDKException( |
| 68 | - static::ERROR_MESSAGE . |
|
| 68 | + static::ERROR_MESSAGE. |
|
| 69 | 69 | 'Unable to open stream to /dev/urandom.' |
| 70 | 70 | ); |
| 71 | 71 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | if (!$binaryString) { |
| 81 | 81 | throw new FacebookSDKException( |
| 82 | - static::ERROR_MESSAGE . |
|
| 82 | + static::ERROR_MESSAGE. |
|
| 83 | 83 | 'Stream to /dev/urandom returned no data.' |
| 84 | 84 | ); |
| 85 | 85 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function makeGraphAchievement() |
| 106 | 106 | { |
| 107 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphAchievement'); |
|
| 107 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphAchievement'); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function makeGraphAlbum() |
| 118 | 118 | { |
| 119 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphAlbum'); |
|
| 119 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphAlbum'); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | */ |
| 129 | 129 | public function makeGraphPage() |
| 130 | 130 | { |
| 131 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphPage'); |
|
| 131 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphPage'); |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function makeGraphSessionInfo() |
| 142 | 142 | { |
| 143 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphSessionInfo'); |
|
| 143 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphSessionInfo'); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function makeGraphUser() |
| 154 | 154 | { |
| 155 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphUser'); |
|
| 155 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphUser'); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | public function makeGraphEvent() |
| 166 | 166 | { |
| 167 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphEvent'); |
|
| 167 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphEvent'); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | public function makeGraphGroup() |
| 178 | 178 | { |
| 179 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphGroup'); |
|
| 179 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphGroup'); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $this->validateResponseCastableAsGraphEdge(); |
| 196 | 196 | |
| 197 | 197 | if ($subclassName && $auto_prefix) { |
| 198 | - $subclassName = static::BASE_GRAPH_OBJECT_PREFIX . $subclassName; |
|
| 198 | + $subclassName = static::BASE_GRAPH_OBJECT_PREFIX.$subclassName; |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | return $this->castAsGraphNodeOrGraphEdge($this->decodedBody, $subclassName); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $metaData = $this->getMetaData($data); |
| 338 | 338 | |
| 339 | 339 | // We'll need to make an edge endpoint for this in case it's a GraphEdge (for cursor pagination) |
| 340 | - $parentGraphEdgeEndpoint = $parentNodeId && $parentKey ? '/' . $parentNodeId . '/' . $parentKey : null; |
|
| 340 | + $parentGraphEdgeEndpoint = $parentNodeId && $parentKey ? '/'.$parentNodeId.'/'.$parentKey : null; |
|
| 341 | 341 | $className = static::BASE_GRAPH_EDGE_CLASS; |
| 342 | 342 | |
| 343 | 343 | return new $className($this->response->getRequest(), $dataList, $metaData, $parentGraphEdgeEndpoint, $subclassName); |
@@ -387,6 +387,6 @@ discard block |
||
| 387 | 387 | return; |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | - throw new FacebookSDKException('The given subclass "' . $subclassName . '" is not valid. Cannot cast to an object that is not a GraphNode subclass.', 620); |
|
| 390 | + throw new FacebookSDKException('The given subclass "'.$subclassName.'" is not valid. Cannot cast to an object that is not a GraphNode subclass.', 620); |
|
| 391 | 391 | } |
| 392 | 392 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | public function makeGraphEvent() |
| 70 | 70 | { |
| 71 | - return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX . 'GraphEvent'); |
|
| 71 | + return $this->makeGraphNode(static::BASE_GRAPH_OBJECT_PREFIX.'GraphEvent'); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -163,13 +163,13 @@ |
||
| 163 | 163 | public function prepareRequestMessage(FacebookRequest $request) |
| 164 | 164 | { |
| 165 | 165 | $postToVideoUrl = $request->containsVideoUploads(); |
| 166 | - $url = $this->getBaseGraphUrl($postToVideoUrl) . $request->getUrl(); |
|
| 166 | + $url = $this->getBaseGraphUrl($postToVideoUrl).$request->getUrl(); |
|
| 167 | 167 | |
| 168 | 168 | // If we're sending files they should be sent as multipart/form-data |
| 169 | 169 | if ($request->containsFileUploads()) { |
| 170 | 170 | $requestBody = $request->getMultipartBody(); |
| 171 | 171 | $request->setHeaders([ |
| 172 | - 'Content-Type' => 'multipart/form-data; boundary=' . $requestBody->getBoundary(), |
|
| 172 | + 'Content-Type' => 'multipart/form-data; boundary='.$requestBody->getBoundary(), |
|
| 173 | 173 | ]); |
| 174 | 174 | } else { |
| 175 | 175 | $requestBody = $request->getUrlEncodedBody(); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $message = new RequestBodyUrlEncoded([ |
| 44 | 44 | 'foo' => 'bar', |
| 45 | - 'faz' => [1,2,3], |
|
| 45 | + 'faz' => [1, 2, 3], |
|
| 46 | 46 | 'targeting' => [ |
| 47 | 47 | 'countries' => 'US,GB', |
| 48 | 48 | 'age_min' => 13, |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | public function testWillIgnoreProxyHeaders() |
| 74 | 74 | { |
| 75 | - $response = new GraphRawResponse($this->fakeRawProxyHeader . $this->fakeRawHeader, ''); |
|
| 75 | + $response = new GraphRawResponse($this->fakeRawProxyHeader.$this->fakeRawHeader, ''); |
|
| 76 | 76 | $headers = $response->getHeaders(); |
| 77 | 77 | $httpResponseCode = $response->getHttpResponseCode(); |
| 78 | 78 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function testCanProperlyEncodeFilesAndParams() |
| 49 | 49 | { |
| 50 | - $file = new FacebookFile(__DIR__ . '/../foo.txt'); |
|
| 50 | + $file = new FacebookFile(__DIR__.'/../foo.txt'); |
|
| 51 | 51 | $message = new RequestBodyMultipart([ |
| 52 | 52 | 'foo' => 'bar', |
| 53 | 53 | ], [ |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $message = new RequestBodyMultipart([ |
| 71 | 71 | 'foo' => 'bar', |
| 72 | - 'faz' => [1,2,3], |
|
| 72 | + 'faz' => [1, 2, 3], |
|
| 73 | 73 | 'targeting' => [ |
| 74 | 74 | 'countries' => 'US,GB', |
| 75 | 75 | 'age_min' => 13, |
@@ -125,14 +125,14 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $getUrl = $getRequest->getUrl(); |
| 127 | 127 | $expectedParams = 'foo=bar&access_token=foo_token&appsecret_proof=df4256903ba4e23636cc142117aa632133d75c642bd2a68955be1443bd14deb9'; |
| 128 | - $expectedUrl = '/' . Facebook::DEFAULT_GRAPH_VERSION . '/foo?' . $expectedParams; |
|
| 128 | + $expectedUrl = '/'.Facebook::DEFAULT_GRAPH_VERSION.'/foo?'.$expectedParams; |
|
| 129 | 129 | |
| 130 | 130 | $this->assertEquals($expectedUrl, $getUrl); |
| 131 | 131 | |
| 132 | 132 | $postRequest = new FacebookRequest($app, 'foo_token', 'POST', '/bar', ['foo' => 'bar']); |
| 133 | 133 | |
| 134 | 134 | $postUrl = $postRequest->getUrl(); |
| 135 | - $expectedUrl = '/' . Facebook::DEFAULT_GRAPH_VERSION . '/bar'; |
|
| 135 | + $expectedUrl = '/'.Facebook::DEFAULT_GRAPH_VERSION.'/bar'; |
|
| 136 | 136 | |
| 137 | 137 | $this->assertEquals($expectedUrl, $postUrl); |
| 138 | 138 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $url = $request->getUrl(); |
| 157 | 157 | |
| 158 | 158 | $expectedParams = 'bar=baz&access_token=foo_token&appsecret_proof=df4256903ba4e23636cc142117aa632133d75c642bd2a68955be1443bd14deb9'; |
| 159 | - $expectedUrl = '/' . Facebook::DEFAULT_GRAPH_VERSION . '/foo?' . $expectedParams; |
|
| 159 | + $expectedUrl = '/'.Facebook::DEFAULT_GRAPH_VERSION.'/foo?'.$expectedParams; |
|
| 160 | 160 | $this->assertEquals($expectedUrl, $url); |
| 161 | 161 | |
| 162 | 162 | $params = $request->getParams(); |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | public function testAFileCanBeAddedToParams() |
| 173 | 173 | { |
| 174 | - $myFile = new FacebookFile(__DIR__ . '/foo.txt'); |
|
| 174 | + $myFile = new FacebookFile(__DIR__.'/foo.txt'); |
|
| 175 | 175 | $params = [ |
| 176 | 176 | 'name' => 'Foo Bar', |
| 177 | 177 | 'source' => $myFile, |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | public function testAVideoCanBeAddedToParams() |
| 191 | 191 | { |
| 192 | - $myFile = new FacebookVideo(__DIR__ . '/foo.txt'); |
|
| 192 | + $myFile = new FacebookVideo(__DIR__.'/foo.txt'); |
|
| 193 | 193 | $params = [ |
| 194 | 194 | 'name' => 'Foo Bar', |
| 195 | 195 | 'source' => $myFile, |