Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/Info.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 Info extends OA\Info
14 {
15 /**
16 * @param array<string,mixed>|null $x
17 * @param list<Attachable>|null $attachables
18 */
19 public function __construct(
20 ?string $version = null,
21 ?string $description = Generator::UNDEFINED,
22 ?string $title = null,
23 ?string $termsOfService = null,
24 ?Contact $contact = null,
25 ?License $license = null,
26
27 // abstract annotation
28 ?array $x = null,
29 ?array $attachables = null
30 ) {
31 parent::__construct([
32 'version' => $version ?? Generator::UNDEFINED,
33 'description' => $description,
34 'title' => $title ?? Generator::UNDEFINED,
35 'termsOfService' => $termsOfService ?? Generator::UNDEFINED,
36 'x' => $x ?? Generator::UNDEFINED,
37 'attachables' => $attachables ?? Generator::UNDEFINED,
38 'value' => $this->combine($contact, $license),
39 ]);
40 }
41 }