| Conditions | 6 |
| Paths | 8 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | public function __construct($token = null) |
||
| 25 | { |
||
| 26 | $EvernoteSettings = EvernoteSettings::current_Evernote_settings(); |
||
| 27 | if(empty($EvernoteSettings)) { |
||
| 28 | user_error( |
||
| 29 | _t( |
||
| 30 | 'NO_EVERNOTE_ACTIVE', |
||
| 31 | 'No Evernote Settings Available. Please setup the Evernote configuration.' |
||
| 32 | ), |
||
| 33 | E_USER_ERROR |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | $this->token = $token; |
||
| 37 | $this->sandbox = boolval(($EvernoteSettings->Sandbox) ?: true); |
||
| 38 | $this->china = boolval(($EvernoteSettings->China) ?: false); |
||
| 39 | $this->key = ($EvernoteSettings->APIKey) ?: ''; |
||
| 40 | $this->secret = ($EvernoteSettings->APISecret) ?: ''; |
||
| 41 | } |
||
| 42 | |||
| 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.