| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function auth() |
||
| 40 | { |
||
| 41 | $request = $this->post( |
||
| 42 | $this->getBaseUrl() . Endpoint::OAUTH_TOKEN, |
||
| 43 | ["Accept" => "application/json", "Accept-Language" => "en_US"], |
||
| 44 | ["grant_type" => "client_credentials"] |
||
| 45 | ); |
||
| 46 | $request->setAuth($this->credentials->getClientId(), $this->credentials->getSecret()); |
||
| 47 | |||
| 48 | $response = parent::send($request); |
||
|
|
|||
| 49 | |||
| 50 | // todo retry if status code in self::$retryCode |
||
| 51 | return $this->getSerializer()->deserialize( |
||
| 52 | $response->getBody(true), |
||
| 53 | 'Onend\PayPal\Common\Auth\AuthResponse', |
||
| 54 | RequestFormat::JSON |
||
| 55 | ); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.