1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2025 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9: *
10: * For the full copyright and license information, please view
11: * the LICENSE file that was distributed with this source code.
12: */
13:
14: namespace Nexus\Mcp\Message\Result;
15:
16: use Nexus\Mcp\Client\Message\Result\ClientResult;
17: use Nexus\Mcp\Message\Result;
18: use Nexus\Mcp\Server\Message\Result\ServerResult;
19:
20: /**
21: * A response that indicates success but carries no data.
22: */
23: final readonly class EmptyResult extends Result implements ClientResult, ServerResult
24: {
25: #[\Override]
26: public function toArray(): array
27: {
28: return [];
29: }
30:
31: #[\Override]
32: public function jsonSerialize(): \stdClass
33: {
34: return new \stdClass();
35: }
36: }
37: