| Conditions | 5 | 
| Paths | 4 | 
| Total Lines | 19 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 3 | 
| CRAP Score | 17.8 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 8 | 1 | public function updateCMSFields(FieldList $fields) | |
| 9 |     { | ||
| 10 | 1 |         if ($blocks = $fields->dataFieldByName('Blocks')) { | |
| 11 | $config = $blocks->getConfig(); | ||
|  | |||
| 12 | |||
| 13 |             if ($this->owner->blockManager) { | ||
| 14 | $areas = $this->owner->blockManager->getAreasForPageType($this->owner->ClassName); | ||
| 15 | |||
| 16 |                 if ($areas && count($areas)) { | ||
| 17 | $config->addComponent(new GridFieldGroupable( | ||
| 18 | 'BlockArea', | ||
| 19 | 'Area', | ||
| 20 | 'none', | ||
| 21 | $areas | ||
| 22 | )); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | } | ||
| 26 | } | ||
| 27 | } | 
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.