<commit_before><?php

declare(strict_types=1);

/*
 * This file is part of the ************************ package.
 * _____________                           _______________
 *  ______/     \__  _____  ____  ______  / /_  _________
 *   ____/ __   / / / / _ \/ __`\/ / __ \/ __ \/ __ \___
 *    __/ / /  / /_/ /  __/ /  \  / /_/ / / / / /_/ /__
 *      \_\ \_/\____/\___/_/   / / .___/_/ /_/ .___/
 *         \_\                /_/_/         /_/
 *
 * The PHP Framework For Code Poem As Free As Wind. <Query Yet Simple>
 * (c) 2010-2020 http://queryphp.com All rights reserved.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Leevel\Router;

use InvalidArgumentException;
use function Leevel\Support\Arr\normalize;
use Leevel\Support\Arr\normalize;
use OpenApi\Annotations\OpenApi;
use OpenApi\Annotations\PathItem;
use OpenApi\Context;
use function OpenApi\scan;

/**
 * OpenApi 注解路由.
 *
 * - 忽略已删除的路由 deprecated 和带有 leevelIgnore 的路由.
 * - 如果没有绑定路由参数 leevelBind,系统会尝试自动解析注解所在控制器方法.
 * - 只支持最新的 zircote/swagger-php 3，支持最新的 OpenApi 3.0 规范.
 *
 * @author <NAME> <<EMAIL>>
 *
 * @since 2018.04.10
 *
 * @version 1.0
 */
class OpenApiRouter
{
    /**
     * 路由中间件分析器.
     *
     * @var \Leevel\Router\MiddlewareParser
     */
    protected MiddlewareParser $middlewareParser;

    /**
     * 顶级域名.
     *
     * @var string
     */
    protected string $domain;

    /**
     * 扫描目录.
     *
     * @var array
     */
    protected array $scandirs = [];

    /**
     * 支持的方法.
     *
     * @var array
     */<commit_msg>fix(router): fix typed properties of router<commit_after><?php

declare(strict_types=1);

/*
 * This file is part of the ************************ package.
 * _____________                           _______________
 *  ______/     \__  _____  ____  ______  / /_  _________
 *   ____/ __   / / / / _ \/ __`\/ / __ \/ __ \/ __ \___
 *    __/ / /  / /_/ /  __/ /  \  / /_/ / / / / /_/ /__
 *      \_\ \_/\____/\___/_/   / / .___/_/ /_/ .___/
 *         \_\                /_/_/         /_/
 *
 * The PHP Framework For Code Poem As Free As Wind. <Query Yet Simple>
 * (c) 2010-2020 http://queryphp.com All rights reserved.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Leevel\Router;

use InvalidArgumentException;
use function Leevel\Support\Arr\normalize;
use Leevel\Support\Arr\normalize;
use OpenApi\Annotations\OpenApi;
use OpenApi\Annotations\PathItem;
use OpenApi\Context;
use function OpenApi\scan;

/**
 * OpenApi 注解路由.
 *
 * - 忽略已删除的路由 deprecated 和带有 leevelIgnore 的路由.
 * - 如果没有绑定路由参数 leevelBind,系统会尝试自动解析注解所在控制器方法.
 * - 只支持最新的 zircote/swagger-php 3，支持最新的 OpenApi 3.0 规范.
 *
 * @author <NAME> <<EMAIL>>
 *
 * @since 2018.04.10
 *
 * @version 1.0
 */
class OpenApiRouter
{
    /**
     * 路由中间件分析器.
     *
     * @var \Leevel\Router\MiddlewareParser
     */
    protected MiddlewareParser $middlewareParser;

    /**
     * 顶级域名.
     *
     * @var string
     */
    protected ?string $domain = null;

    /**
     * 扫描目录.
     *
     * @var array
     */
    protected array $scandirs = [];

    /**
     * 支持的方法.
     *
     * @var array
     */
{'fraction_non_alphanumeric': 0.15052115266707541, 'fraction_numerical': 0.0134886572654813, 'mean_word_length': 1.8876106194690265, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5611083', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1241, 'n_words': 226}