We have detected an error in your notification set-up
(Event-ID dab39dc24f564ec7bd4628d1305fd03c).
Currently, we cannot inform you about inspection progress.
Please check that the user
557058:bca11929-8c2d-43f2-8a82-c5416880d395 still has access to your repository or
update the API account.
| 1 | <?php |
||
| 23 | class OAuth2Plugin implements Plugin |
||
| 24 | { |
||
| 25 | const ENDPOINT_ACCESS_TOKEN = '/oauth2/access_token'; |
||
| 26 | const ENDPOINT_AUTHORIZE = '/oauth2/authorize'; |
||
| 27 | |||
| 28 | /** @var array */ |
||
| 29 | private $config = array( |
||
| 30 | 'oauth_client_id' => 'anon', |
||
| 31 | 'oauth_client_secret' => 'anon', |
||
| 32 | 'token_type' => 'bearer', |
||
| 33 | 'scopes' => array() |
||
| 34 | ); |
||
| 35 | |||
| 36 | /** @var ClientInterface */ |
||
| 37 | private $httpClient; |
||
| 38 | |||
| 39 | public function __construct(array $config, ClientInterface $client = null) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritDoc} |
||
| 53 | * |
||
| 54 | * @throws ForbiddenAccessException |
||
| 55 | * @throws \InvalidArgumentException |
||
| 56 | */ |
||
| 57 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
||
| 87 | |||
| 88 | /** |
||
| 89 | * Fetch access token with a grant_type of client_credentials |
||
| 90 | * |
||
| 91 | * @access public |
||
| 92 | * @return array |
||
| 93 | * |
||
| 94 | * throws \InvalidArgumentException |
||
| 95 | * @throws HttpResponseException |
||
| 96 | */ |
||
| 97 | protected function getAccessToken() |
||
| 131 | } |
||
| 132 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.