@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public function __construct() |
41 | 41 | { |
42 | 42 | if (!function_exists('openssl_random_pseudo_bytes')) { |
43 | - throw new FacebookSDKException(static::ERROR_MESSAGE . 'The function openssl_random_pseudo_bytes() does not exist.'); |
|
43 | + throw new FacebookSDKException(static::ERROR_MESSAGE.'The function openssl_random_pseudo_bytes() does not exist.'); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | $binaryString = openssl_random_pseudo_bytes($length, $wasCryptographicallyStrong); |
56 | 56 | |
57 | 57 | if ($binaryString === false) { |
58 | - throw new FacebookSDKException(static::ERROR_MESSAGE . 'openssl_random_pseudo_bytes() returned an unknown error.'); |
|
58 | + throw new FacebookSDKException(static::ERROR_MESSAGE.'openssl_random_pseudo_bytes() returned an unknown error.'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | if ($wasCryptographicallyStrong !== true) { |
62 | - throw new FacebookSDKException(static::ERROR_MESSAGE . 'openssl_random_pseudo_bytes() returned a pseudo-random string but it was not cryptographically secure and cannot be used.'); |
|
62 | + throw new FacebookSDKException(static::ERROR_MESSAGE.'openssl_random_pseudo_bytes() returned a pseudo-random string but it was not cryptographically secure and cannot be used.'); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $this->binToHex($binaryString, $length); |
@@ -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(); |
@@ -213,7 +213,7 @@ |
||
213 | 213 | /** |
214 | 214 | * Returns the exception that was thrown for this request. |
215 | 215 | * |
216 | - * @return FacebookResponseException|null |
|
216 | + * @return FacebookSDKException |
|
217 | 217 | */ |
218 | 218 | public function getThrownException() |
219 | 219 | { |