Skip to content

Commit 9502158

Browse files
tobyzernergithub-actions[bot]
authored andcommitted
Run Prettier
1 parent 734f7cf commit 9502158

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

src/Endpoint/Create.php

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,25 @@ public function handle(Context $context): ?ResponseInterface
8282

8383
if ($asyncResult !== null) {
8484
if (is_string($asyncResult)) {
85-
$response = $context->createResponse($this->buildDocument($context))->withHeader(
86-
'Location',
87-
$context->api->basePath . '/' . ltrim($asyncResult, '/'),
88-
);
85+
$response = $context
86+
->createResponse($this->buildDocument($context))
87+
->withHeader(
88+
'Location',
89+
$context->api->basePath . '/' . ltrim($asyncResult, '/'),
90+
);
8991
} else {
9092
$context = $context->forModel([$this->asyncCollection], $asyncResult);
9193

92-
$response = $context->createResponse(
93-
$this->buildResourceDocument($asyncResult, $context),
94-
)->withHeader(
95-
'Content-Location',
96-
implode('/', [
97-
$context->api->basePath,
98-
$context->collection->name(),
99-
$context->id($context->resource, $asyncResult),
100-
]),
101-
);
94+
$response = $context
95+
->createResponse($this->buildResourceDocument($asyncResult, $context))
96+
->withHeader(
97+
'Content-Location',
98+
implode('/', [
99+
$context->api->basePath,
100+
$context->collection->name(),
101+
$context->id($context->resource, $asyncResult),
102+
]),
103+
);
102104
}
103105

104106
return $response->withStatus(202);

src/Endpoint/Show.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ public function seeOther(callable $callback): static
157157

158158
$location = $context->api->basePath . '/' . ltrim($result, '/');
159159

160-
return $context->createResponse([])->withStatus(303)->withHeader('Location', $location);
160+
return $context
161+
->createResponse([])
162+
->withStatus(303)
163+
->withHeader('Location', $location);
161164
}
162165

163166
return $response;

0 commit comments

Comments
 (0)