Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
1 | <?php |
||
22 | 1 | public function getCMSFields() |
|
23 | { |
||
24 | 1 | $fields = parent::getCMSFields(); |
|
25 | 1 | $fields->addFieldToTab('Root.Image', new UploadField('Photo')); |
|
26 | |||
27 | 1 | $fields->addFieldToTab('Root.JobDetail', new TextField('JobTitle', _t('Staff.JOB_TITLE', 'Job Title'))); |
|
28 | |||
29 | 1 | $fields->addFieldToTab('Root.JobDetail', new EmailField('Email')); |
|
30 | 1 | $fields->addFieldToTab('Root.JobDetail', new TextField('TelephoneNumberDesk')); |
|
31 | 1 | $fields->addFieldToTab('Root.JobDetail', new TextField('TelephoneNumberMobile')); |
|
32 | |||
33 | 1 | $fields->renameField('TelephoneNumberDesk', 'Telephone Number (Landline)'); |
|
34 | 1 | $fields->renameField('TelephoneNumberMobile', 'Telephone Number (Mobile)'); |
|
35 | |||
36 | 1 | return $fields; |
|
37 | } |
||
38 | } |
||
43 |
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.