php-sdk/tests/Unit/Capability/Discovery/DocBlockTestFixture.php
2026-01-11 21:14:48 +01:00

96 lines
2.2 KiB
PHP

<?php
/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mcp\Tests\Unit\Capability\Discovery;
use Mcp\Tests\Capability\Discovery\Missing;
/**
* A stub class for testing DocBlock parsing.
*/
class DocBlockTestFixture
{
/**
* Simple summary line.
*/
public function methodWithSummaryOnly(): void
{
}
/**
* Summary line here.
*
* This is a longer description spanning
* multiple lines.
* It might contain *markdown* or `code`.
*
* @since 1.0
*/
public function methodWithSummaryAndDescription(): void
{
}
/**
* Method with various parameter tags.
*
* @param string $param1 description for string param
* @param int|null $param2 description for nullable int param
* @param bool $param3 nothing to say
* @param $param4 Missing type
* @param array<string, mixed> $param5 array description
* @param \stdClass $param6 object param
*/
/* @phpstan-ignore-next-line missingType.parameter */
public function methodWithParams(string $param1, ?int $param2, bool $param3, $param4, array $param5, \stdClass $param6): void
{
}
/**
* Method with return tag.
*
* @return string the result of the operation
*/
public function methodWithReturn(): string
{
return '';
}
/**
* Method with multiple tags.
*
* @param float $value the value to process
*
* @return bool status of the operation
*
* @deprecated use newMethod() instead
* @see DocBlockTestFixture::newMethod()
*/
public function methodWithMultipleTags(float $value): bool
{
return true;
}
/**
* Malformed docblock - missing closing.
*/
public function methodWithMalformedDocBlock(): void
{
}
public function methodWithNoDocBlock(): void
{
}
// Some other method needed for a @see tag perhaps
public function newMethod(): void
{
}
}