Debian Codegraph @

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