namespace Symfony\Component\Routing\Generator;
-use Symfony\Component\Routing\RouteCollection;
-use Symfony\Component\Routing\RequestContext;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Routing\Exception\InvalidParameterException;
-use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
-use Psr\Log\LoggerInterface;
+use Symfony\Component\Routing\Exception\RouteNotFoundException;
+use Symfony\Component\Routing\RequestContext;
+use Symfony\Component\Routing\RouteCollection;
/**
* UrlGenerator can generate a URL or a path for any route in the RouteCollection
$scheme = $this->context->getScheme();
if ($requiredSchemes) {
- if (!in_array($scheme, $requiredSchemes, true)) {
+ if (!\in_array($scheme, $requiredSchemes, true)) {
$referenceType = self::ABSOLUTE_URL;
$scheme = current($requiredSchemes);
}
}
$targetDirs[] = $targetFile;
- $path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs);
+ $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs);
// A reference to the same base directory or an empty subdirectory must be prefixed with "./".
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used