Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SchemaMethod | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Attributes; |
| 3 | |
| 4 | use Apie\SchemaGenerator\SchemaProviders\SchemaAttributeProvider; |
| 5 | use Attribute; |
| 6 | |
| 7 | /** |
| 8 | * Adding a SchemaMethod attribute allows you to specify a static method to be used |
| 9 | * to create the OpenAPI schema. |
| 10 | * |
| 11 | * @see SchemaAttributeProvider |
| 12 | */ |
| 13 | #[Attribute(Attribute::TARGET_CLASS)] |
| 14 | class SchemaMethod |
| 15 | { |
| 16 | public string $methodName; |
| 17 | |
| 18 | public function __construct(string $methodName) |
| 19 | { |
| 20 | $this->methodName = $methodName; |
| 21 | } |
| 22 | } |