| {"repo_name": "hypervel", "file_name": "/hypervel/app/Http/Controllers/IndexController.php", "inference_info": {"prefix_code": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nuse Hypervel\\Http\\Request;\n\n", "suffix_code": "\n", "middle_code": "class IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n $user = $request->input('user', 'Hypervel');\n $method = $request->getMethod();\n return [\n 'method' => $method,\n 'message' => \"Hello {$user}.\",\n ];\n }\n}", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "php", "sub_task_type": null}, "context_code": [["/hypervel/app/Exceptions/Handler.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Exceptions;\n\nuse Hypervel\\Foundation\\Exceptions\\Handler as ExceptionHandler;\nuse Hypervel\\Http\\Request;\nuse Throwable;\n\nclass Handler extends ExceptionHandler\n{\n /**\n * The list of the inputs that are never flashed to the session on validation exceptions.\n *\n * @var array<int, string>\n */\n protected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\n\n /**\n * Register the exception handling callbacks for the application.\n */\n public function register(): void\n {\n // return json when path start with `api`\n $this->shouldRenderJsonWhen(function (Request $request, Throwable $e) {\n return str_starts_with($path = $request->path(), 'api')\n && (strlen($path) === 3 || $path[3] === '/');\n });\n\n $this->reportable(function (Throwable $e) {\n });\n }\n}\n"], ["/hypervel/app/Http/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http;\n\nuse Hypervel\\Foundation\\Http\\Kernel as HttpKernel;\n\nclass Kernel extends HttpKernel\n{\n /**\n * The application's global HTTP middleware stack.\n *\n * These middleware are run during every request to your application.\n *\n * @var array<int, class-string|string>\n */\n protected array $middleware = [\n // \\App\\Http\\Middleware\\TrimStrings::class,\n // \\App\\Http\\Middleware\\ConvertEmptyStringsToNull::class\n ];\n\n /**\n * The application's route middleware groups.\n *\n * @var array<string, array<int, class-string|string>>\n */\n protected array $middlewareGroups = [\n 'web' => [\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ],\n\n 'api' => [\n // 'throttle:60,1,api',\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n ],\n ];\n\n /**\n * The application's middleware aliases.\n *\n * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.\n *\n * @var array<string, class-string|string>\n */\n protected array $middlewareAliases = [\n 'auth' => \\App\\Http\\Middleware\\Authenticate::class,\n 'can' => \\Hypervel\\Auth\\Middleware\\Authorize::class,\n 'throttle' => \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n 'bindings' => \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n 'signed' => \\App\\Http\\Middleware\\ValidateSignature::class,\n ];\n\n /**\n * The priority-sorted list of middleware.\n *\n * Forces non-global middleware to always be in the given order.\n *\n * @var string[]\n */\n protected array $middlewarePriority = [\n // \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ];\n}\n"], ["/hypervel/app/Console/Commands/DemoCommand.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console\\Commands;\n\nuse Hypervel\\Console\\Command;\n\nclass DemoCommand extends Command\n{\n protected ?string $signature = 'demo:hi {--name=}';\n\n protected string $description = 'Hyperf Demo Command';\n\n public function handle()\n {\n $this->info('Hello ' . ($this->option('name') ?: 'Hypervel'));\n }\n}\n"], ["/hypervel/app/Http/Requests/DemoRequest.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Requests;\n\nuse Hypervel\\Foundation\\Http\\FormRequest;\n\nclass DemoRequest extends FormRequest\n{\n /**\n * Determine if the user is authorized to make this request.\n */\n public function authorize(): bool\n {\n return true;\n }\n\n /**\n * Get the validation rules that apply to the request.\n */\n public function rules(): array\n {\n return [\n 'name' => 'required|string|min:3',\n 'email' => 'required|email',\n 'email2' => 'required|array',\n ];\n }\n}\n"], ["/hypervel/app/Listeners/DbQueryExecutedListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hyperf\\Collection\\Arr;\nuse Hyperf\\Database\\Events\\QueryExecuted;\nuse Hyperf\\Event\\Contract\\ListenerInterface;\nuse Hyperf\\Framework\\Logger\\StdoutLogger;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\nclass DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(StdoutLogger::class);\n }\n\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n\n /**\n * @param QueryExecuted $event\n */\n public function process(object $event): void\n {\n if ($event instanceof QueryExecuted) {\n $sql = $event->sql;\n if (! Arr::isAssoc($event->bindings)) {\n $position = 0;\n foreach ($event->bindings as $value) {\n $position = strpos($sql, '?', $position);\n if ($position === false) {\n break;\n }\n $value = \"'{$value}'\";\n $sql = substr_replace($sql, $value, $position, 1);\n $position += strlen($value);\n }\n }\n\n $this->logger->info(sprintf('[%s] %s', $event->time, $sql));\n }\n }\n}\n"], ["/hypervel/app/Providers/RouteServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\RouteServiceProvider as BaseServiceProvider;\nuse Hypervel\\Support\\Facades\\Route;\n\nclass RouteServiceProvider extends BaseServiceProvider\n{\n /**\n * The route files for the application.\n */\n protected array $routes = [\n ];\n\n public function boot(): void\n {\n parent::boot();\n\n Route::group(\n '/api',\n base_path('routes/api.php'),\n ['middleware' => 'api']\n );\n\n Route::group(\n '/',\n base_path('routes/web.php'),\n ['middleware' => 'web']\n );\n }\n}\n"], ["/hypervel/app/Console/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console;\n\nuse Hypervel\\Console\\Scheduling\\Schedule;\nuse Hypervel\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n /**\n * Define the application's command schedule.\n */\n public function schedule(Schedule $schedule): void\n {\n // $schedule->command('demo:hi')->everyFiveSeconds();\n }\n\n public function commands(): void\n {\n $this->load(__DIR__ . '/Commands');\n\n require base_path('routes/console.php');\n }\n}\n"], ["/hypervel/routes/channels.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Broadcast;\n\n/*\n|--------------------------------------------------------------------------\n| Broadcast Channels\n|--------------------------------------------------------------------------\n|\n| Here you may register all of the event broadcasting channels that your\n| application supports. The given channel authorization callbacks are\n| used to check if an authenticated user can listen to the channel.\n|\n*/\n\nBroadcast::channel('App.Models.User.{id}', function ($user, $id) {\n return (int) $user->id === (int) $id;\n});\n"], ["/hypervel/app/Providers/EventServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\EventServiceProvider as BaseServiceProvider;\n\nclass EventServiceProvider extends BaseServiceProvider\n{\n /**\n * The event listener mappings for the application.\n */\n protected array $listen = [\n \\App\\Events\\DemoEvent::class => [\n \\App\\Listeners\\DemoListener::class,\n ],\n ];\n}\n"], ["/hypervel/app/Http/Middleware/ValidateSignature.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Router\\Middleware\\ValidateSignature as Middleware;\n\nclass ValidateSignature extends Middleware\n{\n /**\n * The names of the query string parameters that should be ignored.\n *\n * @var array<int, string>\n */\n protected array $except = [\n // 'fbclid',\n // 'utm_campaign',\n // 'utm_content',\n // 'utm_medium',\n // 'utm_source',\n // 'utm_term',\n ];\n}\n"], ["/hypervel/app/Models/User.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n /**\n * The attributes that are mass assignable.\n */\n protected array $fillable = [\n 'name',\n 'email',\n 'email_verified_at',\n 'password',\n ];\n}\n"], ["/hypervel/routes/console.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Artisan;\nuse Hypervel\\Support\\Facades\\Schedule;\n\n/*\n|--------------------------------------------------------------------------\n| Console Routes\n|--------------------------------------------------------------------------\n|\n| This file is where you may define all of your Closure based console\n| commands. Each Closure is bound to a command instance allowing a\n| simple approach to interacting with each command's IO methods.\n|\n*/\n\nArtisan::command('hello', function () {\n $this->comment('Hypervel is awesome!');\n})->purpose('This is a demo closure command.');\n\n// Schedule::command('hello')->everyFiveSeconds();\n"], ["/hypervel/lang/en/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => 'The :attribute must be accepted.',\n 'accepted_if' => 'The :attribute must be accepted when :other is :value.',\n 'active_url' => 'The :attribute is not a valid URL.',\n 'after' => 'The :attribute must be a date after :date.',\n 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',\n 'alpha' => 'The :attribute may only contain letters.',\n 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',\n 'alpha_num' => 'The :attribute may only contain letters and numbers.',\n 'array' => 'The :attribute must be an array.',\n 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.',\n 'before' => 'The :attribute must be a date before :date.',\n 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',\n 'between' => [\n 'numeric' => 'The :attribute must be between :min and :max.',\n 'file' => 'The :attribute must be between :min and :max kilobytes.',\n 'string' => 'The :attribute must be between :min and :max characters.',\n 'array' => 'The :attribute must have between :min and :max items.',\n ],\n 'boolean' => 'The :attribute field must be true or false.',\n 'confirmed' => 'The :attribute confirmation does not match.',\n 'date' => 'The :attribute is not a valid date.',\n 'date_equals' => 'The :attribute must be a date equal to :date.',\n 'date_format' => 'The :attribute does not match the format :format.',\n 'decimal' => 'The :attribute must have :decimal decimal places.',\n 'declined' => 'The :attribute must be declined.',\n 'declined_if' => 'The :attribute must be declined when :other is :value.',\n 'different' => 'The :attribute and :other must be different.',\n 'digits' => 'The :attribute must be :digits digits.',\n 'digits_between' => 'The :attribute must be between :min and :max digits.',\n 'dimensions' => 'The :attribute has invalid image dimensions.',\n 'distinct' => 'The :attribute field has a duplicate value.',\n 'doesnt_end_with' => 'The :attribute must not end with one of the following: :values.',\n 'doesnt_start_with' => 'The :attribute must not start with one of the following: :values.',\n 'email' => 'The :attribute must be a valid email address.',\n 'ends_with' => 'The :attribute must end with one of the following: :values.',\n 'exists' => 'The selected :attribute is invalid.',\n 'file' => 'The :attribute must be a file.',\n 'filled' => 'The :attribute field is required.',\n 'gt' => [\n 'numeric' => 'The :attribute must be greater than :value',\n 'file' => 'The :attribute must be greater than :value kb',\n 'string' => 'The :attribute must be greater than :value characters',\n 'array' => 'The :attribute must be greater than :value items',\n ],\n 'gte' => [\n 'numeric' => 'The :attribute must be great than or equal to :value',\n 'file' => 'The :attribute must be great than or equal to :value kb',\n 'string' => 'The :attribute must be great than or equal to :value characters',\n 'array' => 'The :attribute must be great than or equal to :value items',\n ],\n 'image' => 'The :attribute must be an image.',\n 'in' => 'The selected :attribute is invalid.',\n 'in_array' => 'The :attribute field does not exist in :other.',\n 'integer' => 'The :attribute must be an integer.',\n 'ip' => 'The :attribute must be a valid IP address.',\n 'ipv4' => 'The :attribute must be a valid IPv4 address.',\n 'ipv6' => 'The :attribute must be a valid IPv6 address.',\n 'json' => 'The :attribute must be a valid JSON string.',\n 'list' => 'The :attribute must be a list.',\n 'lowercase' => 'The :attribute must be lowercase.',\n 'lt' => [\n 'numeric' => 'The :attribute must be less than :value',\n 'file' => 'The :attribute must be less than :value kb',\n 'string' => 'The :attribute must be less than :value characters',\n 'array' => 'The :attribute must be less than :value items',\n ],\n 'lte' => [\n 'numeric' => 'The :attribute must be less than or equal to :value',\n 'file' => 'The :attribute must be less than or equal to :value kb',\n 'string' => 'The :attribute must be less than or equal to :value characters',\n 'array' => 'The :attribute must be less than or equal to :value items',\n ],\n 'max' => [\n 'numeric' => 'The :attribute may not be greater than :max.',\n 'file' => 'The :attribute may not be greater than :max kilobytes.',\n 'string' => 'The :attribute may not be greater than :max characters.',\n 'array' => 'The :attribute may not have more than :max items.',\n ],\n 'max_digits' => 'The :attribute must not have more than :max digits.',\n 'mimes' => 'The :attribute must be a file of type: :values.',\n 'mimetypes' => 'The :attribute must be a file of type: :values.',\n 'min' => [\n 'numeric' => 'The :attribute must be at least :min.',\n 'file' => 'The :attribute must be at least :min kilobytes.',\n 'string' => 'The :attribute must be at least :min characters.',\n 'array' => 'The :attribute must have at least :min items.',\n ],\n 'min_digits' => 'The :attribute must have at least :min digits.',\n 'missing' => 'The :attribute must be missing.',\n 'missing_if' => 'The :attribute must be missing when :other is :value.',\n 'missing_unless' => 'The :attribute must be missing unless :other is :value.',\n 'missing_with' => 'The :attribute must be missing when :values is present.',\n 'missing_with_all' => 'The :attribute must be missing when :values are present.',\n 'multiple_of' => 'The :attribute must be a multiple of :value.',\n 'not_in' => 'The selected :attribute is invalid.',\n 'not_regex' => 'The :attribute cannot match a given regular rule.',\n 'numeric' => 'The :attribute must be a number.',\n 'present' => 'The :attribute field must be present.',\n 'prohibits' => 'The :attribute field must be present.',\n 'regex' => 'The :attribute format is invalid.',\n 'required' => 'The :attribute field is required.',\n 'required_if' => 'The :attribute field is required when :other is :value.',\n 'required_unless' => 'The :attribute field is required unless :other is in :values.',\n 'required_with' => 'The :attribute field is required when :values is present.',\n 'required_with_all' => 'The :attribute field is required when :values is present.',\n 'required_without' => 'The :attribute field is required when :values is not present.',\n 'required_without_all' => 'The :attribute field is required when none of :values are present.',\n 'exclude' => 'The :attribute field is excluded.',\n 'exclude_if' => 'The :attribute field is excluded when :other is :value.',\n 'exclude_unless' => 'The :attribute field is excluded unless :other is in :values.',\n 'exclude_with' => 'The :attribute field is excluded when :values is present.',\n 'exclude_without' => 'The :attribute field is excluded when :values is not present.',\n 'same' => 'The :attribute and :other must match.',\n 'size' => [\n 'numeric' => 'The :attribute must be :size.',\n 'file' => 'The :attribute must be :size kilobytes.',\n 'string' => 'The :attribute must be :size characters.',\n 'array' => 'The :attribute must contain :size items.',\n ],\n 'starts_with' => 'The :attribute must be start with :values ',\n 'string' => 'The :attribute must be a string.',\n 'timezone' => 'The :attribute must be a valid zone.',\n 'unique' => 'The :attribute has already been taken.',\n 'uploaded' => 'The :attribute failed to upload.',\n 'uppercase' => 'The :attribute must be uppercase.',\n 'url' => 'The :attribute format is invalid.',\n 'ulid' => 'The :attribute must be a valid ULID.',\n 'uuid' => 'The :attribute is invalid UUID.',\n 'max_if' => [\n 'numeric' => 'The :attribute may not be greater than :max when :other is :value.',\n 'file' => 'The :attribute may not be greater than :max kilobytes when :other is :value.',\n 'string' => 'The :attribute may not be greater than :max characters when :other is :value.',\n 'array' => 'The :attribute may not have more than :max items when :other is :value.',\n ],\n 'min_if' => [\n 'numeric' => 'The :attribute must be at least :min when :other is :value.',\n 'file' => 'The :attribute must be at least :min kilobytes when :other is :value.',\n 'string' => 'The :attribute must be at least :min characters when :other is :value.',\n 'array' => 'The :attribute must have at least :min items when :other is :value.',\n ],\n 'between_if' => [\n 'numeric' => 'The :attribute must be between :min and :max when :other is :value.',\n 'file' => 'The :attribute must be between :min and :max kilobytes when :other is :value.',\n 'string' => 'The :attribute must be between :min and :max characters when :other is :value.',\n 'array' => 'The :attribute must have between :min and :max items when :other is :value.',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => 'The :attribute must be a valid phone number',\n 'telephone_number' => 'The :attribute must be a valid telephone number',\n\n 'chinese_word' => 'The :attribute must contain valid characters(chinese/english character, number, underscore)',\n 'sequential_array' => 'The :attribute must be sequential array',\n];\n"], ["/hypervel/lang/zh_CN/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => ':attribute 必须接受',\n 'active_url' => ':attribute 必须是一个合法的 URL',\n 'after' => ':attribute 必须是 :date 之后的一个日期',\n 'after_or_equal' => ':attribute 必须是 :date 之后或相同的一个日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、数字、中划线或下划线',\n 'alpha_num' => ':attribute 只能包含字母和数字',\n 'array' => ':attribute 必须是一个数组',\n 'before' => ':attribute 必须是 :date 之前的一个日期',\n 'before_or_equal' => ':attribute 必须是 :date 之前或相同的一个日期',\n 'between' => [\n 'numeric' => ':attribute 必须在 :min 到 :max 之间',\n 'file' => ':attribute 必须在 :min 到 :max kb 之间',\n 'string' => ':attribute 必须在 :min 到 :max 个字符之间',\n 'array' => ':attribute 必须在 :min 到 :max 项之间',\n ],\n 'boolean' => ':attribute 字符必须是 true 或 false, 1 或 0',\n 'confirmed' => ':attribute 二次确认不匹配',\n 'date' => ':attribute 必须是一个合法的日期',\n 'date_format' => ':attribute 与给定的格式 :format 不符合',\n 'decimal' => ':attribute 必须有 :decimal 位小数',\n 'different' => ':attribute 必须不同于 :other',\n 'digits' => ':attribute 必须是 :digits 位',\n 'digits_between' => ':attribute 必须在 :min 和 :max 位之间',\n 'dimensions' => ':attribute 具有无效的图片尺寸',\n 'distinct' => ':attribute 字段具有重复值',\n 'email' => ':attribute 必须是一个合法的电子邮件地址',\n 'exists' => '选定的 :attribute 是无效的',\n 'file' => ':attribute 必须是一个文件',\n 'filled' => ':attribute 的字段是必填的',\n 'gt' => [\n 'numeric' => ':attribute 必须大于 :value',\n 'file' => ':attribute 必须大于 :value kb',\n 'string' => ':attribute 必须大于 :value 个字符',\n 'array' => ':attribute 必须大于 :value 项',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必须大于等于 :value',\n 'file' => ':attribute 必须大于等于 :value kb',\n 'string' => ':attribute 必须大于等于 :value 个字符',\n 'array' => ':attribute 必须大于等于 :value 项',\n ],\n 'image' => ':attribute 必须是 jpg, jpeg, png, bmp 或者 gif 格式的图片',\n 'in' => '选定的 :attribute 是无效的',\n 'in_array' => ':attribute 字段不存在于 :other',\n 'integer' => ':attribute 必须是个整数',\n 'ip' => ':attribute 必须是一个合法的 IP 地址',\n 'ipv4' => ':attribute 必须是一个合法的 IPv4 地址',\n 'ipv6' => ':attribute 必须是一个合法的 IPv6 地址',\n 'json' => ':attribute 必须是一个合法的 JSON 字符串',\n 'list' => ':attribute 必须是一个数组列表',\n 'lt' => [\n 'numeric' => ':attribute 必须小于 :value',\n 'file' => ':attribute 必须小于 :value kb',\n 'string' => ':attribute 必须小于 :value 个字符',\n 'array' => ':attribute 必须小于 :value 项',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必须小于等于 :value',\n 'file' => ':attribute 必须小于等于 :value kb',\n 'string' => ':attribute 必须小于等于 :value 个字符',\n 'array' => ':attribute 必须小于等于 :value 项',\n ],\n 'max' => [\n 'numeric' => ':attribute 的最大值为 :max',\n 'file' => ':attribute 的最大为 :max kb',\n 'string' => ':attribute 的最大长度为 :max 字符',\n 'array' => ':attribute 至多有 :max 项',\n ],\n 'mimes' => ':attribute 的文件类型必须是 :values',\n 'mimetypes' => ':attribute 的文件MIME必须是 :values',\n 'min' => [\n 'numeric' => ':attribute 的最小值为 :min',\n 'file' => ':attribute 大小至少为 :min kb',\n 'string' => ':attribute 的最小长度为 :min 字符',\n 'array' => ':attribute 至少有 :min 项',\n ],\n 'not_in' => '选定的 :attribute 是无效的',\n 'not_regex' => ':attribute 不能匹配给定的正则',\n 'numeric' => ':attribute 必须是数字',\n 'present' => ':attribute 字段必须存在',\n 'prohibits' => '必须提供 :attribute 字段',\n 'regex' => ':attribute 格式是无效的',\n 'required' => ':attribute 字段是必须的',\n 'required_if' => ':attribute 字段是必须的当 :other 是 :value',\n 'required_unless' => ':attribute 字段是必须的,除非 :other 是在 :values 中',\n 'required_with' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_with_all' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_without' => ':attribute 字段是必须的当 :values 是不存在的',\n 'required_without_all' => ':attribute 字段是必须的当 没有一个 :values 是存在的',\n 'exclude' => ':attribute 字段是被排除的',\n 'exclude_if' => '当 :other 为 :value 时,排除 :attribute 字段',\n 'exclude_unless' => '除非 :other 是在 :values 中,否则排除 :attribute 字段',\n 'exclude_with' => '当 :values 存在时,排除 :attribute 字段',\n 'exclude_without' => '当 :values 不存在时,排除 :attribute 字段',\n 'same' => ':attribute 和 :other 必须匹配',\n 'size' => [\n 'numeric' => ':attribute 必须是 :size',\n 'file' => ':attribute 必须是 :size kb',\n 'string' => ':attribute 必须是 :size 个字符',\n 'array' => ':attribute 必须包括 :size 项',\n ],\n 'starts_with' => ':attribute 必须以 :values 为开头',\n 'string' => ':attribute 必须是一个字符串',\n 'timezone' => ':attribute 必须是个有效的时区',\n 'unique' => ':attribute 已存在',\n 'uploaded' => ':attribute 上传失败',\n 'url' => ':attribute 无效的格式',\n 'uuid' => ':attribute 无效的UUID格式',\n 'max_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 不能大于 :max',\n 'file' => '当 :other 为 :value 时 :attribute 不能大于 :max kb',\n 'string' => '当 :other 为 :value 时 :attribute 不能大于 :max 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 最多只有 :max 个单元',\n ],\n 'min_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须大于等于 :min',\n 'file' => '当 :other 为 :value 时 :attribute 大小不能小于 :min kb',\n 'string' => '当 :other 为 :value 时 :attribute 至少为 :min 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 至少有 :min 个单元',\n ],\n 'between_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 之间',\n 'file' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max kb 之间',\n 'string' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 个字符之间',\n 'array' => '当 :other 为 :value 时 :attribute 必须只有 :min - :max 个单元',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必须为一个有效的电话号码',\n 'telephone_number' => ':attribute 必须为一个有效的手机号码',\n\n 'chinese_word' => ':attribute 必须包含以下有效字符 (中文/英文,数字, 下划线)',\n 'sequential_array' => ':attribute 必须是一个有序数组',\n];\n"], ["/hypervel/lang/zh_TW/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => '必須接受 :attribute',\n 'active_url' => ':attribute 必須是有效的網址',\n 'after' => ':attribute 必須是 :date 之後的日期',\n 'after_or_equal' => ':attribute 必須是 :date 之後或相同的日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、數字、連接線或底線',\n 'alpha_num' => ':attribute 只能包含字母和數字',\n 'array' => ':attribute 必須是陣列',\n 'before' => ':attribute 必須是 :date 之前的日期',\n 'before_or_equal' => ':attribute 必須是 :date 之前或相同的日期',\n 'between' => [\n 'numeric' => ':attribute 必須介於 :min 至 :max 之間',\n 'file' => ':attribute 必須介於 :min 至 :max KB 之間',\n 'string' => ':attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => ':attribute 必須有 :min 至 :max 個項目',\n ],\n 'boolean' => ':attribute 欄位必須是 true 或 false、1 或 0',\n 'confirmed' => ':attribute 確認欄位不相符',\n 'date' => ':attribute 必須是有效的日期',\n 'date_format' => ':attribute 與格式 :format 不符',\n 'decimal' => ':attribute 必須有 :decimal 位小數',\n 'different' => ':attribute 與 :other 必須不同',\n 'digits' => ':attribute 必須是 :digits 位數字',\n 'digits_between' => ':attribute 必須介於 :min 至 :max 位數字',\n 'dimensions' => ':attribute 圖片尺寸不正確',\n 'distinct' => ':attribute 已經存在',\n 'email' => ':attribute 必須是有效的電子郵件位址',\n 'exists' => '所選擇的 :attribute 無效',\n 'file' => ':attribute 必須是檔案',\n 'filled' => ':attribute 不能留空',\n 'gt' => [\n 'numeric' => ':attribute 必須大於 :value',\n 'file' => ':attribute 必須大於 :value KB',\n 'string' => ':attribute 必須多於 :value 個字元',\n 'array' => ':attribute 必須多於 :value 個項目',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必須大於或等於 :value',\n 'file' => ':attribute 必須大於或等於 :value KB',\n 'string' => ':attribute 必須多於或等於 :value 個字元',\n 'array' => ':attribute 必須多於或等於 :value 個項目',\n ],\n 'image' => ':attribute 必須是 jpg、jpeg、png、bmp 或 gif 格式的圖片',\n 'in' => '所選的 :attribute 無效',\n 'in_array' => ':attribute 欄位不存在於 :other',\n 'integer' => ':attribute 必須是整數',\n 'ip' => ':attribute 必須是有效的 IP 位址',\n 'ipv4' => ':attribute 必須是有效的 IPv4 位址',\n 'ipv6' => ':attribute 必須是有效的 IPv6 位址',\n 'json' => ':attribute 必須是有效的 JSON 字串',\n 'list' => ':attribute 必須是陣列列表',\n 'lt' => [\n 'numeric' => ':attribute 必須小於 :value',\n 'file' => ':attribute 必須小於 :value KB',\n 'string' => ':attribute 必須少於 :value 個字元',\n 'array' => ':attribute 必須少於 :value 個項目',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必須小於或等於 :value',\n 'file' => ':attribute 必須小於或等於 :value KB',\n 'string' => ':attribute 必須少於或等於 :value 個字元',\n 'array' => ':attribute 必須少於或等於 :value 個項目',\n ],\n 'max' => [\n 'numeric' => ':attribute 不能大於 :max',\n 'file' => ':attribute 不能大於 :max KB',\n 'string' => ':attribute 不能多於 :max 個字元',\n 'array' => ':attribute 最多有 :max 個項目',\n ],\n 'mimes' => ':attribute 必須為 :values 的檔案類型',\n 'mimetypes' => ':attribute 必須為 :values 的檔案 MIME',\n 'min' => [\n 'numeric' => ':attribute 不能小於 :min',\n 'file' => ':attribute 不能小於 :min KB',\n 'string' => ':attribute 不能少於 :min 個字元',\n 'array' => ':attribute 至少要有 :min 個項目',\n ],\n 'not_in' => '所選擇的 :attribute 無效',\n 'not_regex' => ':attribute 的格式錯誤',\n 'numeric' => ':attribute 必須為數字',\n 'present' => ':attribute 必須存在',\n 'prohibits' => '必須提供 :attribute 欄位',\n 'regex' => ':attribute 的格式錯誤',\n 'required' => ':attribute 不能留空',\n 'required_if' => '當 :other 是 :value 時 :attribute 不能留空',\n 'required_unless' => '當 :other 不是 :values 時 :attribute 不能留空',\n 'required_with' => '當 :values 出現時 :attribute 不能留空',\n 'required_with_all' => '當 :values 出現時 :attribute 不能留空',\n 'required_without' => '當 :values 留空時 :attribute 不能留空',\n 'required_without_all' => '當 :values 都不出現時 :attribute 不能留空',\n 'exclude' => ':attribute 欄位被排除',\n 'exclude_if' => '當 :other 為 :value 時,排除 :attribute 欄位',\n 'exclude_unless' => '除非 :other 在 :values 中,否則排除 :attribute 欄位',\n 'exclude_with' => '當 :values 存在時,排除 :attribute 欄位',\n 'exclude_without' => '當 :values 不存在時,排除 :attribute 欄位',\n 'same' => ':attribute 與 :other 必須相同',\n 'size' => [\n 'numeric' => ':attribute 必須是 :size',\n 'file' => ':attribute 必須是 :size KB',\n 'string' => ':attribute 必須是 :size 個字元',\n 'array' => ':attribute 必須包含 :size 個項目',\n ],\n 'starts_with' => ':attribute 必須以 :values 開頭',\n 'string' => ':attribute 必須是字串',\n 'timezone' => ':attribute 必須是有效的時區',\n 'unique' => ':attribute 已經存在',\n 'uploaded' => ':attribute 上傳失敗',\n 'url' => ':attribute 格式錯誤',\n 'uuid' => ':attribute 必須是有效的 UUID',\n 'max_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能大於 :max',\n 'file' => '當 :other 為 :value 時 :attribute 不能大於 :max KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能多於 :max 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 最多只能有 :max 個項目',\n ],\n 'min_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能小於 :min',\n 'file' => '當 :other 為 :value 時 :attribute 不能小於 :min KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能少於 :min 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 至少要有 :min 個項目',\n ],\n 'between_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 之間',\n 'file' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max KB 之間',\n 'string' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => '當 :other 為 :value 時 :attribute 必須有 :min 至 :max 個項目',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必須是有效的電話號碼',\n 'telephone_number' => ':attribute 必須是有效的手機號碼',\n 'chinese_word' => ':attribute 必須包含有效的字元(中文/英文、數字、底線)',\n 'sequential_array' => ':attribute 必須是有序陣列',\n];\n"], ["/hypervel/app/Listeners/DemoListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hypervel\\Support\\Facades\\Log;\n\nclass DemoListener\n{\n public function handle(object $event): void\n {\n Log::info('Demo listener is triggered.');\n }\n}\n"], ["/hypervel/routes/api.php", "<?php\n\ndeclare(strict_types=1);\n\nuse App\\Http\\Controllers\\IndexController;\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::any('/', [IndexController::class, 'index']);\n"], ["/hypervel/app/Providers/BroadcastServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\Facades\\Broadcast;\nuse Hypervel\\Support\\ServiceProvider;\n\nclass BroadcastServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\n */\n public function boot(): void\n {\n Broadcast::routes();\n\n require base_path('routes/channels.php');\n }\n}\n"], ["/hypervel/app/Http/Middleware/TrimStrings.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\TrimStrings as Middleware;\n\nclass TrimStrings extends Middleware\n{\n /**\n * The names of the attributes that should not be trimmed.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Middleware/VerifyCsrfToken.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\n\nclass VerifyCsrfToken extends Middleware\n{\n /**\n * The URIs that should be excluded from CSRF verification.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Middleware/ConvertEmptyStringsToNull.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull as Middleware;\n\nclass ConvertEmptyStringsToNull extends Middleware\n{\n /**\n * The names of the attributes that should not be transformed to null.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Controllers/AbstractController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nabstract class AbstractController\n{\n}\n"], ["/hypervel/app/Models/Model.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Database\\Eloquent\\Model as BaseModel;\n\nabstract class Model extends BaseModel\n{\n protected ?string $connection = null;\n}\n"], ["/hypervel/app/Providers/AppServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n public function boot(): void\n {\n }\n\n public function register(): void\n {\n }\n}\n"], ["/hypervel/routes/web.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::get('/', function () {\n return view('welcome');\n});\n"], ["/hypervel/app/Http/Middleware/Authenticate.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Auth\\Middleware\\Authenticate as Middleware;\n\nclass Authenticate extends Middleware\n{\n}\n"], ["/hypervel/app/Events/DemoEvent.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Events;\n\nclass DemoEvent\n{\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 21:15:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "class\nIndexController\nextends AbstractController\n{\npublic function index (Request $request) : array {}\n}", "code_description": "This code segment functions to: Process incoming HTTP requests by retrieving specified input parameters and request method details, then generate a structured response containing protocol information and a dynamically constructed greeting message based on provided values."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```php\n[TASK_BEGIN]\nclass IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n return [\n 'hello' => 'world'\n ];\n }\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 21-15-28"}, "editdistance_info": {"edit_distance": 45.2055, "calculate_time": "2025-08-20 21:15:28", "true_code_clean": "class IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n $user = $request->input('user', 'Hypervel');\n $method = $request->getMethod();\n return [\n 'method' => $method,\n 'message' => \"Hello {$user}.\",\n ];\n }\n}", "predict_code_clean": "class IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n return [\n 'hello' => 'world'\n ];\n }\n}"}} | |
| {"repo_name": "hypervel", "file_name": "/hypervel/app/Exceptions/Handler.php", "inference_info": {"prefix_code": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Exceptions;\n\nuse Hypervel\\Foundation\\Exceptions\\Handler as ExceptionHandler;\nuse Hypervel\\Http\\Request;\nuse Throwable;\n\n", "suffix_code": "\n", "middle_code": "class Handler extends ExceptionHandler\n{\n protected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\n public function register(): void\n {\n $this->shouldRenderJsonWhen(function (Request $request, Throwable $e) {\n return str_starts_with($path = $request->path(), 'api')\n && (strlen($path) === 3 || $path[3] === '/');\n });\n $this->reportable(function (Throwable $e) {\n });\n }\n}", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "php", "sub_task_type": null}, "context_code": [["/hypervel/app/Listeners/DbQueryExecutedListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hyperf\\Collection\\Arr;\nuse Hyperf\\Database\\Events\\QueryExecuted;\nuse Hyperf\\Event\\Contract\\ListenerInterface;\nuse Hyperf\\Framework\\Logger\\StdoutLogger;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\nclass DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(StdoutLogger::class);\n }\n\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n\n /**\n * @param QueryExecuted $event\n */\n public function process(object $event): void\n {\n if ($event instanceof QueryExecuted) {\n $sql = $event->sql;\n if (! Arr::isAssoc($event->bindings)) {\n $position = 0;\n foreach ($event->bindings as $value) {\n $position = strpos($sql, '?', $position);\n if ($position === false) {\n break;\n }\n $value = \"'{$value}'\";\n $sql = substr_replace($sql, $value, $position, 1);\n $position += strlen($value);\n }\n }\n\n $this->logger->info(sprintf('[%s] %s', $event->time, $sql));\n }\n }\n}\n"], ["/hypervel/app/Http/Controllers/IndexController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nuse Hypervel\\Http\\Request;\n\nclass IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n $user = $request->input('user', 'Hypervel');\n $method = $request->getMethod();\n\n return [\n 'method' => $method,\n 'message' => \"Hello {$user}.\",\n ];\n }\n}\n"], ["/hypervel/app/Http/Requests/DemoRequest.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Requests;\n\nuse Hypervel\\Foundation\\Http\\FormRequest;\n\nclass DemoRequest extends FormRequest\n{\n /**\n * Determine if the user is authorized to make this request.\n */\n public function authorize(): bool\n {\n return true;\n }\n\n /**\n * Get the validation rules that apply to the request.\n */\n public function rules(): array\n {\n return [\n 'name' => 'required|string|min:3',\n 'email' => 'required|email',\n 'email2' => 'required|array',\n ];\n }\n}\n"], ["/hypervel/routes/channels.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Broadcast;\n\n/*\n|--------------------------------------------------------------------------\n| Broadcast Channels\n|--------------------------------------------------------------------------\n|\n| Here you may register all of the event broadcasting channels that your\n| application supports. The given channel authorization callbacks are\n| used to check if an authenticated user can listen to the channel.\n|\n*/\n\nBroadcast::channel('App.Models.User.{id}', function ($user, $id) {\n return (int) $user->id === (int) $id;\n});\n"], ["/hypervel/app/Providers/RouteServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\RouteServiceProvider as BaseServiceProvider;\nuse Hypervel\\Support\\Facades\\Route;\n\nclass RouteServiceProvider extends BaseServiceProvider\n{\n /**\n * The route files for the application.\n */\n protected array $routes = [\n ];\n\n public function boot(): void\n {\n parent::boot();\n\n Route::group(\n '/api',\n base_path('routes/api.php'),\n ['middleware' => 'api']\n );\n\n Route::group(\n '/',\n base_path('routes/web.php'),\n ['middleware' => 'web']\n );\n }\n}\n"], ["/hypervel/app/Console/Commands/DemoCommand.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console\\Commands;\n\nuse Hypervel\\Console\\Command;\n\nclass DemoCommand extends Command\n{\n protected ?string $signature = 'demo:hi {--name=}';\n\n protected string $description = 'Hyperf Demo Command';\n\n public function handle()\n {\n $this->info('Hello ' . ($this->option('name') ?: 'Hypervel'));\n }\n}\n"], ["/hypervel/app/Console/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console;\n\nuse Hypervel\\Console\\Scheduling\\Schedule;\nuse Hypervel\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n /**\n * Define the application's command schedule.\n */\n public function schedule(Schedule $schedule): void\n {\n // $schedule->command('demo:hi')->everyFiveSeconds();\n }\n\n public function commands(): void\n {\n $this->load(__DIR__ . '/Commands');\n\n require base_path('routes/console.php');\n }\n}\n"], ["/hypervel/app/Models/User.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n /**\n * The attributes that are mass assignable.\n */\n protected array $fillable = [\n 'name',\n 'email',\n 'email_verified_at',\n 'password',\n ];\n}\n"], ["/hypervel/app/Http/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http;\n\nuse Hypervel\\Foundation\\Http\\Kernel as HttpKernel;\n\nclass Kernel extends HttpKernel\n{\n /**\n * The application's global HTTP middleware stack.\n *\n * These middleware are run during every request to your application.\n *\n * @var array<int, class-string|string>\n */\n protected array $middleware = [\n // \\App\\Http\\Middleware\\TrimStrings::class,\n // \\App\\Http\\Middleware\\ConvertEmptyStringsToNull::class\n ];\n\n /**\n * The application's route middleware groups.\n *\n * @var array<string, array<int, class-string|string>>\n */\n protected array $middlewareGroups = [\n 'web' => [\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ],\n\n 'api' => [\n // 'throttle:60,1,api',\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n ],\n ];\n\n /**\n * The application's middleware aliases.\n *\n * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.\n *\n * @var array<string, class-string|string>\n */\n protected array $middlewareAliases = [\n 'auth' => \\App\\Http\\Middleware\\Authenticate::class,\n 'can' => \\Hypervel\\Auth\\Middleware\\Authorize::class,\n 'throttle' => \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n 'bindings' => \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n 'signed' => \\App\\Http\\Middleware\\ValidateSignature::class,\n ];\n\n /**\n * The priority-sorted list of middleware.\n *\n * Forces non-global middleware to always be in the given order.\n *\n * @var string[]\n */\n protected array $middlewarePriority = [\n // \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ];\n}\n"], ["/hypervel/app/Http/Middleware/ValidateSignature.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Router\\Middleware\\ValidateSignature as Middleware;\n\nclass ValidateSignature extends Middleware\n{\n /**\n * The names of the query string parameters that should be ignored.\n *\n * @var array<int, string>\n */\n protected array $except = [\n // 'fbclid',\n // 'utm_campaign',\n // 'utm_content',\n // 'utm_medium',\n // 'utm_source',\n // 'utm_term',\n ];\n}\n"], ["/hypervel/lang/zh_CN/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => ':attribute 必须接受',\n 'active_url' => ':attribute 必须是一个合法的 URL',\n 'after' => ':attribute 必须是 :date 之后的一个日期',\n 'after_or_equal' => ':attribute 必须是 :date 之后或相同的一个日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、数字、中划线或下划线',\n 'alpha_num' => ':attribute 只能包含字母和数字',\n 'array' => ':attribute 必须是一个数组',\n 'before' => ':attribute 必须是 :date 之前的一个日期',\n 'before_or_equal' => ':attribute 必须是 :date 之前或相同的一个日期',\n 'between' => [\n 'numeric' => ':attribute 必须在 :min 到 :max 之间',\n 'file' => ':attribute 必须在 :min 到 :max kb 之间',\n 'string' => ':attribute 必须在 :min 到 :max 个字符之间',\n 'array' => ':attribute 必须在 :min 到 :max 项之间',\n ],\n 'boolean' => ':attribute 字符必须是 true 或 false, 1 或 0',\n 'confirmed' => ':attribute 二次确认不匹配',\n 'date' => ':attribute 必须是一个合法的日期',\n 'date_format' => ':attribute 与给定的格式 :format 不符合',\n 'decimal' => ':attribute 必须有 :decimal 位小数',\n 'different' => ':attribute 必须不同于 :other',\n 'digits' => ':attribute 必须是 :digits 位',\n 'digits_between' => ':attribute 必须在 :min 和 :max 位之间',\n 'dimensions' => ':attribute 具有无效的图片尺寸',\n 'distinct' => ':attribute 字段具有重复值',\n 'email' => ':attribute 必须是一个合法的电子邮件地址',\n 'exists' => '选定的 :attribute 是无效的',\n 'file' => ':attribute 必须是一个文件',\n 'filled' => ':attribute 的字段是必填的',\n 'gt' => [\n 'numeric' => ':attribute 必须大于 :value',\n 'file' => ':attribute 必须大于 :value kb',\n 'string' => ':attribute 必须大于 :value 个字符',\n 'array' => ':attribute 必须大于 :value 项',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必须大于等于 :value',\n 'file' => ':attribute 必须大于等于 :value kb',\n 'string' => ':attribute 必须大于等于 :value 个字符',\n 'array' => ':attribute 必须大于等于 :value 项',\n ],\n 'image' => ':attribute 必须是 jpg, jpeg, png, bmp 或者 gif 格式的图片',\n 'in' => '选定的 :attribute 是无效的',\n 'in_array' => ':attribute 字段不存在于 :other',\n 'integer' => ':attribute 必须是个整数',\n 'ip' => ':attribute 必须是一个合法的 IP 地址',\n 'ipv4' => ':attribute 必须是一个合法的 IPv4 地址',\n 'ipv6' => ':attribute 必须是一个合法的 IPv6 地址',\n 'json' => ':attribute 必须是一个合法的 JSON 字符串',\n 'list' => ':attribute 必须是一个数组列表',\n 'lt' => [\n 'numeric' => ':attribute 必须小于 :value',\n 'file' => ':attribute 必须小于 :value kb',\n 'string' => ':attribute 必须小于 :value 个字符',\n 'array' => ':attribute 必须小于 :value 项',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必须小于等于 :value',\n 'file' => ':attribute 必须小于等于 :value kb',\n 'string' => ':attribute 必须小于等于 :value 个字符',\n 'array' => ':attribute 必须小于等于 :value 项',\n ],\n 'max' => [\n 'numeric' => ':attribute 的最大值为 :max',\n 'file' => ':attribute 的最大为 :max kb',\n 'string' => ':attribute 的最大长度为 :max 字符',\n 'array' => ':attribute 至多有 :max 项',\n ],\n 'mimes' => ':attribute 的文件类型必须是 :values',\n 'mimetypes' => ':attribute 的文件MIME必须是 :values',\n 'min' => [\n 'numeric' => ':attribute 的最小值为 :min',\n 'file' => ':attribute 大小至少为 :min kb',\n 'string' => ':attribute 的最小长度为 :min 字符',\n 'array' => ':attribute 至少有 :min 项',\n ],\n 'not_in' => '选定的 :attribute 是无效的',\n 'not_regex' => ':attribute 不能匹配给定的正则',\n 'numeric' => ':attribute 必须是数字',\n 'present' => ':attribute 字段必须存在',\n 'prohibits' => '必须提供 :attribute 字段',\n 'regex' => ':attribute 格式是无效的',\n 'required' => ':attribute 字段是必须的',\n 'required_if' => ':attribute 字段是必须的当 :other 是 :value',\n 'required_unless' => ':attribute 字段是必须的,除非 :other 是在 :values 中',\n 'required_with' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_with_all' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_without' => ':attribute 字段是必须的当 :values 是不存在的',\n 'required_without_all' => ':attribute 字段是必须的当 没有一个 :values 是存在的',\n 'exclude' => ':attribute 字段是被排除的',\n 'exclude_if' => '当 :other 为 :value 时,排除 :attribute 字段',\n 'exclude_unless' => '除非 :other 是在 :values 中,否则排除 :attribute 字段',\n 'exclude_with' => '当 :values 存在时,排除 :attribute 字段',\n 'exclude_without' => '当 :values 不存在时,排除 :attribute 字段',\n 'same' => ':attribute 和 :other 必须匹配',\n 'size' => [\n 'numeric' => ':attribute 必须是 :size',\n 'file' => ':attribute 必须是 :size kb',\n 'string' => ':attribute 必须是 :size 个字符',\n 'array' => ':attribute 必须包括 :size 项',\n ],\n 'starts_with' => ':attribute 必须以 :values 为开头',\n 'string' => ':attribute 必须是一个字符串',\n 'timezone' => ':attribute 必须是个有效的时区',\n 'unique' => ':attribute 已存在',\n 'uploaded' => ':attribute 上传失败',\n 'url' => ':attribute 无效的格式',\n 'uuid' => ':attribute 无效的UUID格式',\n 'max_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 不能大于 :max',\n 'file' => '当 :other 为 :value 时 :attribute 不能大于 :max kb',\n 'string' => '当 :other 为 :value 时 :attribute 不能大于 :max 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 最多只有 :max 个单元',\n ],\n 'min_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须大于等于 :min',\n 'file' => '当 :other 为 :value 时 :attribute 大小不能小于 :min kb',\n 'string' => '当 :other 为 :value 时 :attribute 至少为 :min 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 至少有 :min 个单元',\n ],\n 'between_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 之间',\n 'file' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max kb 之间',\n 'string' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 个字符之间',\n 'array' => '当 :other 为 :value 时 :attribute 必须只有 :min - :max 个单元',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必须为一个有效的电话号码',\n 'telephone_number' => ':attribute 必须为一个有效的手机号码',\n\n 'chinese_word' => ':attribute 必须包含以下有效字符 (中文/英文,数字, 下划线)',\n 'sequential_array' => ':attribute 必须是一个有序数组',\n];\n"], ["/hypervel/app/Providers/EventServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\EventServiceProvider as BaseServiceProvider;\n\nclass EventServiceProvider extends BaseServiceProvider\n{\n /**\n * The event listener mappings for the application.\n */\n protected array $listen = [\n \\App\\Events\\DemoEvent::class => [\n \\App\\Listeners\\DemoListener::class,\n ],\n ];\n}\n"], ["/hypervel/app/Providers/BroadcastServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\Facades\\Broadcast;\nuse Hypervel\\Support\\ServiceProvider;\n\nclass BroadcastServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\n */\n public function boot(): void\n {\n Broadcast::routes();\n\n require base_path('routes/channels.php');\n }\n}\n"], ["/hypervel/lang/zh_TW/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => '必須接受 :attribute',\n 'active_url' => ':attribute 必須是有效的網址',\n 'after' => ':attribute 必須是 :date 之後的日期',\n 'after_or_equal' => ':attribute 必須是 :date 之後或相同的日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、數字、連接線或底線',\n 'alpha_num' => ':attribute 只能包含字母和數字',\n 'array' => ':attribute 必須是陣列',\n 'before' => ':attribute 必須是 :date 之前的日期',\n 'before_or_equal' => ':attribute 必須是 :date 之前或相同的日期',\n 'between' => [\n 'numeric' => ':attribute 必須介於 :min 至 :max 之間',\n 'file' => ':attribute 必須介於 :min 至 :max KB 之間',\n 'string' => ':attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => ':attribute 必須有 :min 至 :max 個項目',\n ],\n 'boolean' => ':attribute 欄位必須是 true 或 false、1 或 0',\n 'confirmed' => ':attribute 確認欄位不相符',\n 'date' => ':attribute 必須是有效的日期',\n 'date_format' => ':attribute 與格式 :format 不符',\n 'decimal' => ':attribute 必須有 :decimal 位小數',\n 'different' => ':attribute 與 :other 必須不同',\n 'digits' => ':attribute 必須是 :digits 位數字',\n 'digits_between' => ':attribute 必須介於 :min 至 :max 位數字',\n 'dimensions' => ':attribute 圖片尺寸不正確',\n 'distinct' => ':attribute 已經存在',\n 'email' => ':attribute 必須是有效的電子郵件位址',\n 'exists' => '所選擇的 :attribute 無效',\n 'file' => ':attribute 必須是檔案',\n 'filled' => ':attribute 不能留空',\n 'gt' => [\n 'numeric' => ':attribute 必須大於 :value',\n 'file' => ':attribute 必須大於 :value KB',\n 'string' => ':attribute 必須多於 :value 個字元',\n 'array' => ':attribute 必須多於 :value 個項目',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必須大於或等於 :value',\n 'file' => ':attribute 必須大於或等於 :value KB',\n 'string' => ':attribute 必須多於或等於 :value 個字元',\n 'array' => ':attribute 必須多於或等於 :value 個項目',\n ],\n 'image' => ':attribute 必須是 jpg、jpeg、png、bmp 或 gif 格式的圖片',\n 'in' => '所選的 :attribute 無效',\n 'in_array' => ':attribute 欄位不存在於 :other',\n 'integer' => ':attribute 必須是整數',\n 'ip' => ':attribute 必須是有效的 IP 位址',\n 'ipv4' => ':attribute 必須是有效的 IPv4 位址',\n 'ipv6' => ':attribute 必須是有效的 IPv6 位址',\n 'json' => ':attribute 必須是有效的 JSON 字串',\n 'list' => ':attribute 必須是陣列列表',\n 'lt' => [\n 'numeric' => ':attribute 必須小於 :value',\n 'file' => ':attribute 必須小於 :value KB',\n 'string' => ':attribute 必須少於 :value 個字元',\n 'array' => ':attribute 必須少於 :value 個項目',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必須小於或等於 :value',\n 'file' => ':attribute 必須小於或等於 :value KB',\n 'string' => ':attribute 必須少於或等於 :value 個字元',\n 'array' => ':attribute 必須少於或等於 :value 個項目',\n ],\n 'max' => [\n 'numeric' => ':attribute 不能大於 :max',\n 'file' => ':attribute 不能大於 :max KB',\n 'string' => ':attribute 不能多於 :max 個字元',\n 'array' => ':attribute 最多有 :max 個項目',\n ],\n 'mimes' => ':attribute 必須為 :values 的檔案類型',\n 'mimetypes' => ':attribute 必須為 :values 的檔案 MIME',\n 'min' => [\n 'numeric' => ':attribute 不能小於 :min',\n 'file' => ':attribute 不能小於 :min KB',\n 'string' => ':attribute 不能少於 :min 個字元',\n 'array' => ':attribute 至少要有 :min 個項目',\n ],\n 'not_in' => '所選擇的 :attribute 無效',\n 'not_regex' => ':attribute 的格式錯誤',\n 'numeric' => ':attribute 必須為數字',\n 'present' => ':attribute 必須存在',\n 'prohibits' => '必須提供 :attribute 欄位',\n 'regex' => ':attribute 的格式錯誤',\n 'required' => ':attribute 不能留空',\n 'required_if' => '當 :other 是 :value 時 :attribute 不能留空',\n 'required_unless' => '當 :other 不是 :values 時 :attribute 不能留空',\n 'required_with' => '當 :values 出現時 :attribute 不能留空',\n 'required_with_all' => '當 :values 出現時 :attribute 不能留空',\n 'required_without' => '當 :values 留空時 :attribute 不能留空',\n 'required_without_all' => '當 :values 都不出現時 :attribute 不能留空',\n 'exclude' => ':attribute 欄位被排除',\n 'exclude_if' => '當 :other 為 :value 時,排除 :attribute 欄位',\n 'exclude_unless' => '除非 :other 在 :values 中,否則排除 :attribute 欄位',\n 'exclude_with' => '當 :values 存在時,排除 :attribute 欄位',\n 'exclude_without' => '當 :values 不存在時,排除 :attribute 欄位',\n 'same' => ':attribute 與 :other 必須相同',\n 'size' => [\n 'numeric' => ':attribute 必須是 :size',\n 'file' => ':attribute 必須是 :size KB',\n 'string' => ':attribute 必須是 :size 個字元',\n 'array' => ':attribute 必須包含 :size 個項目',\n ],\n 'starts_with' => ':attribute 必須以 :values 開頭',\n 'string' => ':attribute 必須是字串',\n 'timezone' => ':attribute 必須是有效的時區',\n 'unique' => ':attribute 已經存在',\n 'uploaded' => ':attribute 上傳失敗',\n 'url' => ':attribute 格式錯誤',\n 'uuid' => ':attribute 必須是有效的 UUID',\n 'max_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能大於 :max',\n 'file' => '當 :other 為 :value 時 :attribute 不能大於 :max KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能多於 :max 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 最多只能有 :max 個項目',\n ],\n 'min_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能小於 :min',\n 'file' => '當 :other 為 :value 時 :attribute 不能小於 :min KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能少於 :min 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 至少要有 :min 個項目',\n ],\n 'between_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 之間',\n 'file' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max KB 之間',\n 'string' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => '當 :other 為 :value 時 :attribute 必須有 :min 至 :max 個項目',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必須是有效的電話號碼',\n 'telephone_number' => ':attribute 必須是有效的手機號碼',\n 'chinese_word' => ':attribute 必須包含有效的字元(中文/英文、數字、底線)',\n 'sequential_array' => ':attribute 必須是有序陣列',\n];\n"], ["/hypervel/app/Listeners/DemoListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hypervel\\Support\\Facades\\Log;\n\nclass DemoListener\n{\n public function handle(object $event): void\n {\n Log::info('Demo listener is triggered.');\n }\n}\n"], ["/hypervel/routes/console.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Artisan;\nuse Hypervel\\Support\\Facades\\Schedule;\n\n/*\n|--------------------------------------------------------------------------\n| Console Routes\n|--------------------------------------------------------------------------\n|\n| This file is where you may define all of your Closure based console\n| commands. Each Closure is bound to a command instance allowing a\n| simple approach to interacting with each command's IO methods.\n|\n*/\n\nArtisan::command('hello', function () {\n $this->comment('Hypervel is awesome!');\n})->purpose('This is a demo closure command.');\n\n// Schedule::command('hello')->everyFiveSeconds();\n"], ["/hypervel/app/Http/Middleware/TrimStrings.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\TrimStrings as Middleware;\n\nclass TrimStrings extends Middleware\n{\n /**\n * The names of the attributes that should not be trimmed.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Middleware/VerifyCsrfToken.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\n\nclass VerifyCsrfToken extends Middleware\n{\n /**\n * The URIs that should be excluded from CSRF verification.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/lang/en/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => 'The :attribute must be accepted.',\n 'accepted_if' => 'The :attribute must be accepted when :other is :value.',\n 'active_url' => 'The :attribute is not a valid URL.',\n 'after' => 'The :attribute must be a date after :date.',\n 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',\n 'alpha' => 'The :attribute may only contain letters.',\n 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',\n 'alpha_num' => 'The :attribute may only contain letters and numbers.',\n 'array' => 'The :attribute must be an array.',\n 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.',\n 'before' => 'The :attribute must be a date before :date.',\n 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',\n 'between' => [\n 'numeric' => 'The :attribute must be between :min and :max.',\n 'file' => 'The :attribute must be between :min and :max kilobytes.',\n 'string' => 'The :attribute must be between :min and :max characters.',\n 'array' => 'The :attribute must have between :min and :max items.',\n ],\n 'boolean' => 'The :attribute field must be true or false.',\n 'confirmed' => 'The :attribute confirmation does not match.',\n 'date' => 'The :attribute is not a valid date.',\n 'date_equals' => 'The :attribute must be a date equal to :date.',\n 'date_format' => 'The :attribute does not match the format :format.',\n 'decimal' => 'The :attribute must have :decimal decimal places.',\n 'declined' => 'The :attribute must be declined.',\n 'declined_if' => 'The :attribute must be declined when :other is :value.',\n 'different' => 'The :attribute and :other must be different.',\n 'digits' => 'The :attribute must be :digits digits.',\n 'digits_between' => 'The :attribute must be between :min and :max digits.',\n 'dimensions' => 'The :attribute has invalid image dimensions.',\n 'distinct' => 'The :attribute field has a duplicate value.',\n 'doesnt_end_with' => 'The :attribute must not end with one of the following: :values.',\n 'doesnt_start_with' => 'The :attribute must not start with one of the following: :values.',\n 'email' => 'The :attribute must be a valid email address.',\n 'ends_with' => 'The :attribute must end with one of the following: :values.',\n 'exists' => 'The selected :attribute is invalid.',\n 'file' => 'The :attribute must be a file.',\n 'filled' => 'The :attribute field is required.',\n 'gt' => [\n 'numeric' => 'The :attribute must be greater than :value',\n 'file' => 'The :attribute must be greater than :value kb',\n 'string' => 'The :attribute must be greater than :value characters',\n 'array' => 'The :attribute must be greater than :value items',\n ],\n 'gte' => [\n 'numeric' => 'The :attribute must be great than or equal to :value',\n 'file' => 'The :attribute must be great than or equal to :value kb',\n 'string' => 'The :attribute must be great than or equal to :value characters',\n 'array' => 'The :attribute must be great than or equal to :value items',\n ],\n 'image' => 'The :attribute must be an image.',\n 'in' => 'The selected :attribute is invalid.',\n 'in_array' => 'The :attribute field does not exist in :other.',\n 'integer' => 'The :attribute must be an integer.',\n 'ip' => 'The :attribute must be a valid IP address.',\n 'ipv4' => 'The :attribute must be a valid IPv4 address.',\n 'ipv6' => 'The :attribute must be a valid IPv6 address.',\n 'json' => 'The :attribute must be a valid JSON string.',\n 'list' => 'The :attribute must be a list.',\n 'lowercase' => 'The :attribute must be lowercase.',\n 'lt' => [\n 'numeric' => 'The :attribute must be less than :value',\n 'file' => 'The :attribute must be less than :value kb',\n 'string' => 'The :attribute must be less than :value characters',\n 'array' => 'The :attribute must be less than :value items',\n ],\n 'lte' => [\n 'numeric' => 'The :attribute must be less than or equal to :value',\n 'file' => 'The :attribute must be less than or equal to :value kb',\n 'string' => 'The :attribute must be less than or equal to :value characters',\n 'array' => 'The :attribute must be less than or equal to :value items',\n ],\n 'max' => [\n 'numeric' => 'The :attribute may not be greater than :max.',\n 'file' => 'The :attribute may not be greater than :max kilobytes.',\n 'string' => 'The :attribute may not be greater than :max characters.',\n 'array' => 'The :attribute may not have more than :max items.',\n ],\n 'max_digits' => 'The :attribute must not have more than :max digits.',\n 'mimes' => 'The :attribute must be a file of type: :values.',\n 'mimetypes' => 'The :attribute must be a file of type: :values.',\n 'min' => [\n 'numeric' => 'The :attribute must be at least :min.',\n 'file' => 'The :attribute must be at least :min kilobytes.',\n 'string' => 'The :attribute must be at least :min characters.',\n 'array' => 'The :attribute must have at least :min items.',\n ],\n 'min_digits' => 'The :attribute must have at least :min digits.',\n 'missing' => 'The :attribute must be missing.',\n 'missing_if' => 'The :attribute must be missing when :other is :value.',\n 'missing_unless' => 'The :attribute must be missing unless :other is :value.',\n 'missing_with' => 'The :attribute must be missing when :values is present.',\n 'missing_with_all' => 'The :attribute must be missing when :values are present.',\n 'multiple_of' => 'The :attribute must be a multiple of :value.',\n 'not_in' => 'The selected :attribute is invalid.',\n 'not_regex' => 'The :attribute cannot match a given regular rule.',\n 'numeric' => 'The :attribute must be a number.',\n 'present' => 'The :attribute field must be present.',\n 'prohibits' => 'The :attribute field must be present.',\n 'regex' => 'The :attribute format is invalid.',\n 'required' => 'The :attribute field is required.',\n 'required_if' => 'The :attribute field is required when :other is :value.',\n 'required_unless' => 'The :attribute field is required unless :other is in :values.',\n 'required_with' => 'The :attribute field is required when :values is present.',\n 'required_with_all' => 'The :attribute field is required when :values is present.',\n 'required_without' => 'The :attribute field is required when :values is not present.',\n 'required_without_all' => 'The :attribute field is required when none of :values are present.',\n 'exclude' => 'The :attribute field is excluded.',\n 'exclude_if' => 'The :attribute field is excluded when :other is :value.',\n 'exclude_unless' => 'The :attribute field is excluded unless :other is in :values.',\n 'exclude_with' => 'The :attribute field is excluded when :values is present.',\n 'exclude_without' => 'The :attribute field is excluded when :values is not present.',\n 'same' => 'The :attribute and :other must match.',\n 'size' => [\n 'numeric' => 'The :attribute must be :size.',\n 'file' => 'The :attribute must be :size kilobytes.',\n 'string' => 'The :attribute must be :size characters.',\n 'array' => 'The :attribute must contain :size items.',\n ],\n 'starts_with' => 'The :attribute must be start with :values ',\n 'string' => 'The :attribute must be a string.',\n 'timezone' => 'The :attribute must be a valid zone.',\n 'unique' => 'The :attribute has already been taken.',\n 'uploaded' => 'The :attribute failed to upload.',\n 'uppercase' => 'The :attribute must be uppercase.',\n 'url' => 'The :attribute format is invalid.',\n 'ulid' => 'The :attribute must be a valid ULID.',\n 'uuid' => 'The :attribute is invalid UUID.',\n 'max_if' => [\n 'numeric' => 'The :attribute may not be greater than :max when :other is :value.',\n 'file' => 'The :attribute may not be greater than :max kilobytes when :other is :value.',\n 'string' => 'The :attribute may not be greater than :max characters when :other is :value.',\n 'array' => 'The :attribute may not have more than :max items when :other is :value.',\n ],\n 'min_if' => [\n 'numeric' => 'The :attribute must be at least :min when :other is :value.',\n 'file' => 'The :attribute must be at least :min kilobytes when :other is :value.',\n 'string' => 'The :attribute must be at least :min characters when :other is :value.',\n 'array' => 'The :attribute must have at least :min items when :other is :value.',\n ],\n 'between_if' => [\n 'numeric' => 'The :attribute must be between :min and :max when :other is :value.',\n 'file' => 'The :attribute must be between :min and :max kilobytes when :other is :value.',\n 'string' => 'The :attribute must be between :min and :max characters when :other is :value.',\n 'array' => 'The :attribute must have between :min and :max items when :other is :value.',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => 'The :attribute must be a valid phone number',\n 'telephone_number' => 'The :attribute must be a valid telephone number',\n\n 'chinese_word' => 'The :attribute must contain valid characters(chinese/english character, number, underscore)',\n 'sequential_array' => 'The :attribute must be sequential array',\n];\n"], ["/hypervel/app/Providers/AppServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n public function boot(): void\n {\n }\n\n public function register(): void\n {\n }\n}\n"], ["/hypervel/app/Http/Middleware/ConvertEmptyStringsToNull.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull as Middleware;\n\nclass ConvertEmptyStringsToNull extends Middleware\n{\n /**\n * The names of the attributes that should not be transformed to null.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Models/Model.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Database\\Eloquent\\Model as BaseModel;\n\nabstract class Model extends BaseModel\n{\n protected ?string $connection = null;\n}\n"], ["/hypervel/routes/api.php", "<?php\n\ndeclare(strict_types=1);\n\nuse App\\Http\\Controllers\\IndexController;\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::any('/', [IndexController::class, 'index']);\n"], ["/hypervel/routes/web.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::get('/', function () {\n return view('welcome');\n});\n"], ["/hypervel/app/Http/Middleware/Authenticate.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Auth\\Middleware\\Authenticate as Middleware;\n\nclass Authenticate extends Middleware\n{\n}\n"], ["/hypervel/app/Http/Controllers/AbstractController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nabstract class AbstractController\n{\n}\n"], ["/hypervel/app/Events/DemoEvent.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Events;\n\nclass DemoEvent\n{\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 21:15:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "class\nHandler\nextends ExceptionHandler\n{\nprotected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\npublic function register () : void {}\n}", "code_description": "This code segment functions to: Configure error handling behavior by defining conditions for JSON response rendering based on request path patterns and specifying sensitive data fields excluded from persistent storage."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```php\n[TASK_BEGIN]\n public function register(): void\n {\n $this->renderable(function (Throwable $e, Request $request) {\n if ($request->expectsJson()) {\n return response()->json([\n 'message' => 'Server Error',\n ], 500);\n }\n });\n }\n[TASK_END]\n```", "inference_time": "2025-08-20 21-15-33"}, "editdistance_info": {"edit_distance": 22.1239, "calculate_time": "2025-08-20 21:15:33", "true_code_clean": "class Handler extends ExceptionHandler\n{\n protected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\n public function register(): void\n {\n $this->shouldRenderJsonWhen(function (Request $request, Throwable $e) {\n return str_starts_with($path = $request->path(), 'api')\n && (strlen($path) === 3 || $path[3] === '/');\n });\n $this->reportable(function (Throwable $e) {\n });\n }\n}", "predict_code_clean": "public function register(): void\n {\n $this->renderable(function (Throwable $e, Request $request) {\n if ($request->expectsJson()) {\n return response()->json([\n 'message' => 'Server Error',\n ], 500);\n }\n });\n }"}} | |
| {"repo_name": "hypervel", "file_name": "/hypervel/app/Exceptions/Handler.php", "inference_info": {"prefix_code": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Exceptions;\n\nuse Hypervel\\Foundation\\Exceptions\\Handler as ExceptionHandler;\nuse Hypervel\\Http\\Request;\nuse Throwable;\n\n", "suffix_code": "\n", "middle_code": "class Handler extends ExceptionHandler\n{\n protected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\n public function register(): void\n {\n $this->shouldRenderJsonWhen(function (Request $request, Throwable $e) {\n return str_starts_with($path = $request->path(), 'api')\n && (strlen($path) === 3 || $path[3] === '/');\n });\n $this->reportable(function (Throwable $e) {\n });\n }\n}", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "php", "sub_task_type": null}, "context_code": [["/hypervel/app/Listeners/DbQueryExecutedListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hyperf\\Collection\\Arr;\nuse Hyperf\\Database\\Events\\QueryExecuted;\nuse Hyperf\\Event\\Contract\\ListenerInterface;\nuse Hyperf\\Framework\\Logger\\StdoutLogger;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\nclass DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(StdoutLogger::class);\n }\n\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n\n /**\n * @param QueryExecuted $event\n */\n public function process(object $event): void\n {\n if ($event instanceof QueryExecuted) {\n $sql = $event->sql;\n if (! Arr::isAssoc($event->bindings)) {\n $position = 0;\n foreach ($event->bindings as $value) {\n $position = strpos($sql, '?', $position);\n if ($position === false) {\n break;\n }\n $value = \"'{$value}'\";\n $sql = substr_replace($sql, $value, $position, 1);\n $position += strlen($value);\n }\n }\n\n $this->logger->info(sprintf('[%s] %s', $event->time, $sql));\n }\n }\n}\n"], ["/hypervel/app/Http/Controllers/IndexController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nuse Hypervel\\Http\\Request;\n\nclass IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n $user = $request->input('user', 'Hypervel');\n $method = $request->getMethod();\n\n return [\n 'method' => $method,\n 'message' => \"Hello {$user}.\",\n ];\n }\n}\n"], ["/hypervel/app/Http/Requests/DemoRequest.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Requests;\n\nuse Hypervel\\Foundation\\Http\\FormRequest;\n\nclass DemoRequest extends FormRequest\n{\n /**\n * Determine if the user is authorized to make this request.\n */\n public function authorize(): bool\n {\n return true;\n }\n\n /**\n * Get the validation rules that apply to the request.\n */\n public function rules(): array\n {\n return [\n 'name' => 'required|string|min:3',\n 'email' => 'required|email',\n 'email2' => 'required|array',\n ];\n }\n}\n"], ["/hypervel/routes/channels.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Broadcast;\n\n/*\n|--------------------------------------------------------------------------\n| Broadcast Channels\n|--------------------------------------------------------------------------\n|\n| Here you may register all of the event broadcasting channels that your\n| application supports. The given channel authorization callbacks are\n| used to check if an authenticated user can listen to the channel.\n|\n*/\n\nBroadcast::channel('App.Models.User.{id}', function ($user, $id) {\n return (int) $user->id === (int) $id;\n});\n"], ["/hypervel/app/Providers/RouteServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\RouteServiceProvider as BaseServiceProvider;\nuse Hypervel\\Support\\Facades\\Route;\n\nclass RouteServiceProvider extends BaseServiceProvider\n{\n /**\n * The route files for the application.\n */\n protected array $routes = [\n ];\n\n public function boot(): void\n {\n parent::boot();\n\n Route::group(\n '/api',\n base_path('routes/api.php'),\n ['middleware' => 'api']\n );\n\n Route::group(\n '/',\n base_path('routes/web.php'),\n ['middleware' => 'web']\n );\n }\n}\n"], ["/hypervel/app/Console/Commands/DemoCommand.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console\\Commands;\n\nuse Hypervel\\Console\\Command;\n\nclass DemoCommand extends Command\n{\n protected ?string $signature = 'demo:hi {--name=}';\n\n protected string $description = 'Hyperf Demo Command';\n\n public function handle()\n {\n $this->info('Hello ' . ($this->option('name') ?: 'Hypervel'));\n }\n}\n"], ["/hypervel/app/Console/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console;\n\nuse Hypervel\\Console\\Scheduling\\Schedule;\nuse Hypervel\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n /**\n * Define the application's command schedule.\n */\n public function schedule(Schedule $schedule): void\n {\n // $schedule->command('demo:hi')->everyFiveSeconds();\n }\n\n public function commands(): void\n {\n $this->load(__DIR__ . '/Commands');\n\n require base_path('routes/console.php');\n }\n}\n"], ["/hypervel/app/Models/User.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n /**\n * The attributes that are mass assignable.\n */\n protected array $fillable = [\n 'name',\n 'email',\n 'email_verified_at',\n 'password',\n ];\n}\n"], ["/hypervel/app/Http/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http;\n\nuse Hypervel\\Foundation\\Http\\Kernel as HttpKernel;\n\nclass Kernel extends HttpKernel\n{\n /**\n * The application's global HTTP middleware stack.\n *\n * These middleware are run during every request to your application.\n *\n * @var array<int, class-string|string>\n */\n protected array $middleware = [\n // \\App\\Http\\Middleware\\TrimStrings::class,\n // \\App\\Http\\Middleware\\ConvertEmptyStringsToNull::class\n ];\n\n /**\n * The application's route middleware groups.\n *\n * @var array<string, array<int, class-string|string>>\n */\n protected array $middlewareGroups = [\n 'web' => [\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ],\n\n 'api' => [\n // 'throttle:60,1,api',\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n ],\n ];\n\n /**\n * The application's middleware aliases.\n *\n * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.\n *\n * @var array<string, class-string|string>\n */\n protected array $middlewareAliases = [\n 'auth' => \\App\\Http\\Middleware\\Authenticate::class,\n 'can' => \\Hypervel\\Auth\\Middleware\\Authorize::class,\n 'throttle' => \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n 'bindings' => \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n 'signed' => \\App\\Http\\Middleware\\ValidateSignature::class,\n ];\n\n /**\n * The priority-sorted list of middleware.\n *\n * Forces non-global middleware to always be in the given order.\n *\n * @var string[]\n */\n protected array $middlewarePriority = [\n // \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ];\n}\n"], ["/hypervel/app/Http/Middleware/ValidateSignature.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Router\\Middleware\\ValidateSignature as Middleware;\n\nclass ValidateSignature extends Middleware\n{\n /**\n * The names of the query string parameters that should be ignored.\n *\n * @var array<int, string>\n */\n protected array $except = [\n // 'fbclid',\n // 'utm_campaign',\n // 'utm_content',\n // 'utm_medium',\n // 'utm_source',\n // 'utm_term',\n ];\n}\n"], ["/hypervel/lang/zh_CN/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => ':attribute 必须接受',\n 'active_url' => ':attribute 必须是一个合法的 URL',\n 'after' => ':attribute 必须是 :date 之后的一个日期',\n 'after_or_equal' => ':attribute 必须是 :date 之后或相同的一个日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、数字、中划线或下划线',\n 'alpha_num' => ':attribute 只能包含字母和数字',\n 'array' => ':attribute 必须是一个数组',\n 'before' => ':attribute 必须是 :date 之前的一个日期',\n 'before_or_equal' => ':attribute 必须是 :date 之前或相同的一个日期',\n 'between' => [\n 'numeric' => ':attribute 必须在 :min 到 :max 之间',\n 'file' => ':attribute 必须在 :min 到 :max kb 之间',\n 'string' => ':attribute 必须在 :min 到 :max 个字符之间',\n 'array' => ':attribute 必须在 :min 到 :max 项之间',\n ],\n 'boolean' => ':attribute 字符必须是 true 或 false, 1 或 0',\n 'confirmed' => ':attribute 二次确认不匹配',\n 'date' => ':attribute 必须是一个合法的日期',\n 'date_format' => ':attribute 与给定的格式 :format 不符合',\n 'decimal' => ':attribute 必须有 :decimal 位小数',\n 'different' => ':attribute 必须不同于 :other',\n 'digits' => ':attribute 必须是 :digits 位',\n 'digits_between' => ':attribute 必须在 :min 和 :max 位之间',\n 'dimensions' => ':attribute 具有无效的图片尺寸',\n 'distinct' => ':attribute 字段具有重复值',\n 'email' => ':attribute 必须是一个合法的电子邮件地址',\n 'exists' => '选定的 :attribute 是无效的',\n 'file' => ':attribute 必须是一个文件',\n 'filled' => ':attribute 的字段是必填的',\n 'gt' => [\n 'numeric' => ':attribute 必须大于 :value',\n 'file' => ':attribute 必须大于 :value kb',\n 'string' => ':attribute 必须大于 :value 个字符',\n 'array' => ':attribute 必须大于 :value 项',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必须大于等于 :value',\n 'file' => ':attribute 必须大于等于 :value kb',\n 'string' => ':attribute 必须大于等于 :value 个字符',\n 'array' => ':attribute 必须大于等于 :value 项',\n ],\n 'image' => ':attribute 必须是 jpg, jpeg, png, bmp 或者 gif 格式的图片',\n 'in' => '选定的 :attribute 是无效的',\n 'in_array' => ':attribute 字段不存在于 :other',\n 'integer' => ':attribute 必须是个整数',\n 'ip' => ':attribute 必须是一个合法的 IP 地址',\n 'ipv4' => ':attribute 必须是一个合法的 IPv4 地址',\n 'ipv6' => ':attribute 必须是一个合法的 IPv6 地址',\n 'json' => ':attribute 必须是一个合法的 JSON 字符串',\n 'list' => ':attribute 必须是一个数组列表',\n 'lt' => [\n 'numeric' => ':attribute 必须小于 :value',\n 'file' => ':attribute 必须小于 :value kb',\n 'string' => ':attribute 必须小于 :value 个字符',\n 'array' => ':attribute 必须小于 :value 项',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必须小于等于 :value',\n 'file' => ':attribute 必须小于等于 :value kb',\n 'string' => ':attribute 必须小于等于 :value 个字符',\n 'array' => ':attribute 必须小于等于 :value 项',\n ],\n 'max' => [\n 'numeric' => ':attribute 的最大值为 :max',\n 'file' => ':attribute 的最大为 :max kb',\n 'string' => ':attribute 的最大长度为 :max 字符',\n 'array' => ':attribute 至多有 :max 项',\n ],\n 'mimes' => ':attribute 的文件类型必须是 :values',\n 'mimetypes' => ':attribute 的文件MIME必须是 :values',\n 'min' => [\n 'numeric' => ':attribute 的最小值为 :min',\n 'file' => ':attribute 大小至少为 :min kb',\n 'string' => ':attribute 的最小长度为 :min 字符',\n 'array' => ':attribute 至少有 :min 项',\n ],\n 'not_in' => '选定的 :attribute 是无效的',\n 'not_regex' => ':attribute 不能匹配给定的正则',\n 'numeric' => ':attribute 必须是数字',\n 'present' => ':attribute 字段必须存在',\n 'prohibits' => '必须提供 :attribute 字段',\n 'regex' => ':attribute 格式是无效的',\n 'required' => ':attribute 字段是必须的',\n 'required_if' => ':attribute 字段是必须的当 :other 是 :value',\n 'required_unless' => ':attribute 字段是必须的,除非 :other 是在 :values 中',\n 'required_with' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_with_all' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_without' => ':attribute 字段是必须的当 :values 是不存在的',\n 'required_without_all' => ':attribute 字段是必须的当 没有一个 :values 是存在的',\n 'exclude' => ':attribute 字段是被排除的',\n 'exclude_if' => '当 :other 为 :value 时,排除 :attribute 字段',\n 'exclude_unless' => '除非 :other 是在 :values 中,否则排除 :attribute 字段',\n 'exclude_with' => '当 :values 存在时,排除 :attribute 字段',\n 'exclude_without' => '当 :values 不存在时,排除 :attribute 字段',\n 'same' => ':attribute 和 :other 必须匹配',\n 'size' => [\n 'numeric' => ':attribute 必须是 :size',\n 'file' => ':attribute 必须是 :size kb',\n 'string' => ':attribute 必须是 :size 个字符',\n 'array' => ':attribute 必须包括 :size 项',\n ],\n 'starts_with' => ':attribute 必须以 :values 为开头',\n 'string' => ':attribute 必须是一个字符串',\n 'timezone' => ':attribute 必须是个有效的时区',\n 'unique' => ':attribute 已存在',\n 'uploaded' => ':attribute 上传失败',\n 'url' => ':attribute 无效的格式',\n 'uuid' => ':attribute 无效的UUID格式',\n 'max_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 不能大于 :max',\n 'file' => '当 :other 为 :value 时 :attribute 不能大于 :max kb',\n 'string' => '当 :other 为 :value 时 :attribute 不能大于 :max 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 最多只有 :max 个单元',\n ],\n 'min_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须大于等于 :min',\n 'file' => '当 :other 为 :value 时 :attribute 大小不能小于 :min kb',\n 'string' => '当 :other 为 :value 时 :attribute 至少为 :min 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 至少有 :min 个单元',\n ],\n 'between_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 之间',\n 'file' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max kb 之间',\n 'string' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 个字符之间',\n 'array' => '当 :other 为 :value 时 :attribute 必须只有 :min - :max 个单元',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必须为一个有效的电话号码',\n 'telephone_number' => ':attribute 必须为一个有效的手机号码',\n\n 'chinese_word' => ':attribute 必须包含以下有效字符 (中文/英文,数字, 下划线)',\n 'sequential_array' => ':attribute 必须是一个有序数组',\n];\n"], ["/hypervel/app/Providers/EventServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\EventServiceProvider as BaseServiceProvider;\n\nclass EventServiceProvider extends BaseServiceProvider\n{\n /**\n * The event listener mappings for the application.\n */\n protected array $listen = [\n \\App\\Events\\DemoEvent::class => [\n \\App\\Listeners\\DemoListener::class,\n ],\n ];\n}\n"], ["/hypervel/app/Providers/BroadcastServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\Facades\\Broadcast;\nuse Hypervel\\Support\\ServiceProvider;\n\nclass BroadcastServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\n */\n public function boot(): void\n {\n Broadcast::routes();\n\n require base_path('routes/channels.php');\n }\n}\n"], ["/hypervel/lang/zh_TW/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => '必須接受 :attribute',\n 'active_url' => ':attribute 必須是有效的網址',\n 'after' => ':attribute 必須是 :date 之後的日期',\n 'after_or_equal' => ':attribute 必須是 :date 之後或相同的日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、數字、連接線或底線',\n 'alpha_num' => ':attribute 只能包含字母和數字',\n 'array' => ':attribute 必須是陣列',\n 'before' => ':attribute 必須是 :date 之前的日期',\n 'before_or_equal' => ':attribute 必須是 :date 之前或相同的日期',\n 'between' => [\n 'numeric' => ':attribute 必須介於 :min 至 :max 之間',\n 'file' => ':attribute 必須介於 :min 至 :max KB 之間',\n 'string' => ':attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => ':attribute 必須有 :min 至 :max 個項目',\n ],\n 'boolean' => ':attribute 欄位必須是 true 或 false、1 或 0',\n 'confirmed' => ':attribute 確認欄位不相符',\n 'date' => ':attribute 必須是有效的日期',\n 'date_format' => ':attribute 與格式 :format 不符',\n 'decimal' => ':attribute 必須有 :decimal 位小數',\n 'different' => ':attribute 與 :other 必須不同',\n 'digits' => ':attribute 必須是 :digits 位數字',\n 'digits_between' => ':attribute 必須介於 :min 至 :max 位數字',\n 'dimensions' => ':attribute 圖片尺寸不正確',\n 'distinct' => ':attribute 已經存在',\n 'email' => ':attribute 必須是有效的電子郵件位址',\n 'exists' => '所選擇的 :attribute 無效',\n 'file' => ':attribute 必須是檔案',\n 'filled' => ':attribute 不能留空',\n 'gt' => [\n 'numeric' => ':attribute 必須大於 :value',\n 'file' => ':attribute 必須大於 :value KB',\n 'string' => ':attribute 必須多於 :value 個字元',\n 'array' => ':attribute 必須多於 :value 個項目',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必須大於或等於 :value',\n 'file' => ':attribute 必須大於或等於 :value KB',\n 'string' => ':attribute 必須多於或等於 :value 個字元',\n 'array' => ':attribute 必須多於或等於 :value 個項目',\n ],\n 'image' => ':attribute 必須是 jpg、jpeg、png、bmp 或 gif 格式的圖片',\n 'in' => '所選的 :attribute 無效',\n 'in_array' => ':attribute 欄位不存在於 :other',\n 'integer' => ':attribute 必須是整數',\n 'ip' => ':attribute 必須是有效的 IP 位址',\n 'ipv4' => ':attribute 必須是有效的 IPv4 位址',\n 'ipv6' => ':attribute 必須是有效的 IPv6 位址',\n 'json' => ':attribute 必須是有效的 JSON 字串',\n 'list' => ':attribute 必須是陣列列表',\n 'lt' => [\n 'numeric' => ':attribute 必須小於 :value',\n 'file' => ':attribute 必須小於 :value KB',\n 'string' => ':attribute 必須少於 :value 個字元',\n 'array' => ':attribute 必須少於 :value 個項目',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必須小於或等於 :value',\n 'file' => ':attribute 必須小於或等於 :value KB',\n 'string' => ':attribute 必須少於或等於 :value 個字元',\n 'array' => ':attribute 必須少於或等於 :value 個項目',\n ],\n 'max' => [\n 'numeric' => ':attribute 不能大於 :max',\n 'file' => ':attribute 不能大於 :max KB',\n 'string' => ':attribute 不能多於 :max 個字元',\n 'array' => ':attribute 最多有 :max 個項目',\n ],\n 'mimes' => ':attribute 必須為 :values 的檔案類型',\n 'mimetypes' => ':attribute 必須為 :values 的檔案 MIME',\n 'min' => [\n 'numeric' => ':attribute 不能小於 :min',\n 'file' => ':attribute 不能小於 :min KB',\n 'string' => ':attribute 不能少於 :min 個字元',\n 'array' => ':attribute 至少要有 :min 個項目',\n ],\n 'not_in' => '所選擇的 :attribute 無效',\n 'not_regex' => ':attribute 的格式錯誤',\n 'numeric' => ':attribute 必須為數字',\n 'present' => ':attribute 必須存在',\n 'prohibits' => '必須提供 :attribute 欄位',\n 'regex' => ':attribute 的格式錯誤',\n 'required' => ':attribute 不能留空',\n 'required_if' => '當 :other 是 :value 時 :attribute 不能留空',\n 'required_unless' => '當 :other 不是 :values 時 :attribute 不能留空',\n 'required_with' => '當 :values 出現時 :attribute 不能留空',\n 'required_with_all' => '當 :values 出現時 :attribute 不能留空',\n 'required_without' => '當 :values 留空時 :attribute 不能留空',\n 'required_without_all' => '當 :values 都不出現時 :attribute 不能留空',\n 'exclude' => ':attribute 欄位被排除',\n 'exclude_if' => '當 :other 為 :value 時,排除 :attribute 欄位',\n 'exclude_unless' => '除非 :other 在 :values 中,否則排除 :attribute 欄位',\n 'exclude_with' => '當 :values 存在時,排除 :attribute 欄位',\n 'exclude_without' => '當 :values 不存在時,排除 :attribute 欄位',\n 'same' => ':attribute 與 :other 必須相同',\n 'size' => [\n 'numeric' => ':attribute 必須是 :size',\n 'file' => ':attribute 必須是 :size KB',\n 'string' => ':attribute 必須是 :size 個字元',\n 'array' => ':attribute 必須包含 :size 個項目',\n ],\n 'starts_with' => ':attribute 必須以 :values 開頭',\n 'string' => ':attribute 必須是字串',\n 'timezone' => ':attribute 必須是有效的時區',\n 'unique' => ':attribute 已經存在',\n 'uploaded' => ':attribute 上傳失敗',\n 'url' => ':attribute 格式錯誤',\n 'uuid' => ':attribute 必須是有效的 UUID',\n 'max_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能大於 :max',\n 'file' => '當 :other 為 :value 時 :attribute 不能大於 :max KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能多於 :max 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 最多只能有 :max 個項目',\n ],\n 'min_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能小於 :min',\n 'file' => '當 :other 為 :value 時 :attribute 不能小於 :min KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能少於 :min 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 至少要有 :min 個項目',\n ],\n 'between_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 之間',\n 'file' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max KB 之間',\n 'string' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => '當 :other 為 :value 時 :attribute 必須有 :min 至 :max 個項目',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必須是有效的電話號碼',\n 'telephone_number' => ':attribute 必須是有效的手機號碼',\n 'chinese_word' => ':attribute 必須包含有效的字元(中文/英文、數字、底線)',\n 'sequential_array' => ':attribute 必須是有序陣列',\n];\n"], ["/hypervel/app/Listeners/DemoListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hypervel\\Support\\Facades\\Log;\n\nclass DemoListener\n{\n public function handle(object $event): void\n {\n Log::info('Demo listener is triggered.');\n }\n}\n"], ["/hypervel/routes/console.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Artisan;\nuse Hypervel\\Support\\Facades\\Schedule;\n\n/*\n|--------------------------------------------------------------------------\n| Console Routes\n|--------------------------------------------------------------------------\n|\n| This file is where you may define all of your Closure based console\n| commands. Each Closure is bound to a command instance allowing a\n| simple approach to interacting with each command's IO methods.\n|\n*/\n\nArtisan::command('hello', function () {\n $this->comment('Hypervel is awesome!');\n})->purpose('This is a demo closure command.');\n\n// Schedule::command('hello')->everyFiveSeconds();\n"], ["/hypervel/app/Http/Middleware/TrimStrings.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\TrimStrings as Middleware;\n\nclass TrimStrings extends Middleware\n{\n /**\n * The names of the attributes that should not be trimmed.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Middleware/VerifyCsrfToken.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\n\nclass VerifyCsrfToken extends Middleware\n{\n /**\n * The URIs that should be excluded from CSRF verification.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/lang/en/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => 'The :attribute must be accepted.',\n 'accepted_if' => 'The :attribute must be accepted when :other is :value.',\n 'active_url' => 'The :attribute is not a valid URL.',\n 'after' => 'The :attribute must be a date after :date.',\n 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',\n 'alpha' => 'The :attribute may only contain letters.',\n 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',\n 'alpha_num' => 'The :attribute may only contain letters and numbers.',\n 'array' => 'The :attribute must be an array.',\n 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.',\n 'before' => 'The :attribute must be a date before :date.',\n 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',\n 'between' => [\n 'numeric' => 'The :attribute must be between :min and :max.',\n 'file' => 'The :attribute must be between :min and :max kilobytes.',\n 'string' => 'The :attribute must be between :min and :max characters.',\n 'array' => 'The :attribute must have between :min and :max items.',\n ],\n 'boolean' => 'The :attribute field must be true or false.',\n 'confirmed' => 'The :attribute confirmation does not match.',\n 'date' => 'The :attribute is not a valid date.',\n 'date_equals' => 'The :attribute must be a date equal to :date.',\n 'date_format' => 'The :attribute does not match the format :format.',\n 'decimal' => 'The :attribute must have :decimal decimal places.',\n 'declined' => 'The :attribute must be declined.',\n 'declined_if' => 'The :attribute must be declined when :other is :value.',\n 'different' => 'The :attribute and :other must be different.',\n 'digits' => 'The :attribute must be :digits digits.',\n 'digits_between' => 'The :attribute must be between :min and :max digits.',\n 'dimensions' => 'The :attribute has invalid image dimensions.',\n 'distinct' => 'The :attribute field has a duplicate value.',\n 'doesnt_end_with' => 'The :attribute must not end with one of the following: :values.',\n 'doesnt_start_with' => 'The :attribute must not start with one of the following: :values.',\n 'email' => 'The :attribute must be a valid email address.',\n 'ends_with' => 'The :attribute must end with one of the following: :values.',\n 'exists' => 'The selected :attribute is invalid.',\n 'file' => 'The :attribute must be a file.',\n 'filled' => 'The :attribute field is required.',\n 'gt' => [\n 'numeric' => 'The :attribute must be greater than :value',\n 'file' => 'The :attribute must be greater than :value kb',\n 'string' => 'The :attribute must be greater than :value characters',\n 'array' => 'The :attribute must be greater than :value items',\n ],\n 'gte' => [\n 'numeric' => 'The :attribute must be great than or equal to :value',\n 'file' => 'The :attribute must be great than or equal to :value kb',\n 'string' => 'The :attribute must be great than or equal to :value characters',\n 'array' => 'The :attribute must be great than or equal to :value items',\n ],\n 'image' => 'The :attribute must be an image.',\n 'in' => 'The selected :attribute is invalid.',\n 'in_array' => 'The :attribute field does not exist in :other.',\n 'integer' => 'The :attribute must be an integer.',\n 'ip' => 'The :attribute must be a valid IP address.',\n 'ipv4' => 'The :attribute must be a valid IPv4 address.',\n 'ipv6' => 'The :attribute must be a valid IPv6 address.',\n 'json' => 'The :attribute must be a valid JSON string.',\n 'list' => 'The :attribute must be a list.',\n 'lowercase' => 'The :attribute must be lowercase.',\n 'lt' => [\n 'numeric' => 'The :attribute must be less than :value',\n 'file' => 'The :attribute must be less than :value kb',\n 'string' => 'The :attribute must be less than :value characters',\n 'array' => 'The :attribute must be less than :value items',\n ],\n 'lte' => [\n 'numeric' => 'The :attribute must be less than or equal to :value',\n 'file' => 'The :attribute must be less than or equal to :value kb',\n 'string' => 'The :attribute must be less than or equal to :value characters',\n 'array' => 'The :attribute must be less than or equal to :value items',\n ],\n 'max' => [\n 'numeric' => 'The :attribute may not be greater than :max.',\n 'file' => 'The :attribute may not be greater than :max kilobytes.',\n 'string' => 'The :attribute may not be greater than :max characters.',\n 'array' => 'The :attribute may not have more than :max items.',\n ],\n 'max_digits' => 'The :attribute must not have more than :max digits.',\n 'mimes' => 'The :attribute must be a file of type: :values.',\n 'mimetypes' => 'The :attribute must be a file of type: :values.',\n 'min' => [\n 'numeric' => 'The :attribute must be at least :min.',\n 'file' => 'The :attribute must be at least :min kilobytes.',\n 'string' => 'The :attribute must be at least :min characters.',\n 'array' => 'The :attribute must have at least :min items.',\n ],\n 'min_digits' => 'The :attribute must have at least :min digits.',\n 'missing' => 'The :attribute must be missing.',\n 'missing_if' => 'The :attribute must be missing when :other is :value.',\n 'missing_unless' => 'The :attribute must be missing unless :other is :value.',\n 'missing_with' => 'The :attribute must be missing when :values is present.',\n 'missing_with_all' => 'The :attribute must be missing when :values are present.',\n 'multiple_of' => 'The :attribute must be a multiple of :value.',\n 'not_in' => 'The selected :attribute is invalid.',\n 'not_regex' => 'The :attribute cannot match a given regular rule.',\n 'numeric' => 'The :attribute must be a number.',\n 'present' => 'The :attribute field must be present.',\n 'prohibits' => 'The :attribute field must be present.',\n 'regex' => 'The :attribute format is invalid.',\n 'required' => 'The :attribute field is required.',\n 'required_if' => 'The :attribute field is required when :other is :value.',\n 'required_unless' => 'The :attribute field is required unless :other is in :values.',\n 'required_with' => 'The :attribute field is required when :values is present.',\n 'required_with_all' => 'The :attribute field is required when :values is present.',\n 'required_without' => 'The :attribute field is required when :values is not present.',\n 'required_without_all' => 'The :attribute field is required when none of :values are present.',\n 'exclude' => 'The :attribute field is excluded.',\n 'exclude_if' => 'The :attribute field is excluded when :other is :value.',\n 'exclude_unless' => 'The :attribute field is excluded unless :other is in :values.',\n 'exclude_with' => 'The :attribute field is excluded when :values is present.',\n 'exclude_without' => 'The :attribute field is excluded when :values is not present.',\n 'same' => 'The :attribute and :other must match.',\n 'size' => [\n 'numeric' => 'The :attribute must be :size.',\n 'file' => 'The :attribute must be :size kilobytes.',\n 'string' => 'The :attribute must be :size characters.',\n 'array' => 'The :attribute must contain :size items.',\n ],\n 'starts_with' => 'The :attribute must be start with :values ',\n 'string' => 'The :attribute must be a string.',\n 'timezone' => 'The :attribute must be a valid zone.',\n 'unique' => 'The :attribute has already been taken.',\n 'uploaded' => 'The :attribute failed to upload.',\n 'uppercase' => 'The :attribute must be uppercase.',\n 'url' => 'The :attribute format is invalid.',\n 'ulid' => 'The :attribute must be a valid ULID.',\n 'uuid' => 'The :attribute is invalid UUID.',\n 'max_if' => [\n 'numeric' => 'The :attribute may not be greater than :max when :other is :value.',\n 'file' => 'The :attribute may not be greater than :max kilobytes when :other is :value.',\n 'string' => 'The :attribute may not be greater than :max characters when :other is :value.',\n 'array' => 'The :attribute may not have more than :max items when :other is :value.',\n ],\n 'min_if' => [\n 'numeric' => 'The :attribute must be at least :min when :other is :value.',\n 'file' => 'The :attribute must be at least :min kilobytes when :other is :value.',\n 'string' => 'The :attribute must be at least :min characters when :other is :value.',\n 'array' => 'The :attribute must have at least :min items when :other is :value.',\n ],\n 'between_if' => [\n 'numeric' => 'The :attribute must be between :min and :max when :other is :value.',\n 'file' => 'The :attribute must be between :min and :max kilobytes when :other is :value.',\n 'string' => 'The :attribute must be between :min and :max characters when :other is :value.',\n 'array' => 'The :attribute must have between :min and :max items when :other is :value.',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => 'The :attribute must be a valid phone number',\n 'telephone_number' => 'The :attribute must be a valid telephone number',\n\n 'chinese_word' => 'The :attribute must contain valid characters(chinese/english character, number, underscore)',\n 'sequential_array' => 'The :attribute must be sequential array',\n];\n"], ["/hypervel/app/Providers/AppServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n public function boot(): void\n {\n }\n\n public function register(): void\n {\n }\n}\n"], ["/hypervel/app/Http/Middleware/ConvertEmptyStringsToNull.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull as Middleware;\n\nclass ConvertEmptyStringsToNull extends Middleware\n{\n /**\n * The names of the attributes that should not be transformed to null.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Models/Model.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Database\\Eloquent\\Model as BaseModel;\n\nabstract class Model extends BaseModel\n{\n protected ?string $connection = null;\n}\n"], ["/hypervel/routes/api.php", "<?php\n\ndeclare(strict_types=1);\n\nuse App\\Http\\Controllers\\IndexController;\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::any('/', [IndexController::class, 'index']);\n"], ["/hypervel/routes/web.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::get('/', function () {\n return view('welcome');\n});\n"], ["/hypervel/app/Http/Middleware/Authenticate.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Auth\\Middleware\\Authenticate as Middleware;\n\nclass Authenticate extends Middleware\n{\n}\n"], ["/hypervel/app/Http/Controllers/AbstractController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nabstract class AbstractController\n{\n}\n"], ["/hypervel/app/Events/DemoEvent.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Events;\n\nclass DemoEvent\n{\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 21:15:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "class\nHandler\nextends ExceptionHandler\n{\nprotected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\npublic function register () : void {}\n}", "code_description": "This code segment functions to: Configure application exception handling by defining conditions for JSON response formatting based on request path patterns and specifying sensitive data fields to exclude from session storage."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```php\n[TASK_BEGIN]\n public function register(): void\n {\n $this->renderable(function (Throwable $e, Request $request) {\n if ($request->expectsJson()) {\n return response()->json([\n 'message' => $e->getMessage(),\n ], 500);\n }\n });\n }\n[TASK_END]\n```", "inference_time": "2025-08-20 21-15-35"}, "editdistance_info": {"edit_distance": 23.0088, "calculate_time": "2025-08-20 21:15:35", "true_code_clean": "class Handler extends ExceptionHandler\n{\n protected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\n public function register(): void\n {\n $this->shouldRenderJsonWhen(function (Request $request, Throwable $e) {\n return str_starts_with($path = $request->path(), 'api')\n && (strlen($path) === 3 || $path[3] === '/');\n });\n $this->reportable(function (Throwable $e) {\n });\n }\n}", "predict_code_clean": "public function register(): void\n {\n $this->renderable(function (Throwable $e, Request $request) {\n if ($request->expectsJson()) {\n return response()->json([\n 'message' => $e->getMessage(),\n ], 500);\n }\n });\n }"}} | |
| {"repo_name": "hypervel", "file_name": "/hypervel/app/Listeners/DbQueryExecutedListener.php", "inference_info": {"prefix_code": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hyperf\\Collection\\Arr;\nuse Hyperf\\Database\\Events\\QueryExecuted;\nuse Hyperf\\Event\\Contract\\ListenerInterface;\nuse Hyperf\\Framework\\Logger\\StdoutLogger;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\n", "suffix_code": "\n", "middle_code": "class DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(StdoutLogger::class);\n }\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n public function process(object $event): void\n {\n if ($event instanceof QueryExecuted) {\n $sql = $event->sql;\n if (! Arr::isAssoc($event->bindings)) {\n $position = 0;\n foreach ($event->bindings as $value) {\n $position = strpos($sql, '?', $position);\n if ($position === false) {\n break;\n }\n $value = \"'{$value}'\";\n $sql = substr_replace($sql, $value, $position, 1);\n $position += strlen($value);\n }\n }\n $this->logger->info(sprintf('[%s] %s', $event->time, $sql));\n }\n }\n}", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "php", "sub_task_type": null}, "context_code": [["/hypervel/app/Exceptions/Handler.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Exceptions;\n\nuse Hypervel\\Foundation\\Exceptions\\Handler as ExceptionHandler;\nuse Hypervel\\Http\\Request;\nuse Throwable;\n\nclass Handler extends ExceptionHandler\n{\n /**\n * The list of the inputs that are never flashed to the session on validation exceptions.\n *\n * @var array<int, string>\n */\n protected array $dontFlash = [\n 'current_password',\n 'password',\n 'password_confirmation',\n ];\n\n /**\n * Register the exception handling callbacks for the application.\n */\n public function register(): void\n {\n // return json when path start with `api`\n $this->shouldRenderJsonWhen(function (Request $request, Throwable $e) {\n return str_starts_with($path = $request->path(), 'api')\n && (strlen($path) === 3 || $path[3] === '/');\n });\n\n $this->reportable(function (Throwable $e) {\n });\n }\n}\n"], ["/hypervel/routes/channels.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Broadcast;\n\n/*\n|--------------------------------------------------------------------------\n| Broadcast Channels\n|--------------------------------------------------------------------------\n|\n| Here you may register all of the event broadcasting channels that your\n| application supports. The given channel authorization callbacks are\n| used to check if an authenticated user can listen to the channel.\n|\n*/\n\nBroadcast::channel('App.Models.User.{id}', function ($user, $id) {\n return (int) $user->id === (int) $id;\n});\n"], ["/hypervel/app/Listeners/DemoListener.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Listeners;\n\nuse Hypervel\\Support\\Facades\\Log;\n\nclass DemoListener\n{\n public function handle(object $event): void\n {\n Log::info('Demo listener is triggered.');\n }\n}\n"], ["/hypervel/app/Http/Controllers/IndexController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nuse Hypervel\\Http\\Request;\n\nclass IndexController extends AbstractController\n{\n public function index(Request $request): array\n {\n $user = $request->input('user', 'Hypervel');\n $method = $request->getMethod();\n\n return [\n 'method' => $method,\n 'message' => \"Hello {$user}.\",\n ];\n }\n}\n"], ["/hypervel/app/Console/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console;\n\nuse Hypervel\\Console\\Scheduling\\Schedule;\nuse Hypervel\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n /**\n * Define the application's command schedule.\n */\n public function schedule(Schedule $schedule): void\n {\n // $schedule->command('demo:hi')->everyFiveSeconds();\n }\n\n public function commands(): void\n {\n $this->load(__DIR__ . '/Commands');\n\n require base_path('routes/console.php');\n }\n}\n"], ["/hypervel/app/Console/Commands/DemoCommand.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console\\Commands;\n\nuse Hypervel\\Console\\Command;\n\nclass DemoCommand extends Command\n{\n protected ?string $signature = 'demo:hi {--name=}';\n\n protected string $description = 'Hyperf Demo Command';\n\n public function handle()\n {\n $this->info('Hello ' . ($this->option('name') ?: 'Hypervel'));\n }\n}\n"], ["/hypervel/app/Providers/RouteServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\RouteServiceProvider as BaseServiceProvider;\nuse Hypervel\\Support\\Facades\\Route;\n\nclass RouteServiceProvider extends BaseServiceProvider\n{\n /**\n * The route files for the application.\n */\n protected array $routes = [\n ];\n\n public function boot(): void\n {\n parent::boot();\n\n Route::group(\n '/api',\n base_path('routes/api.php'),\n ['middleware' => 'api']\n );\n\n Route::group(\n '/',\n base_path('routes/web.php'),\n ['middleware' => 'web']\n );\n }\n}\n"], ["/hypervel/app/Http/Requests/DemoRequest.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Requests;\n\nuse Hypervel\\Foundation\\Http\\FormRequest;\n\nclass DemoRequest extends FormRequest\n{\n /**\n * Determine if the user is authorized to make this request.\n */\n public function authorize(): bool\n {\n return true;\n }\n\n /**\n * Get the validation rules that apply to the request.\n */\n public function rules(): array\n {\n return [\n 'name' => 'required|string|min:3',\n 'email' => 'required|email',\n 'email2' => 'required|array',\n ];\n }\n}\n"], ["/hypervel/app/Http/Kernel.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http;\n\nuse Hypervel\\Foundation\\Http\\Kernel as HttpKernel;\n\nclass Kernel extends HttpKernel\n{\n /**\n * The application's global HTTP middleware stack.\n *\n * These middleware are run during every request to your application.\n *\n * @var array<int, class-string|string>\n */\n protected array $middleware = [\n // \\App\\Http\\Middleware\\TrimStrings::class,\n // \\App\\Http\\Middleware\\ConvertEmptyStringsToNull::class\n ];\n\n /**\n * The application's route middleware groups.\n *\n * @var array<string, array<int, class-string|string>>\n */\n protected array $middlewareGroups = [\n 'web' => [\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ],\n\n 'api' => [\n // 'throttle:60,1,api',\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n ],\n ];\n\n /**\n * The application's middleware aliases.\n *\n * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.\n *\n * @var array<string, class-string|string>\n */\n protected array $middlewareAliases = [\n 'auth' => \\App\\Http\\Middleware\\Authenticate::class,\n 'can' => \\Hypervel\\Auth\\Middleware\\Authorize::class,\n 'throttle' => \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n 'bindings' => \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n 'signed' => \\App\\Http\\Middleware\\ValidateSignature::class,\n ];\n\n /**\n * The priority-sorted list of middleware.\n *\n * Forces non-global middleware to always be in the given order.\n *\n * @var string[]\n */\n protected array $middlewarePriority = [\n // \\Hypervel\\Router\\Middleware\\ThrottleRequests::class,\n // \\Hypervel\\Router\\Middleware\\SubstituteBindings::class,\n // \\Hypervel\\Session\\Middleware\\StartSession::class,\n // \\Hypervel\\View\\Middleware\\ShareErrorsFromSession::class,\n // \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n ];\n}\n"], ["/hypervel/app/Providers/EventServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Foundation\\Support\\Providers\\EventServiceProvider as BaseServiceProvider;\n\nclass EventServiceProvider extends BaseServiceProvider\n{\n /**\n * The event listener mappings for the application.\n */\n protected array $listen = [\n \\App\\Events\\DemoEvent::class => [\n \\App\\Listeners\\DemoListener::class,\n ],\n ];\n}\n"], ["/hypervel/routes/console.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Artisan;\nuse Hypervel\\Support\\Facades\\Schedule;\n\n/*\n|--------------------------------------------------------------------------\n| Console Routes\n|--------------------------------------------------------------------------\n|\n| This file is where you may define all of your Closure based console\n| commands. Each Closure is bound to a command instance allowing a\n| simple approach to interacting with each command's IO methods.\n|\n*/\n\nArtisan::command('hello', function () {\n $this->comment('Hypervel is awesome!');\n})->purpose('This is a demo closure command.');\n\n// Schedule::command('hello')->everyFiveSeconds();\n"], ["/hypervel/app/Providers/BroadcastServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\Facades\\Broadcast;\nuse Hypervel\\Support\\ServiceProvider;\n\nclass BroadcastServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\n */\n public function boot(): void\n {\n Broadcast::routes();\n\n require base_path('routes/channels.php');\n }\n}\n"], ["/hypervel/app/Providers/AppServiceProvider.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nuse Hypervel\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n public function boot(): void\n {\n }\n\n public function register(): void\n {\n }\n}\n"], ["/hypervel/app/Http/Middleware/ValidateSignature.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Router\\Middleware\\ValidateSignature as Middleware;\n\nclass ValidateSignature extends Middleware\n{\n /**\n * The names of the query string parameters that should be ignored.\n *\n * @var array<int, string>\n */\n protected array $except = [\n // 'fbclid',\n // 'utm_campaign',\n // 'utm_content',\n // 'utm_medium',\n // 'utm_source',\n // 'utm_term',\n ];\n}\n"], ["/hypervel/app/Models/Model.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Database\\Eloquent\\Model as BaseModel;\n\nabstract class Model extends BaseModel\n{\n protected ?string $connection = null;\n}\n"], ["/hypervel/app/Http/Middleware/TrimStrings.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\TrimStrings as Middleware;\n\nclass TrimStrings extends Middleware\n{\n /**\n * The names of the attributes that should not be trimmed.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Middleware/VerifyCsrfToken.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\n\nclass VerifyCsrfToken extends Middleware\n{\n /**\n * The URIs that should be excluded from CSRF verification.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/app/Http/Middleware/ConvertEmptyStringsToNull.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull as Middleware;\n\nclass ConvertEmptyStringsToNull extends Middleware\n{\n /**\n * The names of the attributes that should not be transformed to null.\n *\n * @var array<int, string>\n */\n protected array $except = [\n ];\n}\n"], ["/hypervel/lang/zh_CN/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => ':attribute 必须接受',\n 'active_url' => ':attribute 必须是一个合法的 URL',\n 'after' => ':attribute 必须是 :date 之后的一个日期',\n 'after_or_equal' => ':attribute 必须是 :date 之后或相同的一个日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、数字、中划线或下划线',\n 'alpha_num' => ':attribute 只能包含字母和数字',\n 'array' => ':attribute 必须是一个数组',\n 'before' => ':attribute 必须是 :date 之前的一个日期',\n 'before_or_equal' => ':attribute 必须是 :date 之前或相同的一个日期',\n 'between' => [\n 'numeric' => ':attribute 必须在 :min 到 :max 之间',\n 'file' => ':attribute 必须在 :min 到 :max kb 之间',\n 'string' => ':attribute 必须在 :min 到 :max 个字符之间',\n 'array' => ':attribute 必须在 :min 到 :max 项之间',\n ],\n 'boolean' => ':attribute 字符必须是 true 或 false, 1 或 0',\n 'confirmed' => ':attribute 二次确认不匹配',\n 'date' => ':attribute 必须是一个合法的日期',\n 'date_format' => ':attribute 与给定的格式 :format 不符合',\n 'decimal' => ':attribute 必须有 :decimal 位小数',\n 'different' => ':attribute 必须不同于 :other',\n 'digits' => ':attribute 必须是 :digits 位',\n 'digits_between' => ':attribute 必须在 :min 和 :max 位之间',\n 'dimensions' => ':attribute 具有无效的图片尺寸',\n 'distinct' => ':attribute 字段具有重复值',\n 'email' => ':attribute 必须是一个合法的电子邮件地址',\n 'exists' => '选定的 :attribute 是无效的',\n 'file' => ':attribute 必须是一个文件',\n 'filled' => ':attribute 的字段是必填的',\n 'gt' => [\n 'numeric' => ':attribute 必须大于 :value',\n 'file' => ':attribute 必须大于 :value kb',\n 'string' => ':attribute 必须大于 :value 个字符',\n 'array' => ':attribute 必须大于 :value 项',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必须大于等于 :value',\n 'file' => ':attribute 必须大于等于 :value kb',\n 'string' => ':attribute 必须大于等于 :value 个字符',\n 'array' => ':attribute 必须大于等于 :value 项',\n ],\n 'image' => ':attribute 必须是 jpg, jpeg, png, bmp 或者 gif 格式的图片',\n 'in' => '选定的 :attribute 是无效的',\n 'in_array' => ':attribute 字段不存在于 :other',\n 'integer' => ':attribute 必须是个整数',\n 'ip' => ':attribute 必须是一个合法的 IP 地址',\n 'ipv4' => ':attribute 必须是一个合法的 IPv4 地址',\n 'ipv6' => ':attribute 必须是一个合法的 IPv6 地址',\n 'json' => ':attribute 必须是一个合法的 JSON 字符串',\n 'list' => ':attribute 必须是一个数组列表',\n 'lt' => [\n 'numeric' => ':attribute 必须小于 :value',\n 'file' => ':attribute 必须小于 :value kb',\n 'string' => ':attribute 必须小于 :value 个字符',\n 'array' => ':attribute 必须小于 :value 项',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必须小于等于 :value',\n 'file' => ':attribute 必须小于等于 :value kb',\n 'string' => ':attribute 必须小于等于 :value 个字符',\n 'array' => ':attribute 必须小于等于 :value 项',\n ],\n 'max' => [\n 'numeric' => ':attribute 的最大值为 :max',\n 'file' => ':attribute 的最大为 :max kb',\n 'string' => ':attribute 的最大长度为 :max 字符',\n 'array' => ':attribute 至多有 :max 项',\n ],\n 'mimes' => ':attribute 的文件类型必须是 :values',\n 'mimetypes' => ':attribute 的文件MIME必须是 :values',\n 'min' => [\n 'numeric' => ':attribute 的最小值为 :min',\n 'file' => ':attribute 大小至少为 :min kb',\n 'string' => ':attribute 的最小长度为 :min 字符',\n 'array' => ':attribute 至少有 :min 项',\n ],\n 'not_in' => '选定的 :attribute 是无效的',\n 'not_regex' => ':attribute 不能匹配给定的正则',\n 'numeric' => ':attribute 必须是数字',\n 'present' => ':attribute 字段必须存在',\n 'prohibits' => '必须提供 :attribute 字段',\n 'regex' => ':attribute 格式是无效的',\n 'required' => ':attribute 字段是必须的',\n 'required_if' => ':attribute 字段是必须的当 :other 是 :value',\n 'required_unless' => ':attribute 字段是必须的,除非 :other 是在 :values 中',\n 'required_with' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_with_all' => ':attribute 字段是必须的当 :values 是存在的',\n 'required_without' => ':attribute 字段是必须的当 :values 是不存在的',\n 'required_without_all' => ':attribute 字段是必须的当 没有一个 :values 是存在的',\n 'exclude' => ':attribute 字段是被排除的',\n 'exclude_if' => '当 :other 为 :value 时,排除 :attribute 字段',\n 'exclude_unless' => '除非 :other 是在 :values 中,否则排除 :attribute 字段',\n 'exclude_with' => '当 :values 存在时,排除 :attribute 字段',\n 'exclude_without' => '当 :values 不存在时,排除 :attribute 字段',\n 'same' => ':attribute 和 :other 必须匹配',\n 'size' => [\n 'numeric' => ':attribute 必须是 :size',\n 'file' => ':attribute 必须是 :size kb',\n 'string' => ':attribute 必须是 :size 个字符',\n 'array' => ':attribute 必须包括 :size 项',\n ],\n 'starts_with' => ':attribute 必须以 :values 为开头',\n 'string' => ':attribute 必须是一个字符串',\n 'timezone' => ':attribute 必须是个有效的时区',\n 'unique' => ':attribute 已存在',\n 'uploaded' => ':attribute 上传失败',\n 'url' => ':attribute 无效的格式',\n 'uuid' => ':attribute 无效的UUID格式',\n 'max_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 不能大于 :max',\n 'file' => '当 :other 为 :value 时 :attribute 不能大于 :max kb',\n 'string' => '当 :other 为 :value 时 :attribute 不能大于 :max 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 最多只有 :max 个单元',\n ],\n 'min_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须大于等于 :min',\n 'file' => '当 :other 为 :value 时 :attribute 大小不能小于 :min kb',\n 'string' => '当 :other 为 :value 时 :attribute 至少为 :min 个字符',\n 'array' => '当 :other 为 :value 时 :attribute 至少有 :min 个单元',\n ],\n 'between_if' => [\n 'numeric' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 之间',\n 'file' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max kb 之间',\n 'string' => '当 :other 为 :value 时 :attribute 必须介于 :min - :max 个字符之间',\n 'array' => '当 :other 为 :value 时 :attribute 必须只有 :min - :max 个单元',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必须为一个有效的电话号码',\n 'telephone_number' => ':attribute 必须为一个有效的手机号码',\n\n 'chinese_word' => ':attribute 必须包含以下有效字符 (中文/英文,数字, 下划线)',\n 'sequential_array' => ':attribute 必须是一个有序数组',\n];\n"], ["/hypervel/app/Models/User.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Models;\n\nuse Hypervel\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n /**\n * The attributes that are mass assignable.\n */\n protected array $fillable = [\n 'name',\n 'email',\n 'email_verified_at',\n 'password',\n ];\n}\n"], ["/hypervel/routes/api.php", "<?php\n\ndeclare(strict_types=1);\n\nuse App\\Http\\Controllers\\IndexController;\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::any('/', [IndexController::class, 'index']);\n"], ["/hypervel/lang/zh_TW/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => '必須接受 :attribute',\n 'active_url' => ':attribute 必須是有效的網址',\n 'after' => ':attribute 必須是 :date 之後的日期',\n 'after_or_equal' => ':attribute 必須是 :date 之後或相同的日期',\n 'alpha' => ':attribute 只能包含字母',\n 'alpha_dash' => ':attribute 只能包含字母、數字、連接線或底線',\n 'alpha_num' => ':attribute 只能包含字母和數字',\n 'array' => ':attribute 必須是陣列',\n 'before' => ':attribute 必須是 :date 之前的日期',\n 'before_or_equal' => ':attribute 必須是 :date 之前或相同的日期',\n 'between' => [\n 'numeric' => ':attribute 必須介於 :min 至 :max 之間',\n 'file' => ':attribute 必須介於 :min 至 :max KB 之間',\n 'string' => ':attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => ':attribute 必須有 :min 至 :max 個項目',\n ],\n 'boolean' => ':attribute 欄位必須是 true 或 false、1 或 0',\n 'confirmed' => ':attribute 確認欄位不相符',\n 'date' => ':attribute 必須是有效的日期',\n 'date_format' => ':attribute 與格式 :format 不符',\n 'decimal' => ':attribute 必須有 :decimal 位小數',\n 'different' => ':attribute 與 :other 必須不同',\n 'digits' => ':attribute 必須是 :digits 位數字',\n 'digits_between' => ':attribute 必須介於 :min 至 :max 位數字',\n 'dimensions' => ':attribute 圖片尺寸不正確',\n 'distinct' => ':attribute 已經存在',\n 'email' => ':attribute 必須是有效的電子郵件位址',\n 'exists' => '所選擇的 :attribute 無效',\n 'file' => ':attribute 必須是檔案',\n 'filled' => ':attribute 不能留空',\n 'gt' => [\n 'numeric' => ':attribute 必須大於 :value',\n 'file' => ':attribute 必須大於 :value KB',\n 'string' => ':attribute 必須多於 :value 個字元',\n 'array' => ':attribute 必須多於 :value 個項目',\n ],\n 'gte' => [\n 'numeric' => ':attribute 必須大於或等於 :value',\n 'file' => ':attribute 必須大於或等於 :value KB',\n 'string' => ':attribute 必須多於或等於 :value 個字元',\n 'array' => ':attribute 必須多於或等於 :value 個項目',\n ],\n 'image' => ':attribute 必須是 jpg、jpeg、png、bmp 或 gif 格式的圖片',\n 'in' => '所選的 :attribute 無效',\n 'in_array' => ':attribute 欄位不存在於 :other',\n 'integer' => ':attribute 必須是整數',\n 'ip' => ':attribute 必須是有效的 IP 位址',\n 'ipv4' => ':attribute 必須是有效的 IPv4 位址',\n 'ipv6' => ':attribute 必須是有效的 IPv6 位址',\n 'json' => ':attribute 必須是有效的 JSON 字串',\n 'list' => ':attribute 必須是陣列列表',\n 'lt' => [\n 'numeric' => ':attribute 必須小於 :value',\n 'file' => ':attribute 必須小於 :value KB',\n 'string' => ':attribute 必須少於 :value 個字元',\n 'array' => ':attribute 必須少於 :value 個項目',\n ],\n 'lte' => [\n 'numeric' => ':attribute 必須小於或等於 :value',\n 'file' => ':attribute 必須小於或等於 :value KB',\n 'string' => ':attribute 必須少於或等於 :value 個字元',\n 'array' => ':attribute 必須少於或等於 :value 個項目',\n ],\n 'max' => [\n 'numeric' => ':attribute 不能大於 :max',\n 'file' => ':attribute 不能大於 :max KB',\n 'string' => ':attribute 不能多於 :max 個字元',\n 'array' => ':attribute 最多有 :max 個項目',\n ],\n 'mimes' => ':attribute 必須為 :values 的檔案類型',\n 'mimetypes' => ':attribute 必須為 :values 的檔案 MIME',\n 'min' => [\n 'numeric' => ':attribute 不能小於 :min',\n 'file' => ':attribute 不能小於 :min KB',\n 'string' => ':attribute 不能少於 :min 個字元',\n 'array' => ':attribute 至少要有 :min 個項目',\n ],\n 'not_in' => '所選擇的 :attribute 無效',\n 'not_regex' => ':attribute 的格式錯誤',\n 'numeric' => ':attribute 必須為數字',\n 'present' => ':attribute 必須存在',\n 'prohibits' => '必須提供 :attribute 欄位',\n 'regex' => ':attribute 的格式錯誤',\n 'required' => ':attribute 不能留空',\n 'required_if' => '當 :other 是 :value 時 :attribute 不能留空',\n 'required_unless' => '當 :other 不是 :values 時 :attribute 不能留空',\n 'required_with' => '當 :values 出現時 :attribute 不能留空',\n 'required_with_all' => '當 :values 出現時 :attribute 不能留空',\n 'required_without' => '當 :values 留空時 :attribute 不能留空',\n 'required_without_all' => '當 :values 都不出現時 :attribute 不能留空',\n 'exclude' => ':attribute 欄位被排除',\n 'exclude_if' => '當 :other 為 :value 時,排除 :attribute 欄位',\n 'exclude_unless' => '除非 :other 在 :values 中,否則排除 :attribute 欄位',\n 'exclude_with' => '當 :values 存在時,排除 :attribute 欄位',\n 'exclude_without' => '當 :values 不存在時,排除 :attribute 欄位',\n 'same' => ':attribute 與 :other 必須相同',\n 'size' => [\n 'numeric' => ':attribute 必須是 :size',\n 'file' => ':attribute 必須是 :size KB',\n 'string' => ':attribute 必須是 :size 個字元',\n 'array' => ':attribute 必須包含 :size 個項目',\n ],\n 'starts_with' => ':attribute 必須以 :values 開頭',\n 'string' => ':attribute 必須是字串',\n 'timezone' => ':attribute 必須是有效的時區',\n 'unique' => ':attribute 已經存在',\n 'uploaded' => ':attribute 上傳失敗',\n 'url' => ':attribute 格式錯誤',\n 'uuid' => ':attribute 必須是有效的 UUID',\n 'max_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能大於 :max',\n 'file' => '當 :other 為 :value 時 :attribute 不能大於 :max KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能多於 :max 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 最多只能有 :max 個項目',\n ],\n 'min_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 不能小於 :min',\n 'file' => '當 :other 為 :value 時 :attribute 不能小於 :min KB',\n 'string' => '當 :other 為 :value 時 :attribute 不能少於 :min 個字元',\n 'array' => '當 :other 為 :value 時 :attribute 至少要有 :min 個項目',\n ],\n 'between_if' => [\n 'numeric' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 之間',\n 'file' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max KB 之間',\n 'string' => '當 :other 為 :value 時 :attribute 必須介於 :min 至 :max 個字元之間',\n 'array' => '當 :other 為 :value 時 :attribute 必須有 :min 至 :max 個項目',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => ':attribute 必須是有效的電話號碼',\n 'telephone_number' => ':attribute 必須是有效的手機號碼',\n 'chinese_word' => ':attribute 必須包含有效的字元(中文/英文、數字、底線)',\n 'sequential_array' => ':attribute 必須是有序陣列',\n];\n"], ["/hypervel/lang/en/validation.php", "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | The following language lines contain the default error messages used by\n | the validator class. Some of these rules have multiple versions such\n | as the size rules. Feel free to tweak each of these messages here.\n |\n */\n\n 'accepted' => 'The :attribute must be accepted.',\n 'accepted_if' => 'The :attribute must be accepted when :other is :value.',\n 'active_url' => 'The :attribute is not a valid URL.',\n 'after' => 'The :attribute must be a date after :date.',\n 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',\n 'alpha' => 'The :attribute may only contain letters.',\n 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',\n 'alpha_num' => 'The :attribute may only contain letters and numbers.',\n 'array' => 'The :attribute must be an array.',\n 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.',\n 'before' => 'The :attribute must be a date before :date.',\n 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',\n 'between' => [\n 'numeric' => 'The :attribute must be between :min and :max.',\n 'file' => 'The :attribute must be between :min and :max kilobytes.',\n 'string' => 'The :attribute must be between :min and :max characters.',\n 'array' => 'The :attribute must have between :min and :max items.',\n ],\n 'boolean' => 'The :attribute field must be true or false.',\n 'confirmed' => 'The :attribute confirmation does not match.',\n 'date' => 'The :attribute is not a valid date.',\n 'date_equals' => 'The :attribute must be a date equal to :date.',\n 'date_format' => 'The :attribute does not match the format :format.',\n 'decimal' => 'The :attribute must have :decimal decimal places.',\n 'declined' => 'The :attribute must be declined.',\n 'declined_if' => 'The :attribute must be declined when :other is :value.',\n 'different' => 'The :attribute and :other must be different.',\n 'digits' => 'The :attribute must be :digits digits.',\n 'digits_between' => 'The :attribute must be between :min and :max digits.',\n 'dimensions' => 'The :attribute has invalid image dimensions.',\n 'distinct' => 'The :attribute field has a duplicate value.',\n 'doesnt_end_with' => 'The :attribute must not end with one of the following: :values.',\n 'doesnt_start_with' => 'The :attribute must not start with one of the following: :values.',\n 'email' => 'The :attribute must be a valid email address.',\n 'ends_with' => 'The :attribute must end with one of the following: :values.',\n 'exists' => 'The selected :attribute is invalid.',\n 'file' => 'The :attribute must be a file.',\n 'filled' => 'The :attribute field is required.',\n 'gt' => [\n 'numeric' => 'The :attribute must be greater than :value',\n 'file' => 'The :attribute must be greater than :value kb',\n 'string' => 'The :attribute must be greater than :value characters',\n 'array' => 'The :attribute must be greater than :value items',\n ],\n 'gte' => [\n 'numeric' => 'The :attribute must be great than or equal to :value',\n 'file' => 'The :attribute must be great than or equal to :value kb',\n 'string' => 'The :attribute must be great than or equal to :value characters',\n 'array' => 'The :attribute must be great than or equal to :value items',\n ],\n 'image' => 'The :attribute must be an image.',\n 'in' => 'The selected :attribute is invalid.',\n 'in_array' => 'The :attribute field does not exist in :other.',\n 'integer' => 'The :attribute must be an integer.',\n 'ip' => 'The :attribute must be a valid IP address.',\n 'ipv4' => 'The :attribute must be a valid IPv4 address.',\n 'ipv6' => 'The :attribute must be a valid IPv6 address.',\n 'json' => 'The :attribute must be a valid JSON string.',\n 'list' => 'The :attribute must be a list.',\n 'lowercase' => 'The :attribute must be lowercase.',\n 'lt' => [\n 'numeric' => 'The :attribute must be less than :value',\n 'file' => 'The :attribute must be less than :value kb',\n 'string' => 'The :attribute must be less than :value characters',\n 'array' => 'The :attribute must be less than :value items',\n ],\n 'lte' => [\n 'numeric' => 'The :attribute must be less than or equal to :value',\n 'file' => 'The :attribute must be less than or equal to :value kb',\n 'string' => 'The :attribute must be less than or equal to :value characters',\n 'array' => 'The :attribute must be less than or equal to :value items',\n ],\n 'max' => [\n 'numeric' => 'The :attribute may not be greater than :max.',\n 'file' => 'The :attribute may not be greater than :max kilobytes.',\n 'string' => 'The :attribute may not be greater than :max characters.',\n 'array' => 'The :attribute may not have more than :max items.',\n ],\n 'max_digits' => 'The :attribute must not have more than :max digits.',\n 'mimes' => 'The :attribute must be a file of type: :values.',\n 'mimetypes' => 'The :attribute must be a file of type: :values.',\n 'min' => [\n 'numeric' => 'The :attribute must be at least :min.',\n 'file' => 'The :attribute must be at least :min kilobytes.',\n 'string' => 'The :attribute must be at least :min characters.',\n 'array' => 'The :attribute must have at least :min items.',\n ],\n 'min_digits' => 'The :attribute must have at least :min digits.',\n 'missing' => 'The :attribute must be missing.',\n 'missing_if' => 'The :attribute must be missing when :other is :value.',\n 'missing_unless' => 'The :attribute must be missing unless :other is :value.',\n 'missing_with' => 'The :attribute must be missing when :values is present.',\n 'missing_with_all' => 'The :attribute must be missing when :values are present.',\n 'multiple_of' => 'The :attribute must be a multiple of :value.',\n 'not_in' => 'The selected :attribute is invalid.',\n 'not_regex' => 'The :attribute cannot match a given regular rule.',\n 'numeric' => 'The :attribute must be a number.',\n 'present' => 'The :attribute field must be present.',\n 'prohibits' => 'The :attribute field must be present.',\n 'regex' => 'The :attribute format is invalid.',\n 'required' => 'The :attribute field is required.',\n 'required_if' => 'The :attribute field is required when :other is :value.',\n 'required_unless' => 'The :attribute field is required unless :other is in :values.',\n 'required_with' => 'The :attribute field is required when :values is present.',\n 'required_with_all' => 'The :attribute field is required when :values is present.',\n 'required_without' => 'The :attribute field is required when :values is not present.',\n 'required_without_all' => 'The :attribute field is required when none of :values are present.',\n 'exclude' => 'The :attribute field is excluded.',\n 'exclude_if' => 'The :attribute field is excluded when :other is :value.',\n 'exclude_unless' => 'The :attribute field is excluded unless :other is in :values.',\n 'exclude_with' => 'The :attribute field is excluded when :values is present.',\n 'exclude_without' => 'The :attribute field is excluded when :values is not present.',\n 'same' => 'The :attribute and :other must match.',\n 'size' => [\n 'numeric' => 'The :attribute must be :size.',\n 'file' => 'The :attribute must be :size kilobytes.',\n 'string' => 'The :attribute must be :size characters.',\n 'array' => 'The :attribute must contain :size items.',\n ],\n 'starts_with' => 'The :attribute must be start with :values ',\n 'string' => 'The :attribute must be a string.',\n 'timezone' => 'The :attribute must be a valid zone.',\n 'unique' => 'The :attribute has already been taken.',\n 'uploaded' => 'The :attribute failed to upload.',\n 'uppercase' => 'The :attribute must be uppercase.',\n 'url' => 'The :attribute format is invalid.',\n 'ulid' => 'The :attribute must be a valid ULID.',\n 'uuid' => 'The :attribute is invalid UUID.',\n 'max_if' => [\n 'numeric' => 'The :attribute may not be greater than :max when :other is :value.',\n 'file' => 'The :attribute may not be greater than :max kilobytes when :other is :value.',\n 'string' => 'The :attribute may not be greater than :max characters when :other is :value.',\n 'array' => 'The :attribute may not have more than :max items when :other is :value.',\n ],\n 'min_if' => [\n 'numeric' => 'The :attribute must be at least :min when :other is :value.',\n 'file' => 'The :attribute must be at least :min kilobytes when :other is :value.',\n 'string' => 'The :attribute must be at least :min characters when :other is :value.',\n 'array' => 'The :attribute must have at least :min items when :other is :value.',\n ],\n 'between_if' => [\n 'numeric' => 'The :attribute must be between :min and :max when :other is :value.',\n 'file' => 'The :attribute must be between :min and :max kilobytes when :other is :value.',\n 'string' => 'The :attribute must be between :min and :max characters when :other is :value.',\n 'array' => 'The :attribute must have between :min and :max items when :other is :value.',\n ],\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Language Lines\n |--------------------------------------------------------------------------\n |\n | Here you may specify custom validation messages for attributes using the\n | convention \"attribute.rule\" to name the lines. This makes it quick to\n | specify a specific custom language line for a given attribute rule.\n |\n */\n\n 'custom' => [\n 'attribute-name' => [\n 'rule-name' => 'custom-message',\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Custom Validation Attributes\n |--------------------------------------------------------------------------\n |\n | The following language lines are used to swap attribute place-holders\n | with something more reader friendly such as E-Mail Address instead\n | of \"email\". This simply helps us make messages a little cleaner.\n |\n */\n\n 'attributes' => [],\n 'phone_number' => 'The :attribute must be a valid phone number',\n 'telephone_number' => 'The :attribute must be a valid telephone number',\n\n 'chinese_word' => 'The :attribute must contain valid characters(chinese/english character, number, underscore)',\n 'sequential_array' => 'The :attribute must be sequential array',\n];\n"], ["/hypervel/routes/web.php", "<?php\n\ndeclare(strict_types=1);\n\nuse Hypervel\\Support\\Facades\\Route;\n\nRoute::get('/', function () {\n return view('welcome');\n});\n"], ["/hypervel/app/Events/DemoEvent.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Events;\n\nclass DemoEvent\n{\n}\n"], ["/hypervel/app/Http/Middleware/Authenticate.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Middleware;\n\nuse Hypervel\\Auth\\Middleware\\Authenticate as Middleware;\n\nclass Authenticate extends Middleware\n{\n}\n"], ["/hypervel/app/Http/Controllers/AbstractController.php", "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Http\\Controllers;\n\nabstract class AbstractController\n{\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 21:15:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "class\nDbQueryExecutedListener\nimplements ListenerInterface\n{\nprivate LoggerInterface $logger;\npublic function __construct (ContainerInterface $container) {}\npublic function listen () : array {}\npublic function process (object $event) : void {}\n}", "code_description": "This code segment functions to: Capture and format database query execution details for logging purposes, including parameter value substitution and performance metric recording."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```php\n[TASK_BEGIN]\nclass DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(LoggerInterface::class);\n }\n\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n\n public function process(object $event): void\n {\n $this->logger->info(sprintf('[%s] %s %s ms', $event->connectionName, $event->sql, $event->time));\n }\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 21-16-09"}, "editdistance_info": {"edit_distance": 43.1718, "calculate_time": "2025-08-20 21:16:09", "true_code_clean": "class DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(StdoutLogger::class);\n }\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n public function process(object $event): void\n {\n if ($event instanceof QueryExecuted) {\n $sql = $event->sql;\n if (! Arr::isAssoc($event->bindings)) {\n $position = 0;\n foreach ($event->bindings as $value) {\n $position = strpos($sql, '?', $position);\n if ($position === false) {\n break;\n }\n $value = \"'{$value}'\";\n $sql = substr_replace($sql, $value, $position, 1);\n $position += strlen($value);\n }\n }\n $this->logger->info(sprintf('[%s] %s', $event->time, $sql));\n }\n }\n}", "predict_code_clean": "class DbQueryExecutedListener implements ListenerInterface\n{\n private LoggerInterface $logger;\n public function __construct(ContainerInterface $container)\n {\n $this->logger = $container->get(LoggerInterface::class);\n }\n public function listen(): array\n {\n return [\n QueryExecuted::class,\n ];\n }\n public function process(object $event): void\n {\n $this->logger->info(sprintf('[%s] %s %s ms', $event->connectionName, $event->sql, $event->time));\n }\n}"}} | |