• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 18370496742

09 Oct 2025 08:35AM UTC coverage: 0.0% (-21.9%) from 21.92%
18370496742

push

github

soyuka
docs: changelog 4.2.2

0 of 56436 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Metadata/Extractor/YamlResourceExtractor.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Metadata\Extractor;
15

16
use ApiPlatform\Doctrine\Odm\State\Options as OdmOptions;
17
use ApiPlatform\Doctrine\Orm\State\Options as OrmOptions;
18
use ApiPlatform\Elasticsearch\State\Options as ElasticsearchOptions;
19
use ApiPlatform\Metadata\Exception\InvalidArgumentException;
20
use ApiPlatform\Metadata\GetCollection;
21
use ApiPlatform\Metadata\HeaderParameter;
22
use ApiPlatform\Metadata\Post;
23
use ApiPlatform\Metadata\QueryParameter;
24
use ApiPlatform\OpenApi\Model\ExternalDocumentation;
25
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
26
use ApiPlatform\OpenApi\Model\Parameter;
27
use ApiPlatform\OpenApi\Model\RequestBody;
28
use ApiPlatform\OpenApi\Model\Response;
29
use ApiPlatform\State\OptionsInterface;
30
use Symfony\Component\WebLink\Link;
31
use Symfony\Component\Yaml\Exception\ParseException;
32
use Symfony\Component\Yaml\Yaml;
33

34
/**
35
 * Extracts an array of metadata from a list of YAML files.
36
 *
37
 * @author Antoine Bluchet <soyuka@gmail.com>
38
 * @author Baptiste Meyer <baptiste.meyer@gmail.com>
39
 * @author Kévin Dunglas <dunglas@gmail.com>
40
 * @author Vincent Chalamon <vincentchalamon@gmail.com>
41
 */
