updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -15,6 +15,7 @@ use Symfony\Component\Routing\Loader\Configurator\CollectionConfigurator;
use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RouteCompiler;
trait AddTrait
{
@@ -34,7 +35,7 @@ trait AddTrait
*/
final public function add(string $name, $path): RouteConfigurator
{
$paths = array();
$paths = [];
$parentConfigurator = $this instanceof CollectionConfigurator ? $this : ($this instanceof RouteConfigurator ? $this->parentConfigurator : null);
if (\is_array($path)) {
@@ -67,6 +68,7 @@ trait AddTrait
$routes->add($name.'.'.$locale, $route = $this->createRoute($path));
$this->collection->add($this->name.$name.'.'.$locale, $route);
$route->setDefault('_locale', $locale);
$route->setRequirement('_locale', preg_quote($locale, RouteCompiler::REGEX_DELIMITER));
$route->setDefault('_canonical_route', $this->name.$name);
}
@@ -83,7 +85,7 @@ trait AddTrait
return $this->add($name, $path);
}
private function createRoute($path): Route
private function createRoute(string $path): Route
{
return new Route($path);
}