Debian Codegraph @

vendor/zircote/swagger-php/src/Processors/Concerns/RefTrait.php

raw
1 <?php declare(strict_types=1);
2
3 /**
4 * @license Apache 2.0
5 */
6
7 namespace OpenApi\Processors\Concerns;
8
9 use OpenApi\Context;
10
11 trait RefTrait
12 {
13 protected function toRefKey(Context $context, ?string $name): string
14 {
15 $fqn = strtolower($context->fullyQualifiedName($name) ?? '');
16
17 return ltrim($fqn, '\\');
18 }
19
20 protected function isRef(?string $ref): bool
21 {
22 return $ref && str_starts_with($ref, '#/');
23 }
24 }