Skip to content

Commit 8875d3c

Browse files
authored
Merge pull request facebookarchive#888 from Nyholm/prefix
Removed "Facebook" prefix form all classes
2 parents 7113c44 + 0c9d3f0 commit 8875d3c

File tree

151 files changed

+1851
-2020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1851
-2020
lines changed

.php_cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
return PhpCsFixer\Config::create()
4+
->setRiskyAllowed(false)
5+
->setRules([
6+
'@Symfony' => false,
7+
'align_multiline_comment' => true,
8+
'combine_consecutive_unsets' => true,
9+
// one should use PHPUnit methods to set up expected exception instead of annotations
10+
'heredoc_to_nowdoc' => true,
11+
'no_null_property_initialization' => true,
12+
'no_useless_else' => true,
13+
'phpdoc_add_missing_param_annotation' => true,
14+
'phpdoc_order' => true,
15+
'phpdoc_types_order' => true,
16+
'phpdoc_align' => true,
17+
'phpdoc_indent' => true,
18+
'phpdoc_inline_tag' => true,
19+
'phpdoc_order' => true,
20+
'phpdoc_scalar' => true,
21+
'phpdoc_separation' => true,
22+
'phpdoc_summary' => true,
23+
'phpdoc_trim' => true,
24+
'phpdoc_types' => true,
25+
'phpdoc_var_without_name' => true,
26+
'phpdoc_annotation_without_dot' => true,
27+
'no_empty_comment' => true,
28+
'no_trailing_whitespace_in_comment' => true,
29+
])
30+
;

docs/examples/access_token_from_canvas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ $helper = $fb->getCanvasHelper();
1717

