1 | <?php |
||
8 | class Settings extends Model |
||
9 | { |
||
10 | use ValidationTrait; |
||
11 | |||
12 | public $implement = ['System.Behaviors.SettingsModel']; |
||
13 | |||
14 | // A unique code |
||
15 | public $settingsCode = 'vojtasvoboda_errorlogger_settings'; |
||
16 | |||
17 | // Reference to field configuration |
||
18 | public $settingsFields = 'fields.yaml'; |
||
19 | |||
20 | public $rules = [ |
||
21 | // 'nativemailer_email' => 'email', |
||
|
|||
22 | ]; |
||
23 | |||
24 | public $attributeNames = [ |
||
25 | 'nativemailer_email' => "Developer's email", |
||
26 | 'swiftmailer_email' => "Developer's email", |
||
27 | ]; |
||
28 | |||
29 | public static function getNativemailerLevelOptions() |
||
33 | |||
34 | public static function getSwiftmailerLevelOptions() |
||
38 | |||
39 | public static function getSlackLevelOptions() |
||
43 | |||
44 | public static function getSyslogLevelOptions() |
||
48 | |||
49 | public static function getNewrelicLevelOptions() |
||
53 | |||
54 | public static function getErrorLevelOptions() |
||
67 | } |
||
68 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.