| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 2 | public function saveRecord(Model $record, array $definition): bool |
|
| 46 | { |
||
| 47 | 2 | if (Craft::$app->sections->saveSection($record)) { |
|
| 48 | 1 | Craft::$app->controller->module->modelMapper->import( |
|
| 49 | 1 | $definition['entryTypes'], |
|
| 50 | 1 | $record->getEntryTypes(), |
|
| 51 | 1 | ['sectionId' => $record->id] |
|
| 52 | ); |
||
| 53 | |||
| 54 | 1 | return true; |
|
| 55 | } |
||
| 56 | |||
| 57 | 1 | return false; |
|
| 58 | } |
||
| 59 | |||
| 68 |