Skip to content

Commit 665a6f1

Browse files
committed
Doc fixes
1 parent 16747c9 commit 665a6f1

24 files changed

+88
-90
lines changed

src/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function getAccessToken()
8686
}
8787

8888
/**
89-
* Serializes the FacebookApp entity as a string.
89+
* Serializes the App entity as a string.
9090
*
9191
* @return string
9292
*/
@@ -96,7 +96,7 @@ public function serialize()
9696
}
9797

9898
/**
99-
* Unserializes a string as a FacebookApp entity.
99+
* Unserializes a string as a App entity.
100100
*
101101
* @param string $serialized
102102
*/

src/Authentication/OAuth2Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class OAuth2Client
4141
const BASE_AUTHORIZATION_URL = 'https://www.facebook.com';
4242

4343
/**
44-
* The FacebookApp entity.
44+
* The App entity.
4545
*
4646
* @var Application
4747
*/
@@ -81,7 +81,7 @@ public function __construct(Application $app, Client $client, $graphVersion)
8181
}
8282

8383
/**
84-
* Returns the last FacebookRequest that was sent.
84+
* Returns the last Request that was sent.
8585
* Useful for debugging and testing.
8686
*
8787
* @return null|Request

src/BatchRequest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
class BatchRequest extends Request implements IteratorAggregate, ArrayAccess
3535
{
3636
/**
37-
* @var array an array of FacebookRequest entities to send
37+
* @var array an array of Request entities to send
3838
*/
3939
protected $requests = [];
4040

@@ -81,7 +81,7 @@ public function add($request, $options = null)
8181
}
8282

8383
if (!$request instanceof Request) {
84-
throw new \InvalidArgumentException('Argument for add() must be of type array or FacebookRequest.');
84+
throw new \InvalidArgumentException('Argument for add() must be of type array or Request.');
8585
}
8686

8787
if (null === $options) {
@@ -112,7 +112,7 @@ public function add($request, $options = null)
112112
}
113113

114114
/**
115-
* Ensures that the FacebookApp and access token fall back when missing.
115+
* Ensures that the App and access token fall back when missing.
116116
*
117117
* @param Request $request
118118
*
@@ -123,15 +123,15 @@ public function addFallbackDefaults(Request $request)
123123
if (!$request->getApp()) {
124124
$app = $this->getApp();
125125
if (!$app) {
126-
throw new SDKException('Missing FacebookApp on FacebookRequest and no fallback detected on FacebookBatchRequest.');
126+
throw new SDKException('Missing App on Request and no fallback detected on BatchRequest.');
127127
}
128128
$request->setApp($app);
129129
}
130130

131131
if (!$request->getAccessToken()) {
132132
$accessToken = $this->getAccessToken();
133133
if (!$accessToken) {
134-
throw new SDKException('Missing access token on FacebookRequest and no fallback detected on FacebookBatchRequest.');
134+
throw new SDKException('Missing access token on Request and no fallback detected on BatchRequest.');
135135
}
136136
$request->setAccessToken($accessToken);
137137
}
@@ -167,7 +167,7 @@ public function extractFileAttachments(Request $request)
167167
}
168168

169169
/**
170-
* Return the FacebookRequest entities.
170+
* Return the Request entities.
171171
*
172172
* @return array
173173
*/

src/BatchResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BatchResponse extends Response implements IteratorAggregate, ArrayAccess
3737
protected $batchRequest;
3838

3939
/**
40-
* @var Response[] an array of FacebookResponse entities
40+
* @var Response[] an array of Response entities
4141
*/
4242
protected $responses = [];
4343

@@ -62,7 +62,7 @@ public function __construct(BatchRequest $batchRequest, Response $response)
6262
}
6363

6464
/**
65-
* Returns an array of FacebookResponse entities.
65+
* Returns an array of Response entities.
6666
*
6767
* @return Response[]
6868
*/

src/Client.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Client
8383
public static $requestCount = 0;
8484

