@@ -23,7 +23,7 @@ |
||
| 23 | 23 | ]; |
| 24 | 24 | |
| 25 | 25 | foreach ($requiredParames as $param) { |
| 26 | - if (! isset($responseParameters[$param])) { |
|
| 26 | + if (!isset($responseParameters[$param])) { |
|
| 27 | 27 | throw new CredentialsException("Unable to parse temporary credentials response. Missing parameter: {$param}."); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ]; |
| 106 | 106 | |
| 107 | 107 | foreach ($requiredParams as $param) { |
| 108 | - if (! isset($uris[$param])) { |
|
| 108 | + if (!isset($uris[$param])) { |
|
| 109 | 109 | throw new InvalidArgumentException("Missing URI configuration: {$param}."); |
| 110 | 110 | } |
| 111 | 111 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function setBase(UriInterface $uri) |
| 124 | 124 | { |
| 125 | - if (! $this->parser->isAbsolute($uri)) { |
|
| 125 | + if (!$this->parser->isAbsolute($uri)) { |
|
| 126 | 126 | throw new InvalidArgumentException('The base URI must be absolute.'); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -212,6 +212,6 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function shouldBeResolvedToAbsoluteUri(UriInterface $uri) |
| 214 | 214 | { |
| 215 | - return ! $this->parser->isAbsolute($uri) && $this->hasBase(); |
|
| 215 | + return !$this->parser->isAbsolute($uri) && $this->hasBase(); |
|
| 216 | 216 | } |
| 217 | 217 | } |
@@ -198,7 +198,7 @@ |
||
| 198 | 198 | /** |
| 199 | 199 | * Parse and build the given URI. |
| 200 | 200 | * |
| 201 | - * @param \Psr\Http\Message\UriInterface|string $uri |
|
| 201 | + * @param UriInterface|null $uri |
|
| 202 | 202 | * @return \Psr\Http\Message\UriInterface |
| 203 | 203 | */ |
| 204 | 204 | public function build($uri) |
@@ -26,7 +26,6 @@ |
||
| 26 | 26 | * Resolve the URI against the base URI. |
| 27 | 27 | * |
| 28 | 28 | * @param \Psr\Http\Message\UriInterface $baseUri |
| 29 | - * @param \Psr\Http\Message\UriInterface $relativeUri |
|
| 30 | 29 | * @return \Psr\Http\Message\UriInterface |
| 31 | 30 | */ |
| 32 | 31 | public function resolve(UriInterface $baseUri, UriInterface $uri); |
@@ -56,10 +56,10 @@ |
||
| 56 | 56 | public function getTokenCredentialsUri(); |
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | - * Get the callback URI. |
|
| 60 | - * |
|
| 61 | - * @return \Psr\Http\Message\UriInterface|null |
|
| 62 | - */ |
|
| 59 | + * Get the callback URI. |
|
| 60 | + * |
|
| 61 | + * @return \Psr\Http\Message\UriInterface|null |
|
| 62 | + */ |
|
| 63 | 63 | public function getCallbackUri(); |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -19,8 +19,8 @@ |
||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * {@inheritDoc} |
|
| 23 | - */ |
|
| 22 | + * {@inheritDoc} |
|
| 23 | + */ |
|
| 24 | 24 | public function getUriParser() |
| 25 | 25 | { |
| 26 | 26 | return $this->uriParser; |
@@ -143,10 +143,10 @@ |
||
| 143 | 143 | */ |
| 144 | 144 | public function normalizeProtocolParameters(array $parameters) |
| 145 | 145 | { |
| 146 | - array_walk($parameters, function (&$value, $key) { |
|
| 147 | - $value = rawurlencode($key) . '="' . rawurlencode($value) . '"'; |
|
| 146 | + array_walk($parameters, function(&$value, $key) { |
|
| 147 | + $value = rawurlencode($key).'="'.rawurlencode($value).'"'; |
|
| 148 | 148 | }); |
| 149 | 149 | |
| 150 | - return 'OAuth ' . implode(', ', $parameters); |
|
| 150 | + return 'OAuth '.implode(', ', $parameters); |
|
| 151 | 151 | } |
| 152 | 152 | } |
@@ -34,7 +34,6 @@ |
||
| 34 | 34 | * Create a new OAuth1 instance. |
| 35 | 35 | * |
| 36 | 36 | * @param \Risan\OAuth1\HttpClientInterface $httpClient |
| 37 | - * @param \Risan\OAuth1\Request\RequestFactoryInterface $request |
|
| 38 | 37 | * @param \Risan\OAuth1\Credentials\CredentialsFactoryInterface $credentialsFactory |
| 39 | 38 | */ |
| 40 | 39 | public function __construct(HttpClientInterface $httpClient, RequestFactoryInterface $requestFactory, CredentialsFactoryInterface $credentialsFactory) |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | namespace Risan\OAuth1; |
| 4 | 4 | |
| 5 | 5 | use InvalidArgumentException; |
| 6 | -use Risan\OAuth1\Request\RequestFactoryInterface; |
|
| 7 | -use Risan\OAuth1\Credentials\TemporaryCredentials; |
|
| 8 | 6 | use Risan\OAuth1\Credentials\CredentialsFactoryInterface; |
| 7 | +use Risan\OAuth1\Credentials\TemporaryCredentials; |
|
| 8 | +use Risan\OAuth1\Request\RequestFactoryInterface; |
|
| 9 | 9 | |
| 10 | 10 | class OAuth1 implements OAuth1Interface |
| 11 | 11 | { |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | * Create a new instance of Request class. |
| 99 | 99 | * |
| 100 | 100 | * @param string $method |
| 101 | - * @param strin $uri |
|
| 101 | + * @param \Psr\Http\Message\UriInterface $uri |
|
| 102 | 102 | * @param array $options [description] |
| 103 | 103 | * @return \Risan\OAuth1\Request\RequestInterface |
| 104 | 104 | */ |