8000 Add PHPDoc for methods that throw an Exception · olayakout/codebird-php@6b6ad74 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b6ad74

Browse files
committed
Add PHPDoc for methods that throw an Exception
1 parent 9c9a520 commit 6b6ad74

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/codebird.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ public function logout()
640640
* @param bool $use_curl Request uses cURL or not
641641
*
642642
* @return void
643+
* @throws \Exception
643644
*/
644645
public function setUseCurl($use_curl)
645646
{
@@ -718,6 +719,7 @@ public function setReturnFormat($return_format)
718719
* @param int optional $type Proxy type, defaults to HTTP
719720
*
720721
* @return void
722+
* @throws \Exception
721723
*/
722724
public function setProxy($host, $port, $type = CURLPROXY_HTTP)
723725
{
@@ -757,6 +759,7 @@ public function setProxyAuthentication($authentication)
757759
* @param callable $callback The streaming callback
758760
*
759761
* @return void
762+
* @throws \Exception
760763
*/
761764
public function setStreamingCallback($callback)
762765
{
@@ -960,6 +963,7 @@ protected function _mapFnRestoreParamUnderscores($method)
960963
* @param array byref $apiparams The parameters to send along
961964
*
962965
* @return string[] (string method, string method_template)
966+
* @throws \Exception
963967
*/
964968
protected function _mapFnInlineParams($method, &$apiparams)
965969
{
@@ -1002,6 +1006,7 @@ protected function _mapFnInlineParams($method, &$apiparams)
10021006
* @param optional string $type 'authenticate' or 'authorize', to avoid duplicate code
10031007
*
10041008
* @return string The OAuth authenticate/authorize URL
1009+
* @throws \Exception
10051010
*/
10061011
public function oauth_authenticate($force_login = NULL, $screen_name = NULL, $type = 'authenticate')
10071012
{
@@ -1198,6 +1203,7 @@ private function _getProxyData($name)
11981203
* Gets the OAuth bearer token, using cURL
11991204
*
12001205
* @return string The OAuth bearer token
1206+
* @throws \Exception
12011207
*/
12021208

12031209
protected function _oauth2TokenCurl()
@@ -1237,6 +1243,7 @@ protected function _oauth2TokenCurl()
12371243
* Gets the OAuth bearer token, without cURL
12381244
*
12391245
* @return string The OAuth bearer token
1246+
* @throws \Exception
12401247
*/
12411248

12421249
protected function _oauth2TokenNoCurl()
@@ -1370,6 +1377,7 @@ protected function _getRateLimitInfo($headers)
13701377
* @param int $validation_result The curl error number
13711378
*
13721379
* @return void
1380+
* @throws \Exception
13731381
*/
13741382
protected function _validateSslCertificate($validation_result)
13751383
{
@@ -1435,6 +1443,7 @@ protected function _url($data)
14351443
* @param string $data The data to calculate the hash from
14361444
*
14371445
* @return string The hash
1446+
* @throws \Exception
14381447
*/
14391448
protected function _sha1($data)
14401449
{
@@ -1463,6 +1472,7 @@ protected function _sha1($data)
14631472
* @param int optional $length The length of the string to generate
14641473
*
14651474
* @return string The random string
1475+
* @throws \Exception
14661476
*/
14671477
protected function _nonce($length = 8)
14681478
{
@@ -1508,6 +1518,7 @@ protected function _getSignature($httpmethod, $method, $base_params)
15081518
* @param array optional $params The API call parameters, associative
15091519
*
15101520
* @return string Authorization HTTP header
1521+
* @throws \Exception
15111522
*/
15121523
protected function _sign($httpmethod, $method, $params = [])
15131524
{
@@ -1691,6 +1702,7 @@ protected function _detectMultipart($method)
16911702
* @param array $params The parameters to send along
16921703
*
16931704
* @return string request
1705+
* @throws \Exception
16941706
*/
16951707
protected function _getMultipartRequestFromParams($method_template, $border, $params)
16961708
{
@@ -1805,6 +1817,7 @@ protected function _buildBinaryBody($input)
18051817
* @param string $url The URL to download from
18061818
*
18071819
* @return mixed The file contents or FALSE
1820+
* @throws \Exception
18081821
*/
18091822
protected function _fetchRemoteFile($url)
18101823
{
@@ -1955,6 +1968,7 @@ protected function _getEndpoint($method, $method_template)
19551968
* @param bool optional $app_only_auth Whether to use app-only bearer authentication
19561969
*
19571970
* @return string The API reply, encoded in the set return_format
1971+
* @throws \Exception
19581972
*/
19591973

19601974
protected function _callApi($httpmethod, $method, $method_template, $params = [], $multipart = false, $app_only_auth = false)
@@ -1987,6 +2001,7 @@ protected function _callApi($httpmethod, $method, $method_template, $params = []
19872001
* @param bool optional $app_only_auth Whether to use app-only bearer authentication
19882002
*
19892003
* @return string The API reply, encoded in the set return_format
2004+
* @throws \Exception
19902005
*/
19912006

19922007
protected function _callApiCurl(
@@ -2047,6 +2062,7 @@ protected function _callApiCurl(
20472062
* @param bool optional $app_only_auth Whether to use app-only bearer authentication
20482063
*
20492064
* @return string The API reply, encoded in the set return_format
2065+
* @throws \Exception
20502066
*/
20512067

20522068
protected function _callApiNoCurl(
@@ -2221,6 +2237,7 @@ protected function _appendHttpStatusAndRate($reply, $httpstatus, $rate)
22212237
* Get Bearer authorization string
22222238
*
22232239
* @return string authorization
2240+
* @throws \Exception
22242241
*/
22252242
protected function _getBearerAuthorization()
22262243
{
@@ -2282,6 +2299,7 @@ protected function _callApiPreparations(
22822299
* @param bool optional $app_only_auth Whether to use app-only bearer authentication
22832300
*
22842301
* @return void
2302+
* @throws \Exception
22852303
*/
22862304

22872305
protected function _callApiStreaming(

0 commit comments

Comments
 (0)
0