8585
/**
86-
* Instantiates a new FacebookClient object.
86+
* Instantiates a new Client object.
8787
*
8888
* @param null|HttpClient $httpClient
8989
* @param bool $enableBeta
@@ -202,18 +202,18 @@ public function sendRequest(Request $request)
202202
$responseHeaders[] = sprintf('%s: %s', $name, implode(", ", $values));
203203
}
204204

205-
$facebookResponse = new Response(
205+
$Response = new Response(
206206
$request,
207207
$psr7Response->getBody(),
208208
$psr7Response->getStatusCode(),
209209
$responseHeaders
210210
);
211211

212-
if ($facebookResponse->isError()) {
213-
throw $facebookResponse->getThrownException();
212+
if ($Response->isError()) {
213+
throw $Response->getThrownException();
214214
}
215215

216-
return $facebookResponse;
216+
return $Response;
217217
}
218218

219219
/**
@@ -228,8 +228,8 @@ public function sendRequest(Request $request)
228228
public function sendBatchRequest(BatchRequest $request)
229229
{
230230
$request->prepareRequestsForBatch();
231-
$facebookResponse = $this->sendRequest($request);
231+
$Response = $this->sendRequest($request);
232232

233-
return new BatchResponse($request, $facebookResponse);
233+
return new BatchResponse($request, $Response);
234234
}
235235
}

src/Exception/ResponseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ResponseException extends SDKException
4040
protected $responseData;
4141

4242
/**
43-
* Creates a FacebookResponseException.
43+
* Creates a ResponseException.
4444
*
4545
* @param Response $response the response that threw the exception
4646
* @param SDKException $previousException the more detailed exception

src/Facebook.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Facebook
6161
const APP_SECRET_ENV_NAME = 'FACEBOOK_APP_SECRET';
6262

6363
/**
64-
* @var Application the FacebookApp entity
64+
* @var Application the App entity
6565
*/
6666
protected $app;
6767

@@ -150,7 +150,7 @@ public function __construct(array $config = [])
150150
}
151151

152152
/**
153-
* Returns the FacebookApp entity.
153+
* Returns the App entity.
154154
*
155155
* @return Application
156156
*/
@@ -160,7 +160,7 @@ public function getApp()
160160
}
161161

162162
/**
163-
* Returns the FacebookClient service.
163+
* Returns the Client service.
164164
*
165165
* @return Client
166166
*/
@@ -480,20 +480,20 @@ public function sendBatchRequest(array $requests, $accessToken = null, $graphVer
480480
}
481481

482482
/**
483-
* Instantiates an empty FacebookBatchRequest entity.
483+
* Instantiates an empty BatchRequest entity.
484484
*
485485
* @param null|AccessToken|string $accessToken The top-level access token. Requests with no access token
486486
* will fallback to this.
487487
* @param null|string $graphVersion the Graph API version to use
488488
*
489-
* @return FacebookBatchRequest
489+
* @return BatchRequest
490490
*/
491491
public function newBatchRequest($accessToken = null, $graphVersion = null)
492492
{
493493
$accessToken = $accessToken ?: $this->defaultAccessToken;
494494
$graphVersion = $graphVersion ?: $this->defaultGraphVersion;
495495

496-
return new FacebookBatchRequest(
496+
return new BatchRequest(
497497
$this->app,
498498
[],
499499
$accessToken,
@@ -502,7 +502,7 @@ public function newBatchRequest($accessToken = null, $graphVersion = null)
502502
}
503503

504504
/**
505-
* Instantiates a new FacebookRequest entity.
505+
* Instantiates a new Request entity.
506506
*
507507
* @param string $method
508508
* @param string $endpoint
@@ -532,7 +532,7 @@ public function request($method, $endpoint, array $params = [], $accessToken = n
532532
}
533533

534534
/**
535-
* Factory to create FacebookFile's.
535+
* Factory to create File's.
536536
*
537537
* @param string $pathToFile
538538
*
@@ -546,7 +546,7 @@ public function fileToUpload($pathToFile)
546546
}
547547

548548
/**
549-
* Factory to create FacebookVideo's.
549+
* Factory to create Video's.
550550
*
551551
* @param string $pathToFile
552552
*

src/FileUpload/File.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class File
5050
protected $stream;
5151

5252
/**
53-
* Creates a new FacebookFile entity.
53+
* Creates a new File entity.
5454
*
5555
* @param string $filePath
5656
* @param int $maxLength
@@ -82,13 +82,13 @@ public function __destruct()
8282
public function open()
8383
{
8484
if (!$this->isRemoteFile($this->path) && !is_readable($this->path)) {
85-
throw new SDKException('Failed to create FacebookFile entity. Unable to read resource: ' . $this->path . '.');
85+
throw new SDKException('Failed to create File entity. Unable to read resource: ' . $this->path . '.');
8686
}
8787

8888
$this->stream = fopen($this->path, 'r');
8989

9090
if (!$this->stream) {
91-
throw new SDKException('Failed to create FacebookFile entity. Unable to open resource: ' . $this->path . '.');
91+
throw new SDKException('Failed to create File entity. Unable to open resource: ' . $this->path . '.');
9292
}
9393
}
9494

src/FileUpload/ResumableUploader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function finish($endpoint, $uploadSessionId, $metadata = [])
148148
}
149149

150150
/**
151-
* Helper to make a FacebookRequest and send it.
151+
* Helper to make a Request and send it.
152152
*
153153
* @param string $endpoint the endpoint to POST to
154154
* @param array $params the params to send with the request

src/FileUpload/TransferChunk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function getFile()
7979
}
8080

8181
/**
82-
* Return a FacebookFile entity with partial content.
82+
* Return a File entity with partial content.
8383
*
8484
* @return File
8585
*/

0 commit comments

Comments
 (0)