1 | <?php |
||
12 | class Drupal extends AbstractProvider |
||
13 | { |
||
14 | use BearerAuthorizationTrait; |
||
15 | |||
16 | protected $baseUrl; |
||
17 | |||
18 | 21 | public function getBaseUrl() |
|
22 | |||
23 | /** |
||
24 | * Get provider url to run authorization |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | 6 | public function getBaseAuthorizationUrl() |
|
32 | |||
33 | /** |
||
34 | * Get provider url to fetch token |
||
35 | * |
||
36 | * @param AccessToken $token |
||
|
|||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
44 | |||
45 | /** |
||
46 | * Get provider url to fetch user details |
||
47 | * |
||
48 | * @param AccessToken $token |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | 3 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
56 | |||
57 | /** |
||
58 | * @Override |
||
59 | * Requests resource owner details. |
||
60 | * |
||
61 | * @param AccessToken $token |
||
62 | * @return mixed |
||
63 | */ |
||
64 | 3 | protected function fetchResourceOwnerDetails(AccessToken $token) |
|
71 | |||
72 | /** |
||
73 | * Get the default scopes used by this provider. |
||
74 | * |
||
75 | * @return array |
||
76 | */ |
||
77 | 6 | protected function getDefaultScopes() |
|
81 | |||
82 | /** |
||
83 | * Returns the string that should be used to separate scopes when building |
||
84 | * the URL for requesting an access token. |
||
85 | * |
||
86 | * @return string Scope separator, defaults to ' ' |
||
87 | */ |
||
88 | 6 | protected function getScopeSeparator() |
|
92 | |||
93 | /** |
||
94 | * Check a provider response for errors. |
||
95 | * |
||
96 | * @param ResponseInterface $response |
||
97 | * @param array|string $data |
||
98 | * |
||
99 | * @throws IdentityProviderException |
||
100 | */ |
||
101 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
111 | |||
112 | /** |
||
113 | * Generate a user object from a successful user details request. |
||
114 | * |
||
115 | * @param array $response |
||
116 | * @param AccessToken $token |
||
117 | * |
||
118 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
119 | */ |
||
120 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
124 | } |
||
125 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.