Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
21 | 3 | public function createEntityNotFoundResponse(string $entityFullName, $id): ApiError |
|
22 | { |
||
23 | 3 | $entityName = (new \ReflectionClass($entityFullName))->getShortName(); |
|
24 | |||
25 | 3 | return new ApiError( |
|
26 | 3 | sprintf('%s "%s" was not found.', $entityName, $id), |
|
27 | 3 | Response::HTTP_NOT_FOUND |
|
28 | ); |
||
29 | } |
||
30 | } |
||
31 |