Conditions | 2 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
46 | public function Authorize() |
||
47 | { |
||
48 | $oauth_handler = new \Evernote\Auth\OauthHandler($this->sandbox, false, $this->china); |
||
49 | try { |
||
50 | $oauth_data = $oauth_handler->authorize($this->key, $this->secret, $this->getCallbackUrl()); |
||
51 | $this->token = $oauth_data['oauth_token']; |
||
52 | $ret = $this->token; |
||
53 | |||
54 | } catch (\Evernote\Exception\AuthorizationDeniedException $e) { |
||
55 | //If the user decline the authorization, an exception is thrown. |
||
56 | $ret = null; |
||
57 | } |
||
58 | |||
59 | return $ret; |
||
60 | } |
||
61 | |||
86 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.