Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function callback() { |
||
31 | |||
32 | if( $member = Member::currentUser() ) { |
||
33 | $Evernote = new Evernote(); |
||
34 | $Token = $Evernote->Authorize(); |
||
35 | |||
36 | $member->EvernoteToken = $Token; |
||
37 | $member->write(); |
||
38 | |||
39 | $EvernoteSettings = EvernoteSettings::current_Evernote_settings(); |
||
40 | |||
41 | $url = (!empty($EvernoteSettings->CallbackURL)) ?: '/'; |
||
42 | |||
43 | $this->redirect($url); |
||
44 | |||
45 | } else { |
||
46 | |||
47 | $this->redirect('Security/login/?back=evernote-auth/login'); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | } |
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.