Skip to content

Commit

Permalink
chore: style fixes
Browse files Browse the repository at this point in the history
Co-authored-by: atymic <[email protected]>
  • Loading branch information
atymic and atymic authored Oct 21, 2021
1 parent 1e226a6 commit d02680e
Show file tree
Hide file tree
Showing 42 changed files with 225 additions and 149 deletions.
12 changes: 8 additions & 4 deletions src/ApiV1/Service/Twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function getQuerier(): Querier

/**
* @return mixed
*
* @throws TwitterClientException
*/
public function query(
Expand All @@ -79,6 +80,7 @@ public function query(

/**
* @return mixed
*
* @throws TwitterClientException
*/
public function directQuery(
Expand All @@ -90,11 +92,11 @@ public function directQuery(
}

/**
* @param array $parameters
* @param bool $multipart
* @param string $extension
*
* @param array $parameters
* @param bool $multipart
* @param string $extension
* @return mixed|string
*
* @throws TwitterClientException
*/
public function get(string $endpoint, $parameters = [], $multipart = false, $extension = self::DEFAULT_EXTENSION)
Expand All @@ -104,6 +106,7 @@ public function get(string $endpoint, $parameters = [], $multipart = false, $ext

/**
* @return mixed
*
* @throws TwitterClientException
*/
public function post(string $endpoint, array $parameters = [], bool $multipart = false)
Expand All @@ -113,6 +116,7 @@ public function post(string $endpoint, array $parameters = [], bool $multipart =

/**
* @return mixed
*
* @throws TwitterClientException
*/
public function delete(string $endpoint, array $parameters = [])
Expand Down
45 changes: 23 additions & 22 deletions src/ApiV1/Traits/AccountActivityTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ trait AccountActivityTrait
* Creates HMAC SHA-256 hash from incoming crc_token and consumer secret.
* This base64 encoded hash needs to be returned by the application when Twitter calls the webhook.
*
* @param string $crcToken
*
* @param string $crcToken
* @return string
*
* @throws TwitterException
*/
public function crcHash(string $crcToken): string
Expand All @@ -31,10 +31,10 @@ public function crcHash(string $crcToken): string
/**
* Registers a webhook $url for all event types in the given environment.
*
* @param mixed $env
* @param mixed $url
*
* @param mixed $env
* @param mixed $url
* @return object
*
* @throws TwitterException
*/
public function setWebhook($env, $url)
Expand All @@ -45,9 +45,9 @@ public function setWebhook($env, $url)
/**
* Returns webhook URLs for the given environment (or all environments if none provided), and their statuses for the authenticating app.
*
* @param mixed $env
*
* @param mixed $env
* @return object
*
* @throws TwitterException
*/
public function getWebhooks($env = null)
Expand All @@ -59,10 +59,10 @@ public function getWebhooks($env = null)
* Triggers the challenge response check (CRC) for the given environments webhook for all activities.
* If the check is successful, returns 204 and re-enables the webhook by setting its status to valid.
*
* @param mixed $env
* @param mixed $webhookId
*
* @param mixed $env
* @param mixed $webhookId
* @return bool
*
* @throws TwitterException
*/
public function updateWebhooks($env, $webhookId): bool
Expand All @@ -80,10 +80,10 @@ public function updateWebhooks($env, $webhookId): bool
* Removes the webhook from the provided application's all activities configuration.
* The webhook ID can be accessed by making a call to GET /1.1/account_activity/all/webhooks (getWebhooks).
*
* @param mixed $env
* @param mixed $webhookId
*
* @param mixed $env
* @param mixed $webhookId
* @return bool
*
* @throws TwitterException
*/
public function destroyWebhook($env, $webhookId): bool
Expand All @@ -102,9 +102,9 @@ public function destroyWebhook($env, $webhookId): bool
* Returns HTTP 204 on success.
* After activation, all events for the requesting user will be sent to the application’s webhook via POST request.
*
* @param mixed $env
*
* @param mixed $env
* @return bool
*
* @throws TwitterException
*/
public function setSubscriptions($env): bool
Expand All @@ -125,9 +125,9 @@ public function setSubscriptions($env): bool
* See HTTP Response code and error messages for details:
* https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/aaa-premium#get-account-activity-all-env-name-subscriptions.
*
* @param mixed $env
*
* @param mixed $env
* @return bool
*
* @throws TwitterException
*/
public function getSubscriptions($env): bool
Expand All @@ -145,6 +145,7 @@ public function getSubscriptions($env): bool
* Returns the count of subscriptions that are currently active on your account for all activities.
*
* @return mixed
*
* @throws TwitterException
*/
public function getSubscriptionsCount()
Expand All @@ -155,9 +156,9 @@ public function getSubscriptionsCount()
/**
* Returns a list of the current All Activity type subscriptions.
*
* @param mixed $env
*
* @param mixed $env
* @return mixed
*
* @throws TwitterException
*/
public function getSubscriptionsList($env)
Expand All @@ -169,10 +170,10 @@ public function getSubscriptionsList($env)
* Deactivates subscription for the specified user id from the environment.
* After deactivation, all events for the requesting user will no longer be sent to the webhook URL.
*
* @param mixed $env
* @param mixed $userId
*
* @param mixed $env
* @param mixed $userId
* @return bool
*
* @throws TwitterException
*/
public function destroyUserSubscriptions($env, $userId): bool
Expand Down
18 changes: 9 additions & 9 deletions src/ApiV1/Traits/AccountTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait AccountTrait
/**
* Returns settings (including current trend, geo and sleep time information) for the authenticating user.
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getSettings($parameters = [])
{
Expand All @@ -25,7 +25,7 @@ public function getSettings($parameters = [])
* - include_entities (0|1)
* - skip_status (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getCredentials($parameters = [])
{
Expand All @@ -43,7 +43,7 @@ public function getCredentials($parameters = [])
* - time_zone
* - lang
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postSettings($parameters = [])
{
Expand All @@ -62,7 +62,7 @@ public function postSettings($parameters = [])
* - device (sms|none)
* - include_entities (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postSettingsDevice($parameters = [])
{
Expand All @@ -84,7 +84,7 @@ public function postSettingsDevice($parameters = [])
* - include_entities (0|1)
* - skip_status (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postProfile($parameters = [])
{
Expand All @@ -105,7 +105,7 @@ public function postProfile($parameters = [])
* - skip_status (0|1)
* - use (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postBackground($parameters = [])
{
Expand All @@ -124,7 +124,7 @@ public function postBackground($parameters = [])
* - include_entities (0|1)
* - skip_status (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postProfileImage($parameters = [])
{
Expand All @@ -138,7 +138,7 @@ public function postProfileImage($parameters = [])
/**
* Removes the uploaded profile banner for the authenticating user. Returns HTTP 200 upon success.
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function destroyUserBanner($parameters = [])
{
Expand All @@ -155,7 +155,7 @@ public function destroyUserBanner($parameters = [])
* - offset_left
* - offset_top
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postUserBanner($parameters = [])
{
Expand Down
8 changes: 4 additions & 4 deletions src/ApiV1/Traits/BlockTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait BlockTrait
* - skip_status (0|1)
* - cursor
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getBlocks($parameters = [])
{
Expand All @@ -28,7 +28,7 @@ public function getBlocks($parameters = [])
* - stringify_ids (0|1)
* - cursor
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getBlocksIds($parameters = [])
{
Expand All @@ -44,7 +44,7 @@ public function getBlocksIds($parameters = [])
* - include_entities (0|1)
* - skip_status (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postBlock($parameters = [])
{
Expand All @@ -64,7 +64,7 @@ public function postBlock($parameters = [])
* - include_entities (0|1)
* - skip_status (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function destroyBlock($parameters = [])
{
Expand Down
8 changes: 4 additions & 4 deletions src/ApiV1/Traits/DirectMessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait DirectMessageTrait
* Parameters :
* - id
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getDm($parameters = [])
{
Expand All @@ -31,7 +31,7 @@ public function getDm($parameters = [])
* - count (1-50)
* - cursor
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getDms($parameters = [])
{
Expand All @@ -44,7 +44,7 @@ public function getDms($parameters = [])
* Parameters :
* - id
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function destroyDm($parameters = [])
{
Expand All @@ -66,7 +66,7 @@ public function destroyDm($parameters = [])
*
* @see https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event
*
* @param mixed $parameters
* @param mixed $parameters
*
* @throws BadMethodCallException
*/
Expand Down
6 changes: 3 additions & 3 deletions src/ApiV1/Traits/FavoriteTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait FavoriteTrait
* - max_id
* - include_entities (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function getFavorites($parameters = [])
{
Expand All @@ -31,7 +31,7 @@ public function getFavorites($parameters = [])
* - id
* - include_entities (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function destroyFavorite($parameters = [])
{
Expand All @@ -49,7 +49,7 @@ public function destroyFavorite($parameters = [])
* - id
* - include_entities (0|1)
*
* @param mixed $parameters
* @param mixed $parameters
*/
public function postFavorite($parameters = [])
{
Expand Down
Loading

0 comments on commit d02680e

Please sign in to comment.