1818
try {
1919
$accessToken = $helper->getAccessToken();
20-
} catch(Facebook\Exception\FacebookResponseException $e) {
20+
} catch(Facebook\Exception\ResponseException $e) {
2121
// When Graph returns an error
2222
echo 'Graph returned an error: ' . $e->getMessage();
2323
exit;
24-
} catch(Facebook\Exception\FacebookSDKException $e) {
24+
} catch(Facebook\Exception\SDKException $e) {
2525
// When validation fails or other local issues
2626
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2727
exit;

docs/examples/access_token_from_javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ $helper = $fb->getJavaScriptHelper();
5959

6060
try {
6161
$accessToken = $helper->getAccessToken();
62-
} catch(Facebook\Exception\FacebookResponseException $e) {
62+
} catch(Facebook\Exception\ResponseException $e) {
6363
// When Graph returns an error
6464
echo 'Graph returned an error: ' . $e->getMessage();
6565
exit;
66-
} catch(Facebook\Exception\FacebookSDKException $e) {
66+
} catch(Facebook\Exception\SDKException $e) {
6767
// When validation fails or other local issues
6868
echo 'Facebook SDK returned an error: ' . $e->getMessage();
6969
exit;

docs/examples/access_token_from_page_tab.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ $helper = $fb->getPageTabHelper();
1717

1818
try {
1919
$accessToken = $helper->getAccessToken();
20-
} catch(Facebook\Exception\FacebookResponseException $e) {
20+
} catch(Facebook\Exception\ResponseException $e) {
2121
// When Graph returns an error
2222
echo 'Graph returned an error: ' . $e->getMessage();
2323
exit;
24-
} catch(Facebook\Exception\FacebookSDKException $e) {
24+
} catch(Facebook\Exception\SDKException $e) {
2525
// When validation fails or other local issues
2626
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2727
exit;

docs/examples/batch_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ echo '<h1>Make a batch request</h1>' . "\n\n";
5252

5353
try {
5454
$responses = $fb->sendBatchRequest($batch);
55-
} catch(Facebook\Exception\FacebookResponseException $e) {
55+
} catch(Facebook\Exception\ResponseException $e) {
5656
// When Graph returns an error
5757
echo 'Graph returned an error: ' . $e->getMessage();
5858
exit;
59-
} catch(Facebook\Exception\FacebookSDKException $e) {
59+
} catch(Facebook\Exception\SDKException $e) {
6060
// When validation fails or other local issues
6161
echo 'Facebook SDK returned an error: ' . $e->getMessage();
6262
exit;
@@ -118,11 +118,11 @@ $batch = [
118118

119119
try {
120120
$responses = $fb->sendBatchRequest($batch);
121-
} catch(Facebook\Exception\FacebookResponseException $e) {
121+
} catch(Facebook\Exception\ResponseException $e) {
122122
// When Graph returns an error
123123
echo 'Graph returned an error: ' . $e->getMessage();
124124
exit;
125-
} catch(Facebook\Exception\FacebookSDKException $e) {
125+
} catch(Facebook\Exception\SDKException $e) {
126126
// When validation fails or other local issues
127127
echo 'Facebook SDK returned an error: ' . $e->getMessage();
128128
exit;

docs/examples/batch_upload.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ $batch = [
3737

3838
try {
3939
$responses = $fb->sendBatchRequest($batch);
40-
} catch(Facebook\Exception\FacebookResponseException $e) {
40+
} catch(Facebook\Exception\ResponseException $e) {
4141
// When Graph returns an error
4242
echo 'Graph returned an error: ' . $e->getMessage();
4343
exit;
44-
} catch(Facebook\Exception\FacebookSDKException $e) {
44+
} catch(Facebook\Exception\SDKException $e) {
4545
// When validation fails or other local issues
4646
echo 'Facebook SDK returned an error: ' . $e->getMessage();
4747
exit;

docs/examples/facebook_login.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ $helper = $fb->getRedirectLoginHelper();
3838

3939
try {
4040
$accessToken = $helper->getAccessToken();
41-
} catch(Facebook\Exception\FacebookResponseException $e) {
41+
} catch(Facebook\Exception\ResponseException $e) {
4242
// When Graph returns an error
4343
echo 'Graph returned an error: ' . $e->getMessage();
4444
exit;
45-
} catch(Facebook\Exception\FacebookSDKException $e) {
45+
} catch(Facebook\Exception\SDKException $e) {
4646
// When validation fails or other local issues
4747
echo 'Facebook SDK returned an error: ' . $e->getMessage();
4848
exit;
@@ -84,7 +84,7 @@ if (! $accessToken->isLongLived()) {
8484
// Exchanges a short-lived access token for a long-lived one
8585
try {
8686
$accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
87-
} catch (Facebook\Exception\FacebookSDKException $e) {
87+
} catch (Facebook\Exception\SDKException $e) {
8888
echo "<p>Error getting long-lived access token: " . $e->getMessage() . "</p>\n\n";
8989
exit;
9090
}

docs/examples/pagination_basic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ $fb = new Facebook\Facebook([
1818
try {
1919
// Requires the "read_stream" permission
2020
$response = $fb->get('/me/feed?fields=id,message&limit=5');
21-
} catch(Facebook\Exception\FacebookResponseException $e) {
21+
} catch(Facebook\Exception\ResponseException $e) {
2222
// When Graph returns an error
2323
echo 'Graph returned an error: ' . $e->getMessage();
2424
exit;
25-
} catch(Facebook\Exception\FacebookSDKException $e) {
25+
} catch(Facebook\Exception\SDKException $e) {
2626
// When validation fails or other local issues
2727
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2828
exit;

docs/examples/post_links.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example covers posting a link to the current user's timeline using the Grap
44

55
It assumes that you've already obtained an access token from one of the helpers found [here](../reference.md). The access token must have the `publish_actions` permission for this to work.
66

7-
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNode\GraphNode`](../reference/GraphNode.md), [`Facebook\Exception\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exception\FacebookResponseException`](../reference/FacebookResponseException.md).
7+
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\Response`](../reference/Response.md), [`Facebook\GraphNode\GraphNode`](../reference/GraphNode.md), [`Facebook\Exception\SDKException`](../reference/SDKException.md) and [`Facebook\Exception\ResponseException`](../reference/ResponseException.md).
88

99
## Example
1010

@@ -21,12 +21,12 @@ $linkData = [
2121
];
2222

2323
try {
24-
// Returns a `Facebook\FacebookResponse` object
24+
// Returns a `Facebook\Response` object
2525
$response = $fb->post('/me/feed', $linkData, '{access-token}');
26-
} catch(Facebook\Exception\FacebookResponseException $e) {
26+
} catch(Facebook\Exception\ResponseException $e) {
2727
echo 'Graph returned an error: ' . $e->getMessage();
2828
exit;
29-
} catch(Facebook\Exception\FacebookSDKException $e) {
29+
} catch(Facebook\Exception\SDKException $e) {
3030
echo 'Facebook SDK returned an error: ' . $e->getMessage();
3131
exit;
3232
}

docs/examples/retrieve_user_profile.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example covers getting profile information for the current user and printin
44

55
It assumes that you've already obtained an access token from one of the helpers found [here](../reference.md).
66

7-
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNode\GraphUser`](../reference/GraphNode.md#graphuser-instance-methods), [`Facebook\Exception\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exception\FacebookResponseException`](../reference/FacebookResponseException.md).
7+
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\Response`](../reference/Response.md), [`Facebook\GraphNode\GraphUser`](../reference/GraphNode.md#graphuser-instance-methods), [`Facebook\Exception\SDKException`](../reference/SDKException.md) and [`Facebook\Exception\ResponseException`](../reference/ResponseException.md).
88

99
## Example
1010

@@ -16,12 +16,12 @@ $fb = new Facebook\Facebook([
1616
]);
1717

1818
try {
19-
// Returns a `Facebook\FacebookResponse` object
19+
// Returns a `Facebook\Response` object
2020
$response = $fb->get('/me?fields=id,name', '{access-token}');
21-
} catch(Facebook\Exception\FacebookResponseException $e) {
21+
} catch(Facebook\Exception\ResponseException $e) {
2222
echo 'Graph returned an error: ' . $e->getMessage();
2323
exit;
24-
} catch(Facebook\Exception\FacebookSDKException $e) {
24+
} catch(Facebook\Exception\SDKException $e) {
2525
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2626
exit;
2727
}

0 commit comments

Comments
 (0)