| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function handleSubmittedData(ServerRequestInterface $request, $data): bool |
||
| 16 | { |
||
| 17 | $model = $this->getModelFromRepository($request); |
||
| 18 | |||
| 19 | if ($this->getModelData($model) === $data) { |
||
| 20 | return false; |
||
| 21 | } |
||
| 22 | |||
| 23 | $this->setModelData($model, $data); |
||
| 24 | $this->maybeUpdateRepository($model); |
||
| 25 | $this->maybeCommitRepositoryChanges(); |
||
| 26 | |||
| 27 | return true; |
||
| 28 | } |
||
| 40 |