Skip to content

Commit b866008

Browse files
bernard-ngsoyuka
authored andcommitted
docs: remove void in union type (#1945)
Void can only be used as a standalone type
1 parent c7929f9 commit b866008

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/state-processors.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ use ApiPlatform\State\ProcessorInterface;
4646
*/
4747
final class BlogPostProcessor implements ProcessorInterface
4848
{
49-
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): BlogPost|void
49+
/**
50+
* @return BlogPost|void
51+
*/
52+
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): mixed
5053
{
5154
// call your persistence layer to save $data
5255
return $data;
@@ -106,7 +109,10 @@ final class UserProcessor implements ProcessorInterface
106109
{
107110
}
108111

109-
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): User|void
112+
/**
113+
* @return User|void
114+
*/
115+
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): mixed
110116
{
111117
if ($operation instanceof DeleteOperationInterface) {
112118
return $this->removeProcessor->process($data, $operation, $uriVariables, $context);

0 commit comments

Comments
 (0)