| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 13 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 17 | public function getEditForm($id = null, $fields = null)  | 
            ||
| 18 |     { | 
            ||
| 19 | /** @var CMSForm $form */  | 
            ||
| 20 | $form = parent::getEditForm($id, $fields);  | 
            ||
| 21 | |||
| 22 | // See parent class  | 
            ||
| 23 | $gridFieldName = $this->sanitiseClassName($this->modelClass);  | 
            ||
| 24 | |||
| 25 | $gridFieldConfig = $form->Fields()->fieldByName($gridFieldName)->getConfig();  | 
            ||
| 26 |         $gridFieldConfig->removeComponentsByType('GridFieldAddNewButton'); | 
            ||
| 27 | |||
| 28 | return $form;  | 
            ||
| 29 | }  | 
            ||
| 30 | }  | 
            ||
| 31 | 
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.