| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1.037 |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
| 33 | 1 | public function create(CreateRequestInterface $request) |
|
| 34 | { |
||
| 35 | 1 | $request->authorize($this->repository()->getClassName()); |
|
| 36 | |||
| 37 | 1 | $entity = $this->createEntity($request); |
|
| 38 | |||
| 39 | 1 | $this->repository()->em()->persist($entity); |
|
| 40 | $this->repository()->em()->flush(); |
||
| 41 | |||
| 42 | return $this->response()->create($request, $entity); |
||
| 43 | } |
||
| 45 |