Skip to content

Commit

Permalink
chore: style fixes
Browse files Browse the repository at this point in the history
Co-authored-by: atymic <atymic@users.noreply.github.com>
  • Loading branch information
atymic and atymic committed Oct 7, 2021
1 parent 630deea commit 82c9bda
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 110 deletions.
8 changes: 4 additions & 4 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class Config implements Contracts\ConfigInterface
/**
* Config constructor.
*
* @param string $key
* @param string $secret
* @param string|callable $callbackUri
* @param array $additionalProviderConfig
* @param string $key
* @param string $secret
* @param string|callable $callbackUri
* @param array $additionalProviderConfig
*/
public function __construct($key, $secret, $callbackUri, array $additionalProviderConfig = [])
{
Expand Down
7 changes: 3 additions & 4 deletions src/ConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait ConfigTrait
protected $config;

/**
* @param \SocialiteProviders\Manager\Contracts\OAuth1\ProviderInterface|\SocialiteProviders\Manager\Contracts\OAuth2\ProviderInterface $config
* @param \SocialiteProviders\Manager\Contracts\OAuth1\ProviderInterface|\SocialiteProviders\Manager\Contracts\OAuth2\ProviderInterface $config
*/
public function setConfig(ConfigInterface $config)
{
Expand All @@ -36,9 +36,8 @@ public static function additionalConfigKeys()
}

/**
* @param string $key
* @param mixed $default
*
* @param string $key
* @param mixed $default
* @return mixed|array
*/
protected function getConfig($key = null, $default = null)
Expand Down
5 changes: 2 additions & 3 deletions src/Contracts/Helpers/ConfigRetrieverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
interface ConfigRetrieverInterface
{
/**
* @param string $providerName
* @param array $additionalConfigKeys
*
* @param string $providerName
* @param array $additionalConfigKeys
* @return \SocialiteProviders\Manager\Contracts\ConfigInterface
*/
public function fromServices($providerName, array $additionalConfigKeys = []);
Expand Down
3 changes: 1 addition & 2 deletions src/Contracts/OAuth1/ProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
interface ProviderInterface
{
/**
* @param \SocialiteProviders\Manager\Contracts\ConfigInterface $config
*
* @param \SocialiteProviders\Manager\Contracts\ConfigInterface $config
* @return $this
*/
public function setConfig(Config $config);
Expand Down
3 changes: 1 addition & 2 deletions src/Contracts/OAuth2/ProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
interface ProviderInterface extends SocialiteOauth2ProviderInterface
{
/**
* @param \SocialiteProviders\Manager\Contracts\ConfigInterface $config
*
* @param \SocialiteProviders\Manager\Contracts\ConfigInterface $config
* @return $this
*/
public function setConfig(Config $config);
Expand Down
24 changes: 9 additions & 15 deletions src/Helpers/ConfigRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class ConfigRetriever implements ConfigRetrieverInterface
protected $additionalConfigKeys;

/**
* @param string $providerName
* @param array $additionalConfigKeys
*
* @param string $providerName
* @param array $additionalConfigKeys
* @return \SocialiteProviders\Manager\Contracts\ConfigInterface
*/
public function fromServices($providerName, array $additionalConfigKeys = [])
Expand All @@ -53,9 +52,8 @@ public function fromServices($providerName, array $additionalConfigKeys = [])
}

/**
* @param array $configKeys
* @param \Closure $keyRetrievalClosure
*
* @param array $configKeys
* @param \Closure $keyRetrievalClosure
* @return array
*/
protected function getConfigItems(array $configKeys, Closure $keyRetrievalClosure)
Expand All @@ -64,9 +62,8 @@ protected function getConfigItems(array $configKeys, Closure $keyRetrievalClosur
}

/**
* @param array $keys
* @param \Closure $keyRetrievalClosure
*
* @param array $keys
* @param \Closure $keyRetrievalClosure
* @return array
*/
protected function retrieveItemsFromConfig(array $keys, Closure $keyRetrievalClosure)
Expand All @@ -81,8 +78,7 @@ protected function retrieveItemsFromConfig(array $keys, Closure $keyRetrievalClo
}

/**
* @param string $key
*
* @param string $key
* @return string|null
*
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
Expand All @@ -105,8 +101,7 @@ protected function getFromServices($key)
}

/**
* @param string $providerName
*
* @param string $providerName
* @return array
*
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
Expand All @@ -132,8 +127,7 @@ protected function getConfigFromServicesArray($providerName)
}

/**
* @param string $key
*
* @param string $key
* @return bool
*/
protected function isAdditionalConfig($key)
Expand Down
15 changes: 5 additions & 10 deletions src/OAuth1/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ abstract class AbstractProvider extends BaseProvider implements ProviderInterfac
protected $credentialsResponseBody;

/**
* @param string $providerName
*
* @param string $providerName
* @return string
*/
public static function serviceContainerKey($providerName)
Expand Down Expand Up @@ -107,8 +106,7 @@ public function redirect()
/**
* Indicates that the provider should operate as stateless.
*
* @param mixed $stateless
*
* @param mixed $stateless
* @return $this
*/
public function stateless($stateless = true)
Expand All @@ -121,8 +119,7 @@ public function stateless($stateless = true)
/**
* Set the scopes of the requested access.
*
* @param array $scopes
*
* @param array $scopes
* @return $this
*/
public function scopes(array $scopes)
Expand All @@ -135,8 +132,7 @@ public function scopes(array $scopes)
/**
* Set the custom parameters of the request.
*
* @param array $parameters
*
* @param array $parameters
* @return $this
*/
public function with(array $parameters)
Expand All @@ -147,8 +143,7 @@ public function with(array $parameters)
}

/**
* @param Config $config
*
* @param Config $config
* @return $this
*/
public function setConfig(Config $config)
Expand Down
19 changes: 8 additions & 11 deletions src/OAuth1/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ abstract class Server extends BaseServer
* the temporary credentials identifier as passed back by the server
* and finally the verifier code.
*
* @param \League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials
* @param string $temporaryIdentifier
* @param string $verifier
*
* @param \League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials
* @param string $temporaryIdentifier
* @param string $verifier
* @return array
*
* @throws \InvalidArgumentException
*/
public function getTokenCredentials(TemporaryCredentials $temporaryCredentials, $temporaryIdentifier, $verifier)
Expand Down Expand Up @@ -84,8 +84,7 @@ public function getTokenCredentials(TemporaryCredentials $temporaryCredentials,
/**
* Set the scopes of the requested access.
*
* @param array $scopes
*
* @param array $scopes
* @return $this
*/
public function scopes(array $scopes)
Expand All @@ -98,8 +97,7 @@ public function scopes(array $scopes)
/**
* Set the custom parameters of the request.
*
* @param array $parameters
*
* @param array $parameters
* @return $this
*/
public function with(array $parameters)
Expand All @@ -112,9 +110,8 @@ public function with(array $parameters)
/**
* Format the given scopes.
*
* @param array $scopes
* @param string $scopeSeparator
*
* @param array $scopes
* @param string $scopeSeparator
* @return string
*/
protected function formatScopes(array $scopes, $scopeSeparator)
Expand Down
3 changes: 1 addition & 2 deletions src/OAuth1/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class User extends BaseUser
*
* Might include things such as the token and refresh token
*
* @param array $accessTokenResponseBody
*
* @param array $accessTokenResponseBody
* @return $this
*/
public function setAccessTokenResponseBody(array $accessTokenResponseBody)
Expand Down
13 changes: 5 additions & 8 deletions src/OAuth2/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ abstract class AbstractProvider extends BaseProvider implements ProviderInterfac
protected $credentialsResponseBody;

/**
* @param string $providerName
*
* @param string $providerName
* @return string
*/
public static function serviceContainerKey($providerName)
Expand All @@ -30,6 +29,7 @@ public static function serviceContainerKey($providerName)

/**
* @return \SocialiteProviders\Manager\OAuth2\User
*
* @throws \Laravel\Socialite\Two\InvalidStateException
*/
public function user()
Expand Down Expand Up @@ -57,8 +57,7 @@ public function user()
/**
* Get the access token from the token response body.
*
* @param array $body
*
* @param array $body
* @return string
*/
protected function parseAccessToken($body)
Expand All @@ -69,8 +68,7 @@ protected function parseAccessToken($body)
/**
* Get the refresh token from the token response body.
*
* @param array $body
*
* @param array $body
* @return string
*/
protected function parseRefreshToken($body)
Expand All @@ -81,8 +79,7 @@ protected function parseRefreshToken($body)
/**
* Get the expires in from the token response body.
*
* @param array $body
*
* @param array $body
* @return string
*/
protected function parseExpiresIn($body)
Expand Down
3 changes: 1 addition & 2 deletions src/OAuth2/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class User extends BaseUser
*
* Might include things such as the token and refresh token
*
* @param array $accessTokenResponseBody
*
* @param array $accessTokenResponseBody
* @return $this
*/
public function setAccessTokenResponseBody(array $accessTokenResponseBody)
Expand Down
Loading

0 comments on commit 82c9bda

Please sign in to comment.