Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
38 | public function handle() |
||
39 | { |
||
40 | if (in_array($this->level, $this->levels)) { |
||
41 | update_option(Console::LOG_LEVEL_KEY, $this->level); |
||
42 | glsr(Notice::class)->addSuccess( |
||
43 | sprintf(_x('Console logging has been set to: Level %s', 'admin-text', 'site-reviews'), $this->level) |
||
44 | ); |
||
45 | return; |
||
46 | } |
||
47 | glsr(Notice::class)->addError( |
||
48 | _x('Console logging level could not be changed.', 'admin-text', 'site-reviews') |
||
49 | ); |
||
52 |