Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/Discriminator.php

raw
1 <?php declare(strict_types=1);
2
3 /**
4 * @license Apache 2.0
5 */
6
7 namespace OpenApi\Attributes;
8
9 use OpenApi\Annotations as OA;
10 use OpenApi\Generator;
11
12 #[\Attribute(\Attribute::TARGET_CLASS)]
13 class Discriminator extends OA\Discriminator
14 {
15 /**
16 * @param array<string,string>|null $mapping
17 * @param array<string,mixed>|null $x
18 * @param list<Attachable>|null $attachables
19 */
20 public function __construct(
21 ?string $propertyName = null,
22 ?array $mapping = null,
23
24 // abstract annotation
25 ?array $x = null,
26 ?array $attachables = null
27 ) {
28 parent::__construct([
29 'propertyName' => $propertyName ?? Generator::UNDEFINED,
30 'mapping' => $mapping ?? Generator::UNDEFINED,
31 'x' => $x ?? Generator::UNDEFINED,
32 'attachables' => $attachables ?? Generator::UNDEFINED,
33 ]);
34 }
35 }