some type fixes
This commit is contained in:
parent
514e27a511
commit
26e56842dc
@ -15,7 +15,6 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Routing\RouterInterface;
|
use Symfony\Component\Routing\RouterInterface;
|
||||||
use Symfony\Component\Console\Output\Output;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A console command for retrieving information about routes
|
* A console command for retrieving information about routes
|
||||||
@ -112,7 +111,7 @@ EOF
|
|||||||
? implode(', ', $requirements['_method']) : $requirements['_method']
|
? implode(', ', $requirements['_method']) : $requirements['_method']
|
||||||
)
|
)
|
||||||
: 'ANY';
|
: 'ANY';
|
||||||
$hostname = null !== $route->getHostnamePattern()
|
$hostname = '' !== $route->getHostnamePattern()
|
||||||
? $route->getHostnamePattern() : 'ANY';
|
? $route->getHostnamePattern() : 'ANY';
|
||||||
$output->writeln(sprintf($format, $name, $method, $hostname, $route->getPattern()));
|
$output->writeln(sprintf($format, $name, $method, $hostname, $route->getPattern()));
|
||||||
}
|
}
|
||||||
|
@ -30,18 +30,18 @@ class CompiledRoute
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param string $staticPrefix The static prefix of the compiled route
|
* @param string $staticPrefix The static prefix of the compiled route
|
||||||
* @param string $regex The regular expression to use to match this route
|
* @param string $regex The regular expression to use to match this route
|
||||||
* @param array $tokens An array of tokens to use to generate URL for this route
|
* @param array $tokens An array of tokens to use to generate URL for this route
|
||||||
* @param array $pathVariables An array of path variables
|
* @param array $pathVariables An array of path variables
|
||||||
* @param array $hostnameRegex|null Hostname regex
|
* @param string|null $hostnameRegex Hostname regex
|
||||||
* @param array $hostnameTokens Hostname tokens
|
* @param array $hostnameTokens Hostname tokens
|
||||||
* @param array $hostnameVariables An array of hostname variables
|
* @param array $hostnameVariables An array of hostname variables
|
||||||
* @param array $variables An array of variables (variables defined in the path and in the hostname patterns)
|
* @param array $variables An array of variables (variables defined in the path and in the hostname patterns)
|
||||||
*/
|
*/
|
||||||
public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostnameRegex = null, array $hostnameTokens = array(), array $hostnameVariables = array(), array $variables = array())
|
public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostnameRegex = null, array $hostnameTokens = array(), array $hostnameVariables = array(), array $variables = array())
|
||||||
{
|
{
|
||||||
$this->staticPrefix = $staticPrefix;
|
$this->staticPrefix = (string) $staticPrefix;
|
||||||
$this->regex = $regex;
|
$this->regex = $regex;
|
||||||
$this->tokens = $tokens;
|
$this->tokens = $tokens;
|
||||||
$this->pathVariables = $pathVariables;
|
$this->pathVariables = $pathVariables;
|
||||||
|
@ -20,6 +20,7 @@ class DumperCollection implements \IteratorAggregate
|
|||||||
{
|
{
|
||||||
private $parent;
|
private $parent;
|
||||||
private $children = array();
|
private $children = array();
|
||||||
|
private $attributes = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the children routes and collections.
|
* Returns the children routes and collections.
|
||||||
|
@ -282,7 +282,7 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
|||||||
*/
|
*/
|
||||||
public function setHostnamePattern($pattern)
|
public function setHostnamePattern($pattern)
|
||||||
{
|
{
|
||||||
$this->hostnamePattern = $pattern;
|
$this->hostnamePattern = (string) $pattern;
|
||||||
|
|
||||||
if ('' === $pattern) {
|
if ('' === $pattern) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user