Debian Codegraph @

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