42
final class YamlResourceExtractor extends AbstractResourceExtractor
43
{
44
    use ResourceExtractorTrait;
45

46
    /**
47
     * {@inheritdoc}
48
     */
49
    protected function extractPath(string $path): void
50
    {
51
        try {
52
            $resourcesYaml = Yaml::parse((string) file_get_contents($path), Yaml::PARSE_CONSTANT);
×
53
        } catch (ParseException $e) {
×
54
            $e->setParsedFile($path);
×
55

56
            throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
×
57
        }
58

59
        if (null === $resourcesYaml = $resourcesYaml['resources'] ?? $resourcesYaml) {
×
60
            return;
×
61
        }
62

63
        if (!\is_array($resourcesYaml)) {
×
64
            throw new InvalidArgumentException(\sprintf('"resources" setting is expected to be null or an array, %s given in "%s".', \gettype($resourcesYaml), $path));
×
65
        }
66

67
        $this->buildResources($resourcesYaml, $path);
×
68
    }
69

70
    private function buildResources(array $resourcesYaml, string $path): void
71
    {
72
        foreach ($resourcesYaml as $resourceName => $resourceYaml) {
×
73
            $resourceName = $this->resolve($resourceName);
×
74

75
            if (null === $resourceYaml) {
×
76
                $resourceYaml = [[]];
×
77
            }
78

79
            if (!\array_key_exists(0, $resourceYaml)) {
×
80
                $resourceYaml = [$resourceYaml];
×
81
            }
82

83
            foreach ($resourceYaml as $key => $resourceYamlDatum) {
×
84
                if (null === $resourceYamlDatum) {
×
85
                    $resourceYamlDatum = [];
×
86
                }
87

88
                try {
89
                    $base = $this->buildExtendedBase($resourceYamlDatum);
×
90
                    $this->resources[$resourceName][$key] = array_merge($base, [
×
91
                        'operations' => $this->buildOperations($resourceYamlDatum, $base),
×
92
                        'graphQlOperations' => $this->buildGraphQlOperations($resourceYamlDatum, $base),
×
93
                    ]);
×
94
                } catch (InvalidArgumentException $exception) {
×
95
                    throw new InvalidArgumentException(\sprintf('%s in "%s" (%s).', $exception->getMessage(), $resourceName, $path));
×
96
                }
97
            }
98
        }
99
    }
100

101
    private function buildExtendedBase(array $resource): array
102
    {
103
        return array_merge($this->buildBase($resource), [
×
104
            'uriTemplate' => $this->phpize($resource, 'uriTemplate', 'string'),
×
105
            'routePrefix' => $this->phpize($resource, 'routePrefix', 'string'),
×
106
            'stateless' => $this->phpize($resource, 'stateless', 'bool'),
×
107
            'sunset' => $this->phpize($resource, 'sunset', 'string'),
×
108
            'acceptPatch' => $this->phpize($resource, 'acceptPatch', 'string'),
×
109
            'host' => $this->phpize($resource, 'host', 'string'),
×
110
            'condition' => $this->phpize($resource, 'condition', 'string'),
×
111
            'controller' => $this->phpize($resource, 'controller', 'string'),
×
112
            'queryParameterValidationEnabled' => $this->phpize($resource, 'queryParameterValidationEnabled', 'bool'),
×
113
            'types' => $this->buildArrayValue($resource, 'types'),
×
114
            'cacheHeaders' => $this->buildArrayValue($resource, 'cacheHeaders'),
×
115
            'hydraContext' => $this->buildArrayValue($resource, 'hydraContext'),
×
116
            'openapi' => $this->buildOpenapi($resource),
×
117
            'paginationViaCursor' => $this->buildArrayValue($resource, 'paginationViaCursor'),
×
118
            'exceptionToStatus' => $this->buildArrayValue($resource, 'exceptionToStatus'),
×
119
            'defaults' => $this->buildArrayValue($resource, 'defaults'),
×
120
            'requirements' => $this->buildArrayValue($resource, 'requirements'),
×
121
            'options' => $this->buildArrayValue($resource, 'options'),
×
122
            'status' => $this->phpize($resource, 'status', 'integer'),
×
123
            'schemes' => $this->buildArrayValue($resource, 'schemes'),
×
124
            'formats' => $this->buildArrayValue($resource, 'formats'),
×
125
            'uriVariables' => $this->buildUriVariables($resource),
×
126
            'inputFormats' => $this->buildArrayValue($resource, 'inputFormats'),
×
127
            'outputFormats' => $this->buildArrayValue($resource, 'outputFormats'),
×
128
            'stateOptions' => $this->buildStateOptions($resource),
×
129
            'links' => $this->buildLinks($resource),
×
130
            'headers' => $this->buildHeaders($resource),
×
131
            'parameters' => $this->buildParameters($resource),
×
132
        ]);
×
133
    }
134

135
    private function buildBase(array $resource): array
136
    {
137
        return [
×
138
            'shortName' => $this->phpize($resource, 'shortName', 'string'),
×
139
            'description' => $this->phpize($resource, 'description', 'string'),
×
140
            'urlGenerationStrategy' => $this->phpize($resource, 'urlGenerationStrategy', 'integer'),
×
141
            'deprecationReason' => $this->phpize($resource, 'deprecationReason', 'string'),
×
142
            'fetchPartial' => $this->phpize($resource, 'fetchPartial', 'bool'),
×
143
            'forceEager' => $this->phpize($resource, 'forceEager', 'bool'),
×
144
            'paginationClientEnabled' => $this->phpize($resource, 'paginationClientEnabled', 'bool'),
×
145
            'paginationClientItemsPerPage' => $this->phpize($resource, 'paginationClientItemsPerPage', 'bool'),
×
146
            'paginationClientPartial' => $this->phpize($resource, 'paginationClientPartial', 'bool'),
×
147
            'paginationEnabled' => $this->phpize($resource, 'paginationEnabled', 'bool'),
×
148
            'paginationFetchJoinCollection' => $this->phpize($resource, 'paginationFetchJoinCollection', 'bool'),
×
149
            'paginationUseOutputWalkers' => $this->phpize($resource, 'paginationUseOutputWalkers', 'bool'),
×
150
            'paginationItemsPerPage' => $this->phpize($resource, 'paginationItemsPerPage', 'integer'),
×
151
            'paginationMaximumItemsPerPage' => $this->phpize($resource, 'paginationMaximumItemsPerPage', 'integer'),
×
152
            'paginationPartial' => $this->phpize($resource, 'paginationPartial', 'bool'),
×
153
            'paginationType' => $this->phpize($resource, 'paginationType', 'string'),
×
154
            'processor' => $this->phpize($resource, 'processor', 'string'),
×
155
            'provider' => $this->phpize($resource, 'provider', 'string'),
×
156
            'security' => $this->phpize($resource, 'security', 'string'),
×
157
            'securityMessage' => $this->phpize($resource, 'securityMessage', 'string'),
×
158
            'securityPostDenormalize' => $this->phpize($resource, 'securityPostDenormalize', 'string'),
×
159
            'securityPostDenormalizeMessage' => $this->phpize($resource, 'securityPostDenormalizeMessage', 'string'),
×
160
            'securityPostValidation' => $this->phpize($resource, 'securityPostValidation', 'string'),
×
161
            'securityPostValidationMessage' => $this->phpize($resource, 'securityPostValidationMessage', 'string'),
×
162
            'input' => $this->phpize($resource, 'input', 'bool|string'),
×
163
            'output' => $this->phpize($resource, 'output', 'bool|string'),
×
164
            'normalizationContext' => $this->buildArrayValue($resource, 'normalizationContext'),
×
165
            'denormalizationContext' => $this->buildArrayValue($resource, 'denormalizationContext'),
×
166
            'collectDenormalizationErrors' => $this->phpize($resource, 'collectDenormalizationErrors', 'bool'),
×
167
            'validationContext' => $this->buildArrayValue($resource, 'validationContext'),
×
168
            'filters' => $this->buildArrayValue($resource, 'filters'),
×
169
            'order' => $this->buildArrayValue($resource, 'order'),
×
170
            'extraProperties' => $this->buildArrayValue($resource, 'extraProperties'),
×
171
            'mercure' => $this->buildMercure($resource),
×
172
            'messenger' => $this->buildMessenger($resource),
×
173
            'read' => $this->phpize($resource, 'read', 'bool'),
×
174
            'write' => $this->phpize($resource, 'write', 'bool'),
×
175
            'jsonStream' => $this->phpize($resource, 'jsonStream', 'bool'),
×
176
        ];
×
177
    }
178

179
    private function buildUriVariables(array $resource): ?array
180
    {
181
        if (!\array_key_exists('uriVariables', $resource)) {
×
182
            return null;
×
183
        }
184

185
        $uriVariables = [];
×
186
        foreach ($resource['uriVariables'] as $parameterName => $data) {
×
187
            if (\is_string($data)) {
×
188
                $uriVariables[$data] = $data;
×
189
                continue;
×
190
            }
191

192
            if (2 === (is_countable($data) ? \count($data) : 0) && isset($data[0]) && isset($data[1])) {
×
193
                $data['fromClass'] = $data[0];
×
194
                $data['fromProperty'] = $data[1];
×
195
                unset($data[0], $data[1]);
×
196
            }
197
            if (isset($data['fromClass'])) {
×
198
                $uriVariables[$parameterName]['from_class'] = $this->resolve($data['fromClass']);
×
199
            }
200
            if (isset($data['fromProperty'])) {
×
201
                $uriVariables[$parameterName]['from_property'] = $data['fromProperty'];
×
202
            }
203
            if (isset($data['toClass'])) {
×
204
                $uriVariables[$parameterName]['to_class'] = $this->resolve($data['toClass']);
×
205
            }
206
            if (isset($data['toProperty'])) {
×
207
                $uriVariables[$parameterName]['to_property'] = $data['toProperty'];
×
208
            }
209
            if (isset($data['identifiers'])) {
×
210
                $uriVariables[$parameterName]['identifiers'] = $data['identifiers'];
×
211
            }
212
            if (isset($data['compositeIdentifier'])) {
×
213
                $uriVariables[$parameterName]['composite_identifier'] = $data['compositeIdentifier'];
×
214
            }
215
            if (isset($data['security'])) {
×
216
                $uriVariables[$parameterName]['security'] = $data['security'];
×
217
            }
218
        }
219

220
        return $uriVariables;
×
221
    }
222

223
    private function buildOpenapi(array $resource): bool|OpenApiOperation|null
224
    {
225
        if (!\array_key_exists('openapi', $resource)) {
×
226
            return null;
×
227
        }
228

229
        if (!\is_array($resource['openapi'])) {
×
230
            return $this->phpize($resource, 'openapi', 'bool');
×
231
        }
232

233
        $allowedProperties = array_map(fn (\ReflectionProperty $reflProperty): string => $reflProperty->getName(), (new \ReflectionClass(OpenApiOperation::class))->getProperties());
×
234
        foreach ($resource['openapi'] as $key => $value) {
×
235
            $resource['openapi'][$key] = match ($key) {
×
236
                'externalDocs' => new ExternalDocumentation(description: $value['description'] ?? '', url: $value['url'] ?? ''),
×
237
                'requestBody' => new RequestBody(description: $value['description'] ?? '', content: isset($value['content']) ? new \ArrayObject($value['content'] ?? []) : null, required: $value['required'] ?? false),
×
238
                'callbacks' => new \ArrayObject($value ?? []),
×
239
                'responses' => array_map(fn (array $response): Response => new Response(
×
240
                    description: $response['description'] ?? '',
×
241
                    headers: isset($response['headers']) ? new \ArrayObject($response['headers']) : null,
×
242
                    content: isset($response['content']) ? new \ArrayObject($response['content']) : null,
×
243
                    links: isset($response['links']) ? new \ArrayObject($response['links']) : null
×
244
                ), $value),
×
245
                default => $value,
×
246
            };
×
247

248
            if (\in_array($key, $allowedProperties, true)) {
×
249
                continue;
×
250
            }
251

252
            $resource['openapi']['extensionProperties'][$key] = $value;
×
253
            unset($resource['openapi'][$key]);
×
254
        }
255

256
        if (\array_key_exists('parameters', $resource['openapi']) && \is_array($openapiParameters = $resource['openapi']['parameters'] ?? [])) {
×
257
            $parameters = [];
×
258
            foreach ($openapiParameters as $parameter) {
×
259
                $parameters[] = new Parameter(
×
260
                    name: $parameter['name'],
×
261
                    in: $parameter['in'],
×
262
                    description: $parameter['description'] ?? '',
×
263
                    required: $parameter['required'] ?? false,
×
264
                    deprecated: $parameter['deprecated'] ?? false,
×
265
                    allowEmptyValue: $parameter['allowEmptyValue'] ?? false,
×
266
                    schema: $parameter['schema'] ?? [],
×
267
                    style: $parameter['style'] ?? null,
×
268
                    explode: $parameter['explode'] ?? false,
×
269
                    allowReserved: $parameter['allowReserved '] ?? false,
×
270
                    example: $parameter['example'] ?? null,
×
271
                    examples: isset($parameter['examples']) ? new \ArrayObject($parameter['examples']) : null,
×
272
                    content: isset($parameter['content']) ? new \ArrayObject($parameter['content']) : null
×
273
                );
×
274
            }
275
            $resource['openapi']['parameters'] = $parameters;
×
276
        }
277

278
        return new OpenApiOperation(...$resource['openapi']);
×
279
    }
280

281
    /**
282
     * @return bool|string|string[]|null
283
     */
284
    private function buildMercure(array $resource): array|bool|string|null
285
    {
286
        if (!\array_key_exists('mercure', $resource)) {
×
287
            return null;
×
288
        }
289

290
        if (\is_string($resource['mercure'])) {
×
291
            return $this->phpize($resource, 'mercure', 'bool|string');
×
292
        }
293

294
        return $resource['mercure'];
×
295
    }
296

297
    private function buildMessenger(array $resource): bool|array|string|null
298
    {
299
        if (!\array_key_exists('messenger', $resource)) {
×
300
            return null;
×
301
        }
302

303
        return $this->phpize($resource, 'messenger', 'bool|string');
×
304
    }
305

306
    private function buildOperations(array $resource, array $root): ?array
307
    {
308
        if (!\array_key_exists('operations', $resource)) {
×
309
            return null;
×
310
        }
311

312
        $data = [];
×
313
        foreach ($resource['operations'] as $class => $operation) {
×
314
            if (null === $operation) {
×
315
                $operation = [];
×
316
            }
317

318
            if (\array_key_exists('class', $operation)) {
×
319
                if (!\array_key_exists('name', $operation) && \is_string($class)) {
×
320
                    $operation['name'] = $class;
×
321
                }
322
                $class = $operation['class'];
×
323
            }
324

325
            if (empty($class)) {
×
326
                throw new InvalidArgumentException('Missing "class" attribute');
×
327
            }
328

329
            if (!class_exists($class)) {
×
330
                throw new InvalidArgumentException(\sprintf('Operation class "%s" does not exist', $class));
×
331
            }
332

333
            $datum = $this->buildExtendedBase($operation);
×
334
            foreach ($datum as $key => $value) {
×
335
                if (null === $value) {
×
336
                    $datum[$key] = $root[$key];
×
337
                }
338
            }
339

340
            if (\in_array((string) $class, [GetCollection::class, Post::class], true)) {
×
341
                $datum['itemUriTemplate'] = $this->phpize($operation, 'itemUriTemplate', 'string');
×
342
            } elseif (isset($operation['itemUriTemplate'])) {
×
343
                throw new InvalidArgumentException(\sprintf('"itemUriTemplate" option is not allowed on a %s operation.', $class));
×
344
            }
345

346
            $data[] = array_merge($datum, [
×
347
                'read' => $this->phpize($operation, 'read', 'bool'),
×
348
                'deserialize' => $this->phpize($operation, 'deserialize', 'bool'),
×
349
                'validate' => $this->phpize($operation, 'validate', 'bool'),
×
350
                'write' => $this->phpize($operation, 'write', 'bool'),
×
351
                'serialize' => $this->phpize($operation, 'serialize', 'bool'),
×
352
                'queryParameterValidate' => $this->phpize($operation, 'queryParameterValidate', 'bool'),
×
353
                'strictQueryParameterValidation' => $this->phpize($operation, 'strictQueryParameterValidation', 'bool'),
×
354
                'hideHydraOperation' => $this->phpize($resource, 'hideHydraOperation', 'bool'),
×
355
                'priority' => $this->phpize($operation, 'priority', 'integer'),
×
356
                'name' => $this->phpize($operation, 'name', 'string'),
×
357
                'class' => (string) $class,
×
358
            ]);
×
359
        }
360

361
        return $data;
×
362
    }
363

364
    private function buildGraphQlOperations(array $resource, array $root): ?array
365
    {
366
        if (!\array_key_exists('graphQlOperations', $resource) || !\is_array($resource['graphQlOperations'])) {
×
367
            return null;
×
368
        }
369

370
        $data = [];
×
371
        foreach ($resource['graphQlOperations'] as $class => $operation) {
×
372
            if (null === $operation) {
×
373
                $operation = [];
×
374
            }
375

376
            if (\array_key_exists('class', $operation)) {
×
377
                if (!\array_key_exists('name', $operation) && \is_string($class)) {
×
378
                    $operation['name'] = $class;
×
379
                }
380
                $class = $operation['class'];
×
381
            }
382

383
            if (empty($class)) {
×
384
                throw new InvalidArgumentException('Missing "class" attribute');
×
385
            }
386

387
            if (!class_exists($class)) {
×
388
                throw new InvalidArgumentException(\sprintf('Operation class "%s" does not exist', $class));
×
389
            }
390

391
            $datum = $this->buildBase($operation);
×
392
            foreach ($datum as $key => $value) {
×
393
                if (null === $value) {
×
394
                    $datum[$key] = $root[$key];
×
395
                }
396
            }
397

398
            $data[] = array_merge($datum, [
×
399
                'resolver' => $this->phpize($operation, 'resolver', 'string'),
×
400
                'args' => $operation['args'] ?? null,
×
401
                'extraArgs' => $operation['extraArgs'] ?? null,
×
402
                'class' => (string) $class,
×
403
                'read' => $this->phpize($operation, 'read', 'bool'),
×
404
                'deserialize' => $this->phpize($operation, 'deserialize', 'bool'),
×
405
                'validate' => $this->phpize($operation, 'validate', 'bool'),
×
406
                'write' => $this->phpize($operation, 'write', 'bool'),
×
407
                'serialize' => $this->phpize($operation, 'serialize', 'bool'),
×
408
                'priority' => $this->phpize($operation, 'priority', 'integer'),
×
409
                'name' => $this->phpize($operation, 'name', 'string'),
×
410
            ]);
×
411
        }
412

413
        return $data ?: null;
×
414
    }
415

416
    private function buildStateOptions(array $resource): ?OptionsInterface
417
    {
418
        $stateOptions = $resource['stateOptions'] ?? [];
×
419
        if (!\is_array($stateOptions)) {
×
420
            return null;
×
421
        }
422

423
        if (!$stateOptions) {
×
424
            return null;
×
425
        }
426

427
        $configuration = reset($stateOptions);
×
428
        switch (key($stateOptions)) {
×
429
            case 'elasticsearchOptions':
×
430
                if (class_exists(ElasticsearchOptions::class)) {
×
431
                    return new ElasticsearchOptions($configuration['index'] ?? null);
×
432
                }
433
                break;
×
434
            case 'doctrineOdmOptions':
×
435
                if (class_exists(OdmOptions::class)) {
×
436
                    return new OdmOptions($configuration['documentClass'] ?? null);
×
437
                }
438
                break;
×
439
            case 'doctrineOrmOptions':
×
440
                if (class_exists(OrmOptions::class)) {
×
441
                    return new OrmOptions($configuration['entityClass'] ?? null);
×
442
                }
443
                break;
×
444
        }
445

446
        return null;
×
447
    }
448

449
    /**
450
     * @return Link[]
451
     */
452
    private function buildLinks(array $resource): ?array
453
    {
454
        if (!isset($resource['links']) || !\is_array($resource['links'])) {
×
455
            return null;
×
456
        }
457

458
        $links = [];
×
459
        foreach ($resource['links'] as $link) {
×
460
            $links[] = new Link(rel: $link['rel'], href: $link['href']);
×
461
        }
462

463
        return $links;
×
464
    }
465

466
    /**
467
     * @return array<string, string>
468
     */
469
    private function buildHeaders(array $resource): ?array
470
    {
471
        if (!isset($resource['headers']) || !\is_array($resource['headers'])) {
×
472
            return null;
×
473
        }
474

475
        $headers = [];
×
476
        foreach ($resource['headers'] as $key => $value) {
×
477
            $headers[$key] = $value;
×
478
        }
479

480
        return $headers;
×
481
    }
482

483
    /**
484
     * @return array<string, \ApiPlatform\Metadata\Parameter>
485
     */
486
    private function buildParameters(array $resource): ?array
487
    {
488
        if (!isset($resource['parameters']) || !\is_array($resource['parameters'])) {
×
489
            return null;
×
490
        }
491

492
        $parameters = [];
×
493
        foreach ($resource['parameters'] as $key => $parameter) {
×
494
            $cl = ($parameter['in'] ?? 'query') === 'header' ? HeaderParameter::class : QueryParameter::class;
×
495
            $parameters[$key] = new $cl(
×
496
                key: $key,
×
497
                required: $this->phpize($parameter, 'required', 'bool'),
×
498
                schema: $parameter['schema'] ?? null,
×
499
                openApi: ($parameter['openapi'] ?? null) ? new Parameter(
×
500
                    name: $parameter['openapi']['name'],
×
501
                    in: $parameter['in'] ?? 'query',
×
502
                    description: $parameter['openapi']['description'] ?? '',
×
503
                    required: $parameter['openapi']['required'] ?? $parameter['required'] ?? false,
×
504
                    deprecated: $parameter['openapi']['deprecated'] ?? false,
×
505
                    allowEmptyValue: $parameter['openapi']['allowEmptyValue'] ?? false,
×
506
                    schema: $parameter['openapi']['schema'] ?? $parameter['schema'] ?? [],
×
507
                    style: $parameter['openapi']['style'] ?? null,
×
508
                    explode: $parameter['openapi']['explode'] ?? false,
×
509
                    allowReserved: $parameter['openapi']['allowReserved '] ?? false,
×
510
                    example: $parameter['openapi']['example'] ?? null,
×
511
                    examples: isset($parameter['openapi']['examples']) ? new \ArrayObject($parameter['openapi']['examples']) : null,
×
512
                    content: isset($parameter['openapi']['content']) ? new \ArrayObject($parameter['openapi']['content']) : null
×
513
                ) : null,
×
514
                provider: $this->phpize($parameter, 'provider', 'string'),
×
515
                filter: $this->phpize($parameter, 'filter', 'string'),
×
516
                property: $this->phpize($parameter, 'property', 'string'),
×
517
                description: $this->phpize($parameter, 'description', 'string'),
×
518
                priority: $this->phpize($parameter, 'priority', 'integer'),
×
519
                extraProperties: $this->buildArrayValue($parameter, 'extraProperties') ?? [],
×
520
            );
×
521
        }
522

523
        return $parameters;
×
524
    }
525
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc