Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/Contact.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 Contact extends OA\Contact
14 {
15 /**
16 * @param array<string,mixed>|null $x
17 * @param list<Attachable>|null $attachables
18 */
19 public function __construct(
20 ?string $name = null,
21 ?string $url = null,
22 ?string $email = null,
23
24 // abstract annotation
25 ?array $x = null,
26 ?array $attachables = null
27 ) {
28 parent::__construct([
29 'name' => $name ?? Generator::UNDEFINED,
30 'url' => $url ?? Generator::UNDEFINED,
31 'email' => $email ?? Generator::UNDEFINED,
32 'x' => $x ?? Generator::UNDEFINED,
33 'attachables' => $attachables ?? Generator::UNDEFINED,
34 ]);
35 }
36 }