| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class ModelUpdater extends AbstractFormDataProcessor implements FormDataProcessorInterface |
||
| 12 | { |
||
| 13 | use QueriesRepositoryTrait; |
||
| 14 | |||
| 15 | protected object $model; |
||
| 16 | |||
| 17 | public function __construct( |
||
| 18 | string $name, |
||
| 19 | ?array $fields, |
||
| 20 | object $model, |
||
| 21 | object $repository, |
||
| 22 | string $updateMethod, |
||
| 23 | ?string $commitMethod = null |
||
| 24 | ) { |
||
| 25 | parent::__construct($name, $fields); |
||
| 26 | |||
| 27 | $this->model = $model; |
||
| 28 | $this->repository = $repository; |
||
| 29 | $this->updateMethod = $updateMethod; |
||
| 30 | $this->commitMethod = $commitMethod; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function process(ServerRequestInterface $request, array $results): ?FormProcessReportInterface |
||
| 40 | } |
||
| 41 | |||
| 42 | protected function updateModel(): void |
||
| 46 | } |
||
| 47 | } |
||
| 48 |