/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Routing/Exceptions/UrlGenerationException.php
37 строк
927 B
Lucas Michot
Change count array comparison to empty array comparison to improve performance (#59688)
14 апр 2026, 21:18
Не верифицирован
14 апр 2026, 21:18
ff97ab4
Код
Авторство
О чём код?
<?php namespace Illuminate\Routing\Exceptions; use Exception; use Illuminate\Routing\Route; use Illuminate\Support\Str; class UrlGenerationException extends Exception { /** * Create a new exception for missing route parameters. * * @param \Illuminate\Routing\Route $route * @param array $parameters * @return static */ public static function forMissingParameters(Route $route, array $parameters = []) { $parameterLabel = Str::plural('parameter', count($parameters)); $message = sprintf( 'Missing required %s for [Route: %s] [URI: %s]', $parameterLabel, $route->getName(), $route->uri() ); if ($parameters !== []) { $message .= sprintf(' [Missing %s: %s]', $parameterLabel, implode(', ', $parameters)); } $message .= '.'; return new static($message); } }