55use Attribute ;
66use Doctrine \Common \Annotations \Annotation \NamedArgumentConstructor ;
77use Orisai \Exceptions \Logic \InvalidArgument ;
8- use Orisai \ObjectMapper \Meta \Shared \DocMeta ;
98use function sprintf ;
109
1110/**
1413 * @Target({"CLASS", "PROPERTY"})
1514 */
1615#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY )]
17- final class Examples implements DocDefinition
16+ final class Examples extends DocDefinition
1817{
1918
20- /** @var array<DocMeta > */
19+ /** @var array<Example > */
2120 private array $ examples ;
2221
2322 /**
@@ -30,7 +29,7 @@ public function __construct(array $examples)
3029
3130 /**
3231 * @param array<mixed> $examples
33- * @return array<DocMeta >
32+ * @return array<Example >
3433 */
3534 private function resolveExamples (array $ examples ): array
3635 {
@@ -43,13 +42,13 @@ private function resolveExamples(array $examples): array
4342 ));
4443 }
4544
46- $ examples [$ key ] = new DocMeta ( $ example-> getType (), $ example -> getArgs ()) ;
45+ $ examples [$ key ] = $ example ;
4746 }
4847
4948 return $ examples ;
5049 }
5150
52- public function getType (): string
51+ public function getHandler (): string
5352 {
5453 return ExamplesDoc::class;
5554 }
@@ -61,4 +60,9 @@ public function getArgs(): array
6160 ];
6261 }
6362
63+ public function getScope (): string
64+ {
65+ return ExamplesDoc::class;
66+ }
67+
6468}
0 commit comments