| Total Complexity | 1 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
| 7 | trait CreateAction |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Doctrine repository from where get data. |
||
| 11 | * |
||
| 12 | * @return RestRepository |
||
| 13 | */ |
||
| 14 | abstract protected function repository(); |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return RestResponseInterface |
||
| 18 | */ |
||
| 19 | abstract protected function response(); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param CreateRequestInterface $request |
||
| 23 | * |
||
| 24 | * @return object |
||
| 25 | */ |
||
| 26 | abstract protected function createEntity($request); |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param CreateRequestInterface $request |
||
| 30 | * |
||
| 31 | * @return array |
||
| 32 | */ |
||
| 33 | 1 | public function create(CreateRequestInterface $request) |
|
| 45 |