Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function newAction(): ResponseInterface |
||
29 | { |
||
30 | $model = $this->getModelClassName(); |
||
|
|||
31 | |||
32 | $entity = new $model(); |
||
33 | assert($entity instanceof ModelInterface); |
||
34 | |||
35 | $entity->assign($this->getParams(), $this->getWhiteList(), $this->getColumnMap()); |
||
36 | |||
37 | $this->view->setVar('single', $this->expose($entity)); |
||
38 | return $this->setRestResponse(true); |
||
39 | } |
||
42 |