| 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\Schema\Elicitation\Builder; |
| 15: | |
| 16: | use Nexus\Mcp\Schema\Elicitation\BooleanSchema; |
| 17: | |
| 18: | /** |
| 19: | * Fluent builder for {@see BooleanSchema}. |
| 20: | * |
| 21: | * @extends PrimitiveSchemaDefinitionBuilder<bool, array{ |
| 22: | * type: 'boolean', |
| 23: | * description?: non-empty-string, |
| 24: | * title?: non-empty-string, |
| 25: | * default?: bool, |
| 26: | * }> |
| 27: | */ |
| 28: | final class BooleanSchemaBuilder extends PrimitiveSchemaDefinitionBuilder |
| 29: | { |
| 30: | #[\Override] |
| 31: | public function build(): BooleanSchema |
| 32: | { |
| 33: | return new BooleanSchema( |
| 34: | $this->description, |
| 35: | $this->title, |
| 36: | $this->default, |
| 37: | ); |
| 38: | } |
| 39: | } |
| 